Re: [PATCH 19/51] drm/i915/guc: GuC virtual engines

2021-07-19 Thread Daniele Ceraolo Spurio
that of all the siblings. v2: Update to work with proto-ctx Cc: Daniele Ceraolo Spurio Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 8 +- drivers/gpu/drm/i915/gem/i915_gem_context.h | 1 + drivers/gpu/drm/i915/gt/intel_context_types.h | 6

Re: [PATCH 19/51] drm/i915/guc: GuC virtual engines

2021-07-19 Thread Daniele Ceraolo Spurio
On 7/19/2021 4:27 PM, Matthew Brost wrote: On Mon, Jul 19, 2021 at 04:33:56PM -0700, Daniele Ceraolo Spurio wrote: On 7/16/2021 1:16 PM, Matthew Brost wrote: Implement GuC virtual engines. Rather simple implementation, basically just allocate an engine, setup context enter / exit function

Re: [PATCH 12/51] drm/i915/guc: Ensure request ordering via completion fences

2021-07-19 Thread Daniele Ceraolo Spurio
On 7/16/2021 1:16 PM, Matthew Brost wrote: If two requests are on the same ring, they are explicitly ordered by the HW. So, a submission fence is sufficient to ensure ordering when using the new GuC submission interface. Conversely, if two requests share a timeline and are on the same physical

Re: [PATCH 06/51] drm/i915/guc: Implement GuC context operations for new inteface

2021-07-19 Thread Daniele Ceraolo Spurio
On 7/16/2021 1:16 PM, Matthew Brost wrote: Implement GuC context operations which includes GuC specific operations alloc, pin, unpin, and destroy. v2: (Daniel Vetter) - Use msleep_interruptible rather than cond_resched in busy loop (Michal) - Remove C++ style comment Signed-off-by:

Re: [PATCH v5 09/15] drm/i915/pxp: Implement PXP irq handler

2021-07-21 Thread Daniele Ceraolo Spurio
On 7/21/2021 11:59 AM, Rodrigo Vivi wrote: On Thu, Jul 15, 2021 at 09:10:28PM -0700, Daniele Ceraolo Spurio wrote: From: "Huang, Sean Z" The HW will generate a teardown interrupt when session termination is required, which requires i915 to submit a terminating batch. Once the

Re: [PATCH 12/18] drm/i915/guc: Ensure request ordering via completion fences

2021-07-21 Thread Daniele Ceraolo Spurio
it dropped: Reviewed-by: Daniele Ceraolo Spurio Daniele int i915_request_await_execution(struct i915_request *rq, struct dma_fence *fence) @@ -1463,7 +1467,8 @@ i915_request_await_request(struct i915_request *to, struct i915_request *from)

Re: [PATCH 06/51] drm/i915/guc: Implement GuC context operations for new inteface

2021-07-21 Thread Daniele Ceraolo Spurio
On 7/19/2021 9:04 PM, Matthew Brost wrote: On Mon, Jul 19, 2021 at 05:51:46PM -0700, Daniele Ceraolo Spurio wrote: On 7/16/2021 1:16 PM, Matthew Brost wrote: Implement GuC context operations which includes GuC specific operations alloc, pin, unpin, and destroy. v2: (Daniel Vetter

Re: [PATCH 06/18] drm/i915/guc: Implement GuC context operations for new inteface

2021-07-21 Thread Daniele Ceraolo Spurio
On 7/20/2021 6:51 PM, John Harrison wrote: On 7/20/2021 15:39, Matthew Brost wrote: Implement GuC context operations which includes GuC specific operations alloc, pin, unpin, and destroy. v2:   (Daniel Vetter)    - Use msleep_interruptible rather than cond_resched in busy loop   (Michal)   

Re: [PATCH 43/51] drm/i915/guc: Support request cancellation

2021-07-22 Thread Daniele Ceraolo Spurio
On 7/16/2021 1:17 PM, Matthew Brost wrote: This adds GuC backend support for i915_request_cancel(), which in turn makes CONFIG_DRM_I915_REQUEST_TIMEOUT work. This needs a bit of explanation on why we're using fences for this instead of other simpler options. Signed-off-by: Matthew Brost

Re: [PATCH 50/51] drm/i915/guc: Implement GuC priority management

2021-07-22 Thread Daniele Ceraolo Spurio
#x27;m aware that this code is going to be overhauled again for drm scheduler so I'm not going to comment in that direction and I'll review the result again once the drm scheduler patches are available. Signed-off-by: Matthew Brost Cc: Daniele Ceraolo Spurio --- drivers/gpu/drm/i9

Re: [PATCH 50/51] drm/i915/guc: Implement GuC priority management

2021-07-22 Thread Daniele Ceraolo Spurio
@@ -1756,15 +1796,119 @@ static int guc_context_alloc(struct intel_context *ce) return lrc_alloc(ce, ce->engine); } +static void guc_context_set_prio(struct intel_guc *guc, +struct intel_context *ce, +u8 prio) +{ +

Re: [Intel-gfx] [PATCH 01/33] drm/i915/guc: GuC virtual engines

2021-07-23 Thread Daniele Ceraolo Spurio
that of all the siblings. v2: Update to work with proto-ctx v3: (Daniele) - Drop include, add comment to intel_virtual_engine_has_heartbeat Cc: Daniele Ceraolo Spurio Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 8 +- drivers/gpu/drm/i915/gt

Re: [Intel-gfx] [PATCH 32/33] drm/i915/guc: Implement GuC priority management

2021-07-23 Thread Daniele Ceraolo Spurio
urn before setting context registered flag - Map DISPLAY priority or higher to highest guc prio - Update comment for guc_prio Signed-off-by: Matthew Brost Cc: Daniele Ceraolo Spurio Reviewed-by: Daniele Ceraolo Spurio Daniele --- drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 3 +

Re: [PATCH v5 02/15] mei: pxp: export pavp client to me client bus

2021-07-26 Thread Daniele Ceraolo Spurio
On 7/26/2021 8:04 AM, Winkler, Tomas wrote: From: Vitaly Lubart Export PAVP client to work with i915 driver, for binding it uses kernel component framework. Signed-off-by: Vitaly Lubart Signed-off-by: Tomas Winkler Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Rodrigo Vivi

Re: [Intel-gfx] [PATCH 01/33] drm/i915/guc: GuC virtual engines

2021-07-26 Thread Daniele Ceraolo Spurio
On 7/24/2021 4:13 PM, Matthew Brost wrote: On Fri, Jul 23, 2021 at 05:47:45PM -0700, Daniele Ceraolo Spurio wrote: On 7/22/2021 4:53 PM, Matthew Brost wrote: Implement GuC virtual engines. Rather simple implementation, basically just allocate an engine, setup context enter / exit function

Re: [PATCH 25/33] drm/i915/guc: Support request cancellation

2021-07-26 Thread Daniele Ceraolo Spurio
On 7/22/2021 4:54 PM, Matthew Brost wrote: This adds GuC backend support for i915_request_cancel(), which in turn makes CONFIG_DRM_I915_REQUEST_TIMEOUT work. This implemenation makes use of fence while there is likely simplier options. A fence was choosen because of another feature coming soo

Re: [PATCH 25/33] drm/i915/guc: Support request cancellation

2021-07-27 Thread Daniele Ceraolo Spurio
guc_context_block / unblock Signed-off-by: Matthew Brost Cc: Tvrtko Ursulin Reviewed-by: Daniele Ceraolo Spurio Daniele --- drivers/gpu/drm/i915/gt/intel_context.c | 13 ++ drivers/gpu/drm/i915/gt/intel_context.h | 7 + drivers/gpu/drm/i915/gt/intel_context_types.h | 9

[PATCH v6 02/15] mei: pxp: export pavp client to me client bus

2021-07-28 Thread Daniele Ceraolo Spurio
From: Vitaly Lubart Export PAVP client to work with i915 driver, for binding it uses kernel component framework. v2:drop debug prints, refactor match code to match mei_hdcp (Tomas) Signed-off-by: Vitaly Lubart Signed-off-by: Tomas Winkler Signed-off-by: Daniele Ceraolo Spurio Reviewed-by

[PATCH v6 00/15] drm/i915: Introduce Intel PXP

2021-07-28 Thread Daniele Ceraolo Spurio
Previn Cc: Lionel Landwerlin Cc: Jason Ekstrand Cc: Daniel Vetter Anshuman Gupta (2): drm/i915/pxp: Add plane decryption support drm/i915/pxp: black pixels on pxp disabled Daniele Ceraolo Spurio (7): drm/i915/pxp: Define PXP component interface drm/i915/pxp: define PXP device flag and

[PATCH v6 01/15] drm/i915/pxp: Define PXP component interface

2021-07-28 Thread Daniele Ceraolo Spurio
-by: Daniele Ceraolo Spurio Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi --- include/drm/i915_component.h | 1 + include/drm/i915_pxp_tee_interface.h | 45 2 files changed, 46 insertions(+) create mode 100644 include/drm/i915_pxp_tee_interface.h diff --git a

[PATCH v6 03/15] drm/i915/pxp: define PXP device flag and kconfig

2021-07-28 Thread Daniele Ceraolo Spurio
Ahead of the PXP implementation, define the relevant define flag and kconfig option. v2: flip kconfig default to N. Some machines have IFWIs that do not support PXP, so we need it to be an opt-in until we add support to query the caps from the mei device. Signed-off-by: Daniele Ceraolo Spurio

[PATCH v6 04/15] drm/i915/pxp: allocate a vcs context for pxp usage

2021-07-28 Thread Daniele Ceraolo Spurio
: split export of pinned_context functions to a separate patch (Rodrigo) Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/Makefile | 4 ++ drivers/gpu/drm/i915/gt/intel_engine.h | 2 + drivers/gpu/drm/i915/gt/intel_gt.c

[PATCH v6 05/15] drm/i915/pxp: Implement funcs to create the TEE channel

2021-07-28 Thread Daniele Ceraolo Spurio
he wait, as the component might be bound after i915 load completes. We'll instead check when sending a tee message. Signed-off-by: Huang, Sean Z Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/

[PATCH v6 06/15] drm/i915/pxp: set KCR reg init

2021-07-28 Thread Daniele Ceraolo Spurio
: Daniele Ceraolo Spurio Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 27 drivers/gpu/drm/i915/pxp/intel_pxp.h | 3 +++ drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 5 + 3 files changed, 35 insertions(+) diff --git a/drivers/gpu/drm

[PATCH v6 07/15] drm/i915/pxp: Create the arbitrary session after boot

2021-07-28 Thread Daniele Ceraolo Spurio
v3: s/arb_is_in_play/arb_is_valid (Chris), move set-up to the new init_hw function v4: move interface defs to separate header, set arb_is valid to false on fini (Rodrigo) v5: handle async component binding Signed-off-by: Huang, Sean Z Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wil

[PATCH v6 11/15] drm/i915/pxp: start the arb session on demand

2021-07-28 Thread Daniele Ceraolo Spurio
Now that we can handle destruction and re-creation of the arb session, we can postpone the start of the session to the first submission that requires it, to avoid keeping it running with no user. Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Rodrigo Vivi --- .../gpu/drm/i915/gem

[PATCH v6 08/15] drm/i915/pxp: Implement arb session teardown

2021-07-28 Thread Daniele Ceraolo Spurio
me v2: emit in the ring, use high prio request (Chris) v3: better defines, stalling flush, cleaned up and renamed submission funcs (Chris) Signed-off-by: Huang, Sean Z Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/Makefile

[PATCH v6 10/15] drm/i915/pxp: interfaces for using protected objects

2021-07-28 Thread Daniele Ceraolo Spurio
. v5: squash patches, rebase on proto_ctx, update kerneldoc v6: rebase on obj create_ext changes Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Bommu Krishnaiah Cc: Rodrigo Vivi Cc: Chris Wilson Cc: Lionel Landwerlin Cc: Jason Ekstrand Cc: Daniel Vetter Reviewed-by: Rodrigo Vivi

[PATCH v6 09/15] drm/i915/pxp: Implement PXP irq handler

2021-07-28 Thread Daniele Ceraolo Spurio
ned-off-by: Huang, Sean Z Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/gt/intel_gt_irq.c | 7 ++ drivers/gpu/drm/i915/i915_reg.h | 1 + drive

[PATCH v6 13/15] drm/i915/pxp: Add plane decryption support

2021-07-28 Thread Daniele Ceraolo Spurio
state computation. [Ville] removed pointless code. [Ville] v8 (Daniele): update PXP check Cc: Bommu Krishnaiah Cc: Huang Sean Z Cc: Gaurav Kumar Cc: Ville Syrjälä Signed-off-by: Anshuman Gupta Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Rodrigo Vivi --- .../gpu/drm/i915/display

[PATCH v6 14/15] drm/i915/pxp: black pixels on pxp disabled

2021-07-28 Thread Daniele Ceraolo Spurio
. [Ville] v4 (Daniele): update pxp_is_borked check. Cc: Ville Syrjälä Cc: Gaurav Kumar Cc: Shankar Uma Signed-off-by: Anshuman Gupta Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Rodrigo Vivi --- .../gpu/drm/i915/display/intel_atomic_plane.c | 13 +- .../drm/i915/display

[PATCH v6 15/15] drm/i915/pxp: enable PXP for integrated Gen12

2021-07-28 Thread Daniele Ceraolo Spurio
Note that discrete cards can support PXP as well, but we haven't tested on those yet so keeping it disabled for now. Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/i915_pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm

[PATCH v6 12/15] drm/i915/pxp: Enable PXP power management

2021-07-28 Thread Daniele Ceraolo Spurio
esson on resume (delayed to first submission). v5: move irq changes back to irq patch (Rodrigo) Signed-off-by: Huang, Sean Z Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Cc: Rodrigo Vivi --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/gt/intel_gt_p

Re: [PATCH v6 10/15] drm/i915/pxp: interfaces for using protected objects

2021-07-29 Thread Daniele Ceraolo Spurio
On 7/29/2021 4:10 AM, Rodrigo Vivi wrote: On Wed, Jul 28, 2021 at 07:01:01PM -0700, Daniele Ceraolo Spurio wrote: This api allow user mode to create protected buffers and to mark contexts as making use of such objects. Only when using contexts marked in such a way is the execution guaranteed

Re: [PATCH v3 4/4] drm/doc/rfc: i915 DG1 uAPI

2021-04-16 Thread Daniele Ceraolo Spurio
On 4/16/2021 10:02 AM, Daniel Vetter wrote: On Fri, Apr 16, 2021 at 6:38 PM Jason Ekstrand wrote: On Thu, Apr 15, 2021 at 11:04 AM Matthew Auld wrote: Add an entry for the new uAPI needed for DG1. v2(Daniel): - include the overall upstreaming plan - add a note for mmap, there are di

Re: [Intel-gfx] [PATCH v6 10/15] drm/i915/pxp: interfaces for using protected objects

2021-08-13 Thread Daniele Ceraolo Spurio
On 8/13/2021 7:37 AM, Daniel Vetter wrote: On Wed, Jul 28, 2021 at 07:01:01PM -0700, Daniele Ceraolo Spurio wrote: This api allow user mode to create protected buffers and to mark contexts as making use of such objects. Only when using contexts marked in such a way is the execution

Re: [Intel-gfx] [PATCH v6 10/15] drm/i915/pxp: interfaces for using protected objects

2021-08-13 Thread Daniele Ceraolo Spurio
On 8/13/2021 7:42 AM, Daniel Vetter wrote: On Fri, Aug 13, 2021 at 04:37:53PM +0200, Daniel Vetter wrote: On Wed, Jul 28, 2021 at 07:01:01PM -0700, Daniele Ceraolo Spurio wrote: This api allow user mode to create protected buffers and to mark contexts as making use of such objects. Only

Re: [Intel-gfx] [PATCH v6 10/15] drm/i915/pxp: interfaces for using protected objects

2021-08-16 Thread Daniele Ceraolo Spurio
On 8/16/2021 8:15 AM, Daniel Vetter wrote: On Fri, Aug 13, 2021 at 08:18:02AM -0700, Daniele Ceraolo Spurio wrote: On 8/13/2021 7:37 AM, Daniel Vetter wrote: On Wed, Jul 28, 2021 at 07:01:01PM -0700, Daniele Ceraolo Spurio wrote: This api allow user mode to create protected buffers and to

Re: [Intel-gfx] [PATCH 02/27] drm/i915/guc: Fix outstanding G2H accounting

2021-08-19 Thread Daniele Ceraolo Spurio
On 8/18/2021 11:16 PM, Matthew Brost wrote: A small race that could result in incorrect accounting of the number of outstanding G2H. Basically prior to this patch we did not increment the number of outstanding G2H if we encoutered a GT reset while sending a H2G. This was incorrect as the conte

Re: [Intel-gfx] [PATCH 03/27] drm/i915/guc: Unwind context requests in reverse order

2021-08-19 Thread Daniele Ceraolo Spurio
On 8/18/2021 11:16 PM, Matthew Brost wrote: When unwinding requests on a reset context, if other requests in the context are in the priority list the requests could be resubmitted out of seqno order. Traverse the list of active requests in reverse and append to the head of the priority list to

Re: [Intel-gfx] [PATCH 04/27] drm/i915/guc: Don't drop ce->guc_active.lock when unwinding context

2021-08-19 Thread Daniele Ceraolo Spurio
"drm/i915/guc: Reset implementation for new GuC interface") Signed-off-by: Matthew Brost Cc: Reviewed-by: Daniele Ceraolo Spurio Do we have a trybot of this series with GuC enabled? I've checked the functions called in the previously unlocked chunk and didn't spot

Re: [Intel-gfx] [PATCH 03/27] drm/i915/guc: Unwind context requests in reverse order

2021-08-19 Thread Daniele Ceraolo Spurio
On 8/19/2021 4:53 PM, Matthew Brost wrote: On Thu, Aug 19, 2021 at 04:54:00PM -0700, Daniele Ceraolo Spurio wrote: On 8/18/2021 11:16 PM, Matthew Brost wrote: When unwinding requests on a reset context, if other requests in the context are in the priority list the requests could be

Re: [PATCH 05/27] drm/i915/guc: Process all G2H message at once in work queue

2021-08-19 Thread Daniele Ceraolo Spurio
Ceraolo Spurio Daniele --- drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c index 22b4733b55e2..20c710a74498 100644 --- a/drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH 09/27] drm/i915/guc: Kick tasklet after queuing a request

2021-08-20 Thread Daniele Ceraolo Spurio
ave the caller own the kick to keep it in one place? Not a blocker. Reviewed-by: Daniele Ceraolo Spurio Daniele } static int guc_bypass_tasklet_submit(struct intel_guc *guc,

Re: [Intel-gfx] [PATCH 10/27] drm/i915/guc: Don't enable scheduling on a banned context, guc_id invalid, not registered

2021-08-20 Thread Daniele Ceraolo Spurio
fine SCHED_STATE_NO_UNBLOCK \     SCHED_STATE_MULTI_BLOCKED_MASK | \     SCHED_STATE_PENDING_DISABLE | \     SCHED_STATE_BANNED Not a blocker. Reviewed-by: Daniele Ceraolo Spurio Daniele

Re: [PATCH 13/27] drm/i915/guc: Take context ref when cancelling request

2021-08-20 Thread Daniele Ceraolo Spurio
On 8/18/2021 11:16 PM, Matthew Brost wrote: A context can get destroyed after cancelling a request so take a reference to context when cancelling a request. What's the exact race? AFAICS __i915_request_skip does not have a context_put(). Daniele Fixes: 62eaf0ae217d ("drm/i915/guc: Supp

Re: [PATCH 15/27] drm/i915/guc: Reset LRC descriptor if register returns -ENODEV

2021-08-20 Thread Daniele Ceraolo Spurio
On 8/18/2021 11:16 PM, Matthew Brost wrote: Reset LRC descriptor if a context register returns -ENODEV as this means we are mid-reset. Fixes: eb5e7da736f3 ("drm/i915/guc: Reset implementation for new GuC interface") Signed-off-by: Matthew Brost Reviewed-by: Daniele Cera

Re: [PATCH 17/27] drm/i915/guc: Flush G2H work queue during reset

2021-08-20 Thread Daniele Ceraolo Spurio
On 8/18/2021 11:16 PM, Matthew Brost wrote: It isn't safe to scrub for missing G2H or continue with the reset until all G2H processing is complete. Flush the G2H work queue during reset to ensure it is done running. Might be worth moving this patch closer to "drm/i915/guc: Process all G2H m

Re: [PATCH 19/27] drm/i915/guc: Move guc_blocked fence to struct guc_state

2021-08-20 Thread Daniele Ceraolo Spurio
itself is blocked. Reviewed-by: Daniele Ceraolo Spurio Daniele Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_context.c| 5 +++-- drivers/gpu/drm/i915/gt/intel_context_types.h | 5 ++--- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 18 +- 3 file

Re: [PATCH 01/27] drm/i915/guc: Fix blocked context accounting

2021-08-24 Thread Daniele Ceraolo Spurio
On 8/18/2021 11:16 PM, Matthew Brost wrote: Prior to this patch the blocked context counter was cleared on init_sched_state (used during registering a context & resets) which is incorrect. This state needs to be persistent or the counter can read the incorrect value resulting in scheduling nev

Re: [Intel-gfx] [PATCH 06/27] drm/i915/guc: Workaround reset G2H is received after schedule done G2H

2021-08-24 Thread Daniele Ceraolo Spurio
On 8/18/2021 11:16 PM, Matthew Brost wrote: If the context is reset as a result of the request cancelation the context reset G2H is received after schedule disable done G2H which is likely the wrong order. The schedule disable done G2H release the waiting request cancelation code which resubmi

Re: [Intel-gfx] [PATCH 11/27] drm/i915/selftests: Fix memory corruption in live_lrc_isolation

2021-08-24 Thread Daniele Ceraolo Spurio
On 8/18/2021 11:16 PM, Matthew Brost wrote: GuC submission has exposed an existing memory corruption in live_lrc_isolation. We believe that some writes to the watchdog offsets in the LRC (0x178 & 0x17c) can result in trashing of portions of the address space. With GuC submission there are addi

Re: [PATCH 12/27] drm/i915/selftests: Add initial GuC selftest for scrubbing lost G2H

2021-08-24 Thread Daniele Ceraolo Spurio
test reset"); + + ret = intel_gt_wait_for_idle(gt, HZ); I think here we could use a small comment where we explain that the GT won't go idle if the scrubbing was not done correctly. With that: Reviewed-by: Daniele Ceraolo Spurio Daniele + if (ret

Re: [Intel-gfx] [PATCH 14/27] drm/i915/guc: Don't touch guc_state.sched_state without a lock

2021-08-24 Thread Daniele Ceraolo Spurio
On 8/18/2021 11:16 PM, Matthew Brost wrote: Before we did some clever tricks to not use the a lock when touching guc_state.sched_state in certain cases. Don't do that, enforce the use of the lock. Part of this is removing a dead code path from guc_lrc_desc_pin where a context could be deregis

Re: [PATCH 13/27] drm/i915/guc: Take context ref when cancelling request

2021-08-24 Thread Daniele Ceraolo Spurio
On 8/24/2021 8:42 AM, Matthew Brost wrote: On Fri, Aug 20, 2021 at 05:07:27PM -0700, Daniele Ceraolo Spurio wrote: On 8/18/2021 11:16 PM, Matthew Brost wrote: A context can get destroyed after cancelling a request so take a reference to context when cancelling a request. What's the

Re: [PATCH 17/27] drm/i915/guc: Flush G2H work queue during reset

2021-08-24 Thread Daniele Ceraolo Spurio
On 8/24/2021 8:44 AM, Matthew Brost wrote: On Fri, Aug 20, 2021 at 05:25:41PM -0700, Daniele Ceraolo Spurio wrote: On 8/18/2021 11:16 PM, Matthew Brost wrote: It isn't safe to scrub for missing G2H or continue with the reset until all G2H processing is complete. Flush the G2H work

Re: [Intel-gfx] [PATCH 18/27] drm/i915/guc: Release submit fence from an irq_work

2021-08-24 Thread Daniele Ceraolo Spurio
ist (I know we don't now, it's just for future proofing paranoia). with that: Reviewed-by: Daniele Ceraolo Spurio Daniele INIT_LIST_HEAD(&ce->guc_state.fences); } @@ -2145,6 +2157,7 @@ static int guc_request_alloc(struct i915_request *rq)

Re: [Intel-gfx] [PATCH 14/27] drm/i915/guc: Don't touch guc_state.sched_state without a lock

2021-08-24 Thread Daniele Ceraolo Spurio
On 8/24/2021 6:44 PM, Matthew Brost wrote: On Tue, Aug 24, 2021 at 06:20:49PM -0700, Daniele Ceraolo Spurio wrote: On 8/18/2021 11:16 PM, Matthew Brost wrote: Before we did some clever tricks to not use the a lock when touching guc_state.sched_state in certain cases. Don't do that, en

Re: [PATCH 24/27] drm/i915/guc: Move fields protected by guc->contexts_lock into sub structure

2021-08-24 Thread Daniele Ceraolo Spurio
/* +* GuC ID link - in list when unpinned but guc_id still valid in GuC +*/ + struct list_head link; + } guc_id; Maybe add a /* protected via guc->contexts_lock */ somewhere in the struct doc? Reviewed-by: Daniele

Re: [Intel-gfx] [PATCH 20/27] drm/i915/guc: Rework and simplify locking

2021-08-25 Thread Daniele Ceraolo Spurio
spin_lock(&sched_engine->lock); decr_context_blocked(ce); - spin_unlock(&sched_engine->lock); spin_unlock_irqrestore(&ce->guc_state.lock, flags); @@ -1710,7 +1695,9 @@ static void guc_context_sched_disable(struct intel_context *

Re: [Intel-gfx] [PATCH 23/27] drm/i915/guc: Move GuC priority fields in context under guc_active

2021-08-25 Thread Daniele Ceraolo Spurio
On 8/18/2021 11:16 PM, Matthew Brost wrote: Move GuC management fields in context under guc_active struct as this is where the lock that protects theses fields lives. Also only set guc_prio field once during context init. Can you explain what we gain by setting that only on first pin? AFAICS

Re: [Intel-gfx] [PATCH 21/27] drm/i915/guc: Proper xarray usage for contexts_lookup

2021-08-25 Thread Daniele Ceraolo Spurio
On 8/18/2021 11:16 PM, Matthew Brost wrote: Lock the xarray and take ref to the context if needed. v2: (Checkpatch) - Add new line after declaration (Daniel Vetter) - Correct put / get accounting in xa_for_loops Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/uc/intel_guc_s

Re: [Intel-gfx] [PATCH 21/27] drm/i915/guc: Proper xarray usage for contexts_lookup

2021-08-25 Thread Daniele Ceraolo Spurio
On 8/25/2021 5:41 PM, Matthew Brost wrote: On Wed, Aug 25, 2021 at 05:44:11PM -0700, Daniele Ceraolo Spurio wrote: On 8/18/2021 11:16 PM, Matthew Brost wrote: Lock the xarray and take ref to the context if needed. v2: (Checkpatch) - Add new line after declaration (Daniel Vetter

Re: [PATCH 22/27] drm/i915/guc: Drop pin count check trick between sched_disable and re-pin

2021-08-25 Thread Daniele Ceraolo Spurio
Ceraolo Spurio Daniele --- drivers/gpu/drm/i915/gt/intel_context_types.h | 2 + .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 49 --- 2 files changed, 34 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_context_types.h b/drivers/gpu/drm/i915/gt

Re: [PATCH 25/27] drm/i915/guc: Drop guc_active move everything into guc_state

2021-08-25 Thread Daniele Ceraolo Spurio
On 8/18/2021 11:16 PM, Matthew Brost wrote: Now that we have locking hierarchy of sched_engine->lock -> ce->guc_state everything from guc_active can be moved into guc_state and protected the guc_state.lock. Signed-off-by: Matthew Brost Reviewed-by: Daniele Ceraolo Spurio

Re: [Intel-gfx] [PATCH 26/27] drm/i915/guc: Add GuC kernel doc

2021-08-25 Thread Daniele Ceraolo Spurio
On 8/18/2021 11:16 PM, Matthew Brost wrote: Add GuC kernel doc for all structures added thus far for GuC submission and update the main GuC submission section with the new interface details. v2: - Drop guc_active.lock DOC Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_co

Re: [PATCH 02/27] drm/i915/guc: Fix outstanding G2H accounting

2021-08-26 Thread Daniele Ceraolo Spurio
On 8/25/2021 8:23 PM, Matthew Brost wrote: A small race that could result in incorrect accounting of the number of outstanding G2H. Basically prior to this patch we did not increment the number of outstanding G2H if we encoutered a GT reset while sending a H2G. This was incorrect as the contex

Re: [PATCH 06/27] drm/i915/guc: Workaround reset G2H is received after schedule done G2H

2021-08-26 Thread Daniele Ceraolo Spurio
: (Checkpatch) - Fix typos v3: (Daniele) - State that is a bug in the GuC firmware Fixes: 62eaf0ae217d ("drm/i915/guc: Support request cancellation") Signed-off-by: Matthew Brost Cc: Reviewed-by: Daniele Ceraolo Spurio Daniele --- .../gpu/drm/i915/gt/uc/intel_guc_submiss

Re: [PATCH 11/27] drm/i915/guc: Copy whole golden context, set engine state size of subset

2021-08-26 Thread Daniele Ceraolo Spurio
ore not a magic number only available in the GuC code. With the comment fixed: Reviewed-by: Daniele Ceraolo Spurio Daniele + blob->ads.eng_state_size[guc_class] = real_size - skip_size; blob->ads.golden_context_lrca[guc_class] = addr_ggtt;

Re: [PATCH 23/27] drm/i915/guc: Move GuC priority fields in context under guc_active

2021-08-26 Thread Daniele Ceraolo Spurio
Reviewed-by: Daniele Ceraolo Spurio Daniele --- drivers/gpu/drm/i915/gt/intel_context_types.h | 12 ++-- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 69 +++ drivers/gpu/drm/i915/i915_trace.h | 2 +- 3 files changed, 46 insertions(+), 37 deletions

Re: [PATCH 1/2] drm/i915/huc: Update TGL and friends to HuC 7.9.3

2021-07-06 Thread Daniele Ceraolo Spurio
Reviewed-by: Daniele Ceraolo Spurio Daniele On 6/25/2021 5:45 PM, john.c.harri...@intel.com wrote: From: John Harrison A new HuC is available for TGL and compatible platforms, so switch to using it. Signed-off-by: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 6 +++--- 1

Re: [PATCH 2/2] drm/i915/adlp: Add ADL-P GuC/HuC firmware files

2021-07-06 Thread Daniele Ceraolo Spurio
t a 3 letter acronym, but I can see using just adl could be confusing given that ADL-S uses a different firmware. Reviewed-by: Daniele Ceraolo Spurio Daniele fw_def(ALDERLAKE_S, 0, guc_def(tgl, 62, 0, 0), huc_def(tgl, 7, 9, 3)) \ fw_def(ROCKETLAKE, 0, guc_def(tgl, 62,

Re: [PATCH 26/47] drm/i915/guc: GuC virtual engines

2021-07-14 Thread Daniele Ceraolo Spurio
that of all the siblings. Cc: Daniele Ceraolo Spurio Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 19 +- drivers/gpu/drm/i915/gem/i915_gem_context.h | 1 + drivers/gpu/drm/i915/gt/intel_context_types.h | 10 + drivers/gpu/drm/i915/gt/intel_engine.h

Re: [PATCH 19/47] drm/i915/guc: Ensure request ordering via completion fences

2021-07-14 Thread Daniele Ceraolo Spurio
On 6/24/2021 12:04 AM, Matthew Brost wrote: If two requests are on the same ring, they are explicitly ordered by the HW. So, a submission fence is sufficient to ensure ordering when using the new GuC submission interface. Conversely, if two requests share a timeline and are on the same physica

[PATCH v5 01/15] drm/i915/pxp: Define PXP component interface

2021-07-15 Thread Daniele Ceraolo Spurio
-by: Daniele Ceraolo Spurio Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi --- include/drm/i915_component.h | 1 + include/drm/i915_pxp_tee_interface.h | 45 2 files changed, 46 insertions(+) create mode 100644 include/drm/i915_pxp_tee_interface.h diff --git a

[PATCH v5 02/15] mei: pxp: export pavp client to me client bus

2021-07-15 Thread Daniele Ceraolo Spurio
From: Vitaly Lubart Export PAVP client to work with i915 driver, for binding it uses kernel component framework. Signed-off-by: Vitaly Lubart Signed-off-by: Tomas Winkler Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Rodrigo Vivi --- drivers/misc/mei/Kconfig | 2 + drivers

[PATCH v5 00/15] drm/i915: Introduce Intel PXP

2021-07-15 Thread Daniele Ceraolo Spurio
Ekstrand Cc: Daniel Vetter Anshuman Gupta (2): drm/i915/pxp: Add plane decryption support drm/i915/pxp: black pixels on pxp disabled Daniele Ceraolo Spurio (7): drm/i915/pxp: Define PXP component interface drm/i915/pxp: define PXP device flag and kconfig drm/i915/pxp: allocate a vcs

[PATCH v5 04/15] drm/i915/pxp: allocate a vcs context for pxp usage

2021-07-15 Thread Daniele Ceraolo Spurio
: split export of pinned_context functions to a separate patch (Rodrigo) Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/Makefile | 4 ++ drivers/gpu/drm/i915/gt/intel_engine.h | 2 + drivers/gpu/drm/i915/gt/intel_gt.c

[PATCH v5 07/15] drm/i915/pxp: Create the arbitrary session after boot

2021-07-15 Thread Daniele Ceraolo Spurio
v3: s/arb_is_in_play/arb_is_valid (Chris), move set-up to the new init_hw function v4: move interface defs to separate header, set arb_is valid to false on fini (Rodrigo) v5: handle async component binding Signed-off-by: Huang, Sean Z Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wil

[PATCH v5 06/15] drm/i915/pxp: set KCR reg init

2021-07-15 Thread Daniele Ceraolo Spurio
: Daniele Ceraolo Spurio Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 27 drivers/gpu/drm/i915/pxp/intel_pxp.h | 3 +++ drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 5 + 3 files changed, 35 insertions(+) diff --git a/drivers/gpu/drm

[PATCH v5 05/15] drm/i915/pxp: Implement funcs to create the TEE channel

2021-07-15 Thread Daniele Ceraolo Spurio
he wait, as the component might be bound after i915 load completes. We'll instead check when sending a tee message. Signed-off-by: Huang, Sean Z Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Reviewed-by: Rodrigo Vivi #v2 --- drivers/gpu/drm/i915/Makefile | 3 +- driv

[PATCH v5 10/15] drm/i915/pxp: interfaces for using protected objects

2021-07-15 Thread Daniele Ceraolo Spurio
. v5: squash patches, rebase on proto_ctx, update kerneldoc Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Bommu Krishnaiah Cc: Rodrigo Vivi Cc: Chris Wilson Cc: Lionel Landwerlin Cc: Jason Ekstrand Cc: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 68 -- dr

[PATCH v5 03/15] drm/i915/pxp: define PXP device flag and kconfig

2021-07-15 Thread Daniele Ceraolo Spurio
Ahead of the PXP implementation, define the relevant define flag and kconfig option. v2: flip kconfig default to N. Some machines have IFWIs that do not support PXP, so we need it to be an opt-in until we add support to query the caps from the mei device. Signed-off-by: Daniele Ceraolo Spurio

[PATCH v5 12/15] drm/i915/pxp: Enable PXP power management

2021-07-15 Thread Daniele Ceraolo Spurio
esson on resume (delayed to first submission). v5: move irq changes back to irq patch (Rodrigo) Signed-off-by: Huang, Sean Z Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Cc: Rodrigo Vivi --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/gt/intel_gt_p

[PATCH v5 09/15] drm/i915/pxp: Implement PXP irq handler

2021-07-15 Thread Daniele Ceraolo Spurio
ned-off-by: Huang, Sean Z Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi #v4 --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/gt/intel_gt_irq.c | 7 ++ drivers/gpu/drm/i915/i915_reg.h | 1 + d

[PATCH v5 11/15] drm/i915/pxp: start the arb session on demand

2021-07-15 Thread Daniele Ceraolo Spurio
Now that we can handle destruction and re-creation of the arb session, we can postpone the start of the session to the first submission that requires it, to avoid keeping it running with no user. Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Rodrigo Vivi --- .../gpu/drm/i915/gem

[PATCH v5 14/15] drm/i915/pxp: black pixels on pxp disabled

2021-07-15 Thread Daniele Ceraolo Spurio
. [Ville] v4 (Daniele): update pxp_is_borked check. Cc: Ville Syrjälä Cc: Gaurav Kumar Cc: Shankar Uma Signed-off-by: Anshuman Gupta Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Rodrigo Vivi --- .../gpu/drm/i915/display/intel_atomic_plane.c | 13 +- .../drm/i915/display

[PATCH v5 08/15] drm/i915/pxp: Implement arb session teardown

2021-07-15 Thread Daniele Ceraolo Spurio
me v2: emit in the ring, use high prio request (Chris) v3: better defines, stalling flush, cleaned up and renamed submission funcs (Chris) Signed-off-by: Huang, Sean Z Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/Makefile

[PATCH v5 13/15] drm/i915/pxp: Add plane decryption support

2021-07-15 Thread Daniele Ceraolo Spurio
state computation. [Ville] removed pointless code. [Ville] v8 (Daniele): update PXP check Cc: Bommu Krishnaiah Cc: Huang Sean Z Cc: Gaurav Kumar Cc: Ville Syrjälä Signed-off-by: Anshuman Gupta Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Rodrigo Vivi --- .../gpu/drm/i915/display

[PATCH v5 15/15] drm/i915/pxp: enable PXP for integrated Gen12

2021-07-15 Thread Daniele Ceraolo Spurio
Note that discrete cards can support PXP as well, but we haven't tested on those yet so keeping it disabled for now. Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/i915_pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm

[PATCH] drm/i915/guc: Correctly free guc capture struct on error

2022-03-23 Thread Daniele Ceraolo Spurio
On error the "new" allocation is not freed, so add the required kfree. Fixes: 247f8071d5893 ("drm/i915/guc: Pre-allocate output nodes for extraction") Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Cc: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_guc_cap

[PATCH] drm/i915: fix remaining_timeout in intel_gt_retire_requests_timeout

2022-03-25 Thread Daniele Ceraolo Spurio
fix this, make sure to only return the timeout if it is positive. Fixes: b97060a99b01b ("drm/i915/guc: Update intel_gt_wait_for_idle to work with GuC") Signed-off-by: Daniele Ceraolo Spurio Cc: Matthew Brost Cc: John Harrison --- drivers/gpu/drm/i915/gt/intel_gt_requests.c | 2 +- 1 fi

[PATCH v7 02/17] mei: pxp: export pavp client to me client bus

2021-08-27 Thread Daniele Ceraolo Spurio
From: Vitaly Lubart Export PAVP client to work with i915 driver, for binding it uses kernel component framework. v2:drop debug prints, refactor match code to match mei_hdcp (Tomas) Signed-off-by: Vitaly Lubart Signed-off-by: Tomas Winkler Signed-off-by: Daniele Ceraolo Spurio Reviewed-by

[PATCH v7 03/17] drm/i915/pxp: define PXP device flag and kconfig

2021-08-27 Thread Daniele Ceraolo Spurio
Ahead of the PXP implementation, define the relevant define flag and kconfig option. v2: flip kconfig default to N. Some machines have IFWIs that do not support PXP, so we need it to be an opt-in until we add support to query the caps from the mei device. Signed-off-by: Daniele Ceraolo Spurio

[PATCH v7 10/17] drm/i915/pxp: interfaces for using protected objects

2021-08-27 Thread Daniele Ceraolo Spurio
quash patches, rebase on proto_ctx, update kerneldoc v6: rebase on obj create_ext changes v7: Use session counter to check if an object it valid, hold wakeref in context, don't add a new flag to RESET_STATS (Daniel) Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Bommu Krishnaiah C

[PATCH v7 06/17] drm/i915/pxp: set KCR reg init

2021-08-27 Thread Daniele Ceraolo Spurio
: Daniele Ceraolo Spurio Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 27 drivers/gpu/drm/i915/pxp/intel_pxp.h | 3 +++ drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 5 + 3 files changed, 35 insertions(+) diff --git a/drivers/gpu/drm

[PATCH v7 08/17] drm/i915/pxp: Implement arb session teardown

2021-08-27 Thread Daniele Ceraolo Spurio
me v2: emit in the ring, use high prio request (Chris) v3: better defines, stalling flush, cleaned up and renamed submission funcs (Chris) Signed-off-by: Huang, Sean Z Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/Makefile

[PATCH v7 00/17] drm/i915: Introduce Intel PXP

2021-08-27 Thread Daniele Ceraolo Spurio
erlin Cc: Jason Ekstrand Cc: Daniel Vetter Anshuman Gupta (2): drm/i915/pxp: Add plane decryption support drm/i915/pxp: black pixels on pxp disabled Daniele Ceraolo Spurio (9): drm/i915/pxp: Define PXP component interface drm/i915/pxp: define PXP device flag and kconfig drm/i91

[PATCH v7 04/17] drm/i915/pxp: allocate a vcs context for pxp usage

2021-08-27 Thread Daniele Ceraolo Spurio
: split export of pinned_context functions to a separate patch (Rodrigo) Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/Makefile | 4 ++ drivers/gpu/drm/i915/gt/intel_engine.h | 2 + drivers/gpu/drm/i915/gt/intel_gt.c

[PATCH v7 13/17] drm/i915/pxp: Add plane decryption support

2021-08-27 Thread Daniele Ceraolo Spurio
f the object has not been used in an execbuf beforehand. Cc: Bommu Krishnaiah Cc: Huang Sean Z Cc: Gaurav Kumar Cc: Ville Syrjälä Signed-off-by: Anshuman Gupta Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Juston Li Reviewed-by: Rodrigo Vivi #v8 Reviewed-by: Uma Shankar #v9 --- dr

  1   2   3   4   5   >