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

2021-07-22 Thread Matthew Brost
On Thu, Jul 22, 2021 at 01:26:30PM -0700, Daniele Ceraolo Spurio wrote: > > > On 7/16/2021 1:17 PM, Matthew Brost wrote: > > Implement a simple static mapping algorithm of the i915 priority levels > > (int, -1k to 1k exposed to user) to the 4 GuC levels. Mapping is as >

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

2021-07-22 Thread Matthew Brost
On Thu, Jul 22, 2021 at 02:50:24PM -0700, Daniele Ceraolo Spurio wrote: > > > > > > > @@ -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

[PATCH 03/33] drm/i915: Hold reference to intel_context over life of i915_request

2021-07-22 Thread Matthew Brost
(John Harrison) - Update comment explaining how GuC mode and execlists mode deal with virtual engines differently Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/i915_request.c | 55 - 1 file changed, 23 insertions(+), 32 deletions(-)

[PATCH 08/33] drm/i915/guc: Reset implementation for new GuC interface

2021-07-22 Thread Matthew Brost
) - Split into a series of smaller patches v4: (John H) - Fix typo - Add braces around if statements in reset code Cc: John Harrison Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_gt_pm.c | 6 +- drivers/gpu/drm/i915/gt/intel_reset.c | 18 +- drivers/gpu/drm

[PATCH 02/33] drm/i915/guc: Make hangcheck work with GuC virtual engines

2021-07-22 Thread Matthew Brost
e low frequency of heartbeat pulses) and it is considered an easier option than trying to make changes to GuC firmware. v2: (Tvrtko) - Update commit message - Have default behavior if no vfunc present Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: Matthew

[PATCH 00/33] Remaining patches for basic GuC submission

2021-07-22 Thread Matthew Brost
The remaining patches for basic GuC submission [1]. Need 4 more RB and CI results to get this merged. Signed-off-by: Matthew Brost [1] https://patchwork.freedesktop.org/series/91840/ Daniele Ceraolo Spurio (1): drm/i915/guc: Unblock GuC submission on Gen11+ John Harrison (11): drm/i915

[PATCH 04/33] drm/i915/guc: Disable bonding extension with GuC submission

2021-07-22 Thread Matthew Brost
Update the bonding extension to return -ENODEV when using GuC submission as this extension fundamentally will not work with the GuC submission interface. Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 5 + 1 file changed, 5

[PATCH 12/33] drm/i915/guc: Handle context reset notification

2021-07-22 Thread Matthew Brost
) - s/drm_dbg/drm_err Cc: Matthew Brost Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_guc.h| 2 ++ drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 3 ++ .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 36

[PATCH 11/33] drm/i915/guc: Suspend/resume implementation for new interface

2021-07-22 Thread Matthew Brost
channels, contexts, etc..). v2: (Michel / John H) - INTEL_GUC_ACTION_RESET_CLIENT 0x5B01 -> 0x5507 Cc: John Harrison Signed-off-by: Matthew Brost Signed-off-by: Michal Wajdeczko Reviewed-by: John Harrison --- .../gpu/drm/i915/gt/uc/abi/guc_actions_abi.h | 1 + drivers/gpu/drm/i915/gt

[PATCH 09/33] drm/i915: Reset GPU immediately if submission is disabled

2021-07-22 Thread Matthew Brost
If submission is disabled by the backend for any reason, reset the GPU immediately in the heartbeat code as the backend can't be reenabled until the GPU is reset. Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- .../gpu/drm/i915/gt/intel_engine_heartbeat.c

[PATCH 16/33] drm/i915/guc: Don't complain about reset races

2021-07-22 Thread Matthew Brost
atever the H2G was about should get redone once the reset is over. Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 5 - drivers/gpu/drm/i915/gt/uc/intel_uc.c | 3 +++ drivers/gpu/drm/i915/gt/uc/intel_uc

[PATCH 17/33] drm/i915/guc: Enable GuC engine reset

2021-07-22 Thread Matthew Brost
From: John Harrison Clear the 'disable resets' flag to allow GuC to reset hung contexts (detected via pre-emption timeout). Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 3 +-- 1 file

[PATCH 24/33] drm/i915/guc: Implement banned contexts for GuC submission

2021-07-22 Thread Matthew Brost
When using GuC submission, if a context gets banned disable scheduling and mark all inflight requests as complete. Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/gt/intel_context.h

[PATCH 07/33] drm/i915: Move active request tracking to a vfunc

2021-07-22 Thread Matthew Brost
Move active request tracking to a backend vfunc rather than assuming all backends want to do this in the manner. In the of case execlists / ring submission the tracking is on the physical engine while with GuC submission it is on the context. Signed-off-by: Matthew Brost Reviewed-by: John

[PATCH 10/33] drm/i915/guc: Add disable interrupts to guc sanitize

2021-07-22 Thread Matthew Brost
Add disable GuC interrupts to intel_guc_sanitize(). Part of this requires moving the guc_*_interrupt wrapper function into header file intel_guc.h. Signed-off-by: Matthew Brost Cc: Daniele Ceraolo Spurio Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_guc.h | 16

[PATCH 01/33] drm/i915/guc: GuC virtual engines

2021-07-22 Thread Matthew Brost
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/intel_context_types.h | 6 + drivers/gpu/drm/i915/gt

[PATCH 13/33] drm/i915/guc: Handle engine reset failure notification

2021-07-22 Thread Matthew Brost
GuC will notify the driver, via G2H, if it fails to reset an engine. We recover by resorting to a full GPU reset. v2: (John Harrison): - s/drm_dbg/drm_err Signed-off-by: Matthew Brost Signed-off-by: Fernando Pacheco Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_guc.h

[PATCH 05/33] drm/i915/guc: Direct all breadcrumbs for a class to single breadcrumbs

2021-07-22 Thread Matthew Brost
direct all physical engine interrupts to this breadcrumbs. v2: (John H) - Rework header file structure so intel_engine_mask_t can be in intel_engine_types.h Signed-off-by: Matthew Brost CC: John Harrison Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/intel_breadcrumb

[PATCH 30/33] drm/i915/selftest: Fix hangcheck self test for GuC submission

2021-07-22 Thread Matthew Brost
Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost Cc: Daniele Ceraolo Spurio Cc: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_engine_types.h | 1 + .../drm/i915/gt/selftest_engine_heartbeat.c | 22 ++ .../drm/i915/gt/selftest_engine_heartbeat.h

[PATCH 23/33] drm/i915/guc: Add golden context to GuC ADS

2021-07-22 Thread Matthew Brost
From: John Harrison The media watchdog mechanism involves GuC doing a silent reset and continue of the hung context. This requires the i915 driver provide a golden context to GuC in the ADS. v2: (Matthew Brost): - Fix memory corruption in shmem_read (John H) - Use locals rather than

[PATCH 19/33] drm/i915/guc: Fix for error capture after full GPU reset with GuC

2021-07-22 Thread Matthew Brost
ng code to avoid duplication across the multiple code paths that are now replicating it. Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_engine.h| 3 + drivers/gpu/drm/i915/gt/intel_engine_cs.c

[PATCH 18/33] drm/i915/guc: Capture error state on context reset

2021-07-22 Thread Matthew Brost
ongoing work to define an API for a GuC debug state dump. The suggestion for now is to manually disable FW initiated resets in cases where debug state is needed. Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/intel_context.c | 20 +++ drivers

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

2021-07-22 Thread Matthew Brost
blocked count in unblock function - Ring buffer implementation - Comment about blocked in submission path - Shorter rpm path Signed-off-by: Matthew Brost Cc: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_context.c | 13 ++ drivers/gpu/drm/i915/gt/intel_context.h | 7 + drivers

[PATCH 26/33] drm/i915/selftest: Better error reporting from hangcheck selftest

2021-07-22 Thread Matthew Brost
From: John Harrison There are many ways in which the hangcheck selftest can fail. Very few of them actually printed an error message to say what happened. So, fill in the missing messages. Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost Cc: Daniele

[PATCH 06/33] drm/i915: Add i915_sched_engine destroy vfunc

2021-07-22 Thread Matthew Brost
This is required to allow backend specific cleanup v2: (John H) - Rework commit message Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/i915_scheduler.c | 3 ++- drivers/gpu/drm/i915/i915_scheduler.h | 4 +--- drivers/gpu/drm/i915

[PATCH 20/33] drm/i915/guc: Hook GuC scheduling policies up

2021-07-22 Thread Matthew Brost
From: John Harrison Use the official driver default scheduling policies for configuring the GuC scheduler rather than a bunch of hardcoded values. v2: (Matthew Brost) - Move I915_ENGINE_WANT_FORCED_PREEMPTION to later patch Signed-off-by: John Harrison Signed-off-by: Matthew Brost

[PATCH 14/33] drm/i915/guc: Enable the timer expired interrupt for GuC

2021-07-22 Thread Matthew Brost
The GuC can implement execution qunatums, detect hung contexts and other such things but it requires the timer expired interrupt to do so. Signed-off-by: Matthew Brost CC: John Harrison Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/intel_rps.c | 4 1 file changed, 4 insertions

[PATCH 21/33] drm/i915/guc: Connect reset modparam updates to GuC policy flags

2021-07-22 Thread Matthew Brost
. This method keeps everything generic by instead using a string lookup on the directory entry name. Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 2 +- drivers/gpu/drm/i915/i915_debugfs_params.c | 32

[PATCH 15/33] drm/i915/guc: Provide mmio list to be saved/restored on engine reset

2021-07-22 Thread Matthew Brost
ice - once to work out the size and a second time to actually save it. v2: (Alan / CI) - GEN7_GT_MODE -> GEN6_GT_MODE to fix WA selftest failure Signed-off-by: John Harrison Signed-off-by: Fernando Pacheco Signed-off-by: Matthew Brost Cc: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Reviewe

[PATCH 27/33] drm/i915/selftest: Fix workarounds selftest for GuC submission

2021-07-22 Thread Matthew Brost
n Harrison Signed-off-by: Matthew Brost Cc: Daniele Ceraolo Spurio Cc: Matthew Brost Reviewed-by: Matthew Brost --- drivers/gpu/drm/i915/Makefile | 1 + .../gpu/drm/i915/gt/selftest_workarounds.c| 132 +- .../i915/selftests/intel_scheduler_helper

[PATCH 28/33] drm/i915/selftest: Fix MOCS selftest for GuC submission

2021-07-22 Thread Matthew Brost
: Matthew Brost Cc: Daniele Ceraolo Spurio Cc: Matthew Brost Reviewed-by: Matthew Brost --- drivers/gpu/drm/i915/gt/selftest_mocs.c | 49 ++--- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/selftest_mocs.c b/drivers/gpu/drm/i915/gt

[PATCH 22/33] drm/i915/guc: Include scheduling policies in the debugfs state dump

2021-07-22 Thread Matthew Brost
From: John Harrison Added the scheduling policy parameters to the 'guc_info' debugfs state dump. Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 14 ++ drivers/gpu/drm/

[PATCH 29/33] drm/i915/selftest: Increase some timeouts in live_requests

2021-07-22 Thread Matthew Brost
Requests may take slightly longer with GuC submission, let's increase the timeouts in live_requests. Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/selftests/i915_request.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gp

[PATCH 32/33] drm/i915/guc: Implement GuC priority management

2021-07-22 Thread Matthew Brost
ISPLAY priority or higher to highest guc prio - Update comment for guc_prio Signed-off-by: Matthew Brost Cc: Daniele Ceraolo Spurio --- drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 3 + drivers/gpu/drm/i915/gt/intel_context_types.h | 9 +- drivers/gpu/drm/i915/gt/intel_engine_user.c |

[PATCH 33/33] drm/i915/guc: Unblock GuC submission on Gen11+

2021-07-22 Thread Matthew Brost
From: Daniele Ceraolo Spurio Unblock GuC submission on Gen11+ platforms. v2: (Martin Peres / John H) - Delete debug message when GuC is disabled by default on certain platforms Signed-off-by: Michal Wajdeczko Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Matthew Brost Reviewed

[PATCH 31/33] drm/i915/selftest: Bump selftest timeouts for hangcheck

2021-07-22 Thread Matthew Brost
ng for completions and kill the test off. Lastly, the flush at the of various test sections can also see timeouts due to the large amount of work backed up. This is also true of the live_hwsp_read test. Signed-off-by: John Harrison Signed-off-by: Matthew Brost Cc: Daniele Ceraolo Spurio Reviewed

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

2021-07-24 Thread Matthew Brost
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 to virtua

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

2021-07-26 Thread Matthew Brost
On Mon, Jul 26, 2021 at 10:49:37AM -0700, Daniele Ceraolo Spurio wrote: > > > 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 imple

Re: [Intel-gfx] [PATCH 23/51] drm/i915/guc: Direct all breadcrumbs for a class to single breadcrumbs

2021-07-26 Thread Matthew Brost
On Thu, Jul 22, 2021 at 01:46:08PM +0100, Tvrtko Ursulin wrote: > > On 16/07/2021 21:16, Matthew Brost wrote: > > With GuC virtual engines the physical engine which a request executes > > and completes on isn't known to the i915. Therefore we can't attach a >

Re: [Intel-gfx] [PATCH 31/47] drm/i915/guc: Reset implementation for new GuC interface

2021-07-26 Thread Matthew Brost
On Thu, Jul 15, 2021 at 10:36:51AM +0100, Tvrtko Ursulin wrote: > > On 24/06/2021 08:05, Matthew Brost wrote: > > Reset implementation for new GuC interface. This is the legacy reset > > implementation which is called when the i915 owns the engine hang check. > > Future

[PATCH 04/33] drm/i915/guc: Disable bonding extension with GuC submission

2021-07-26 Thread Matthew Brost
Update the bonding extension to return -ENODEV when using GuC submission as this extension fundamentally will not work with the GuC submission interface. Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 5 + 1 file changed, 5

[PATCH 00/33] Remaining patches for basic GuC submission

2021-07-26 Thread Matthew Brost
The remaining patches for basic GuC submission [1]. Need 1 more RB and CI results to get this merged. v2: (Checkpatch) - Fix checkpatch warning (1 remaining overrulled) (Daniele) - Use an outer lock in guc_context_block / unblock Signed-off-by: Matthew Brost [1] https

[PATCH 05/33] drm/i915/guc: Direct all breadcrumbs for a class to single breadcrumbs

2021-07-26 Thread Matthew Brost
direct all physical engine interrupts to this breadcrumbs. v2: (John H) - Rework header file structure so intel_engine_mask_t can be in intel_engine_types.h Signed-off-by: Matthew Brost CC: John Harrison Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/intel_breadcrumb

[PATCH 08/33] drm/i915/guc: Reset implementation for new GuC interface

2021-07-26 Thread Matthew Brost
) - Split into a series of smaller patches v4: (John H) - Fix typo - Add braces around if statements in reset code v5: (Checkpatch) - Fix warnings Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/intel_gt_pm.c | 6 +- drivers

[PATCH 01/33] drm/i915/guc: GuC virtual engines

2021-07-26 Thread Matthew Brost
with proto-ctx v3: (Daniele) - Drop include, add comment to intel_virtual_engine_has_heartbeat Cc: Daniele Ceraolo Spurio Signed-off-by: Matthew Brost Reviewed-by: Daniele Ceraolo Spurio --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 8 +- drivers/gpu/drm/i915/gt/intel_context_types.h

[PATCH 07/33] drm/i915: Move active request tracking to a vfunc

2021-07-26 Thread Matthew Brost
Move active request tracking to a backend vfunc rather than assuming all backends want to do this in the manner. In the of case execlists / ring submission the tracking is on the physical engine while with GuC submission it is on the context. Signed-off-by: Matthew Brost Reviewed-by: John

[PATCH 06/33] drm/i915: Add i915_sched_engine destroy vfunc

2021-07-26 Thread Matthew Brost
This is required to allow backend specific cleanup v2: (John H) - Rework commit message Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/i915_scheduler.c | 3 ++- drivers/gpu/drm/i915/i915_scheduler.h | 4 +--- drivers/gpu/drm/i915

[PATCH 10/33] drm/i915/guc: Add disable interrupts to guc sanitize

2021-07-26 Thread Matthew Brost
Add disable GuC interrupts to intel_guc_sanitize(). Part of this requires moving the guc_*_interrupt wrapper function into header file intel_guc.h. Signed-off-by: Matthew Brost Cc: Daniele Ceraolo Spurio Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_guc.h | 16

[PATCH 12/33] drm/i915/guc: Handle context reset notification

2021-07-26 Thread Matthew Brost
) - s/drm_dbg/drm_err Cc: Matthew Brost Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_guc.h| 2 ++ drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 3 ++ .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 36

[PATCH 24/33] drm/i915/guc: Implement banned contexts for GuC submission

2021-07-26 Thread Matthew Brost
When using GuC submission, if a context gets banned disable scheduling and mark all inflight requests as complete. Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/gt/intel_context.h

[PATCH 15/33] drm/i915/guc: Provide mmio list to be saved/restored on engine reset

2021-07-26 Thread Matthew Brost
size and a second time to actually save it. v2: (Alan / CI) - GEN7_GT_MODE -> GEN6_GT_MODE to fix WA selftest failure Signed-off-by: John Harrison Signed-off-by: Fernando Pacheco Signed-off-by: Matthew Brost Cc: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Reviewed-by: Matthew Br

[PATCH 31/33] drm/i915/selftest: Bump selftest timeouts for hangcheck

2021-07-26 Thread Matthew Brost
ng for completions and kill the test off. Lastly, the flush at the of various test sections can also see timeouts due to the large amount of work backed up. This is also true of the live_hwsp_read test. Signed-off-by: John Harrison Signed-off-by: Matthew Brost Cc: Daniele Ceraolo Spurio Reviewed

[PATCH 22/33] drm/i915/guc: Include scheduling policies in the debugfs state dump

2021-07-26 Thread Matthew Brost
From: John Harrison Added the scheduling policy parameters to the 'guc_info' debugfs state dump. Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 14 ++ drivers/gpu/drm/

[PATCH 14/33] drm/i915/guc: Enable the timer expired interrupt for GuC

2021-07-26 Thread Matthew Brost
The GuC can implement execution qunatums, detect hung contexts and other such things but it requires the timer expired interrupt to do so. Signed-off-by: Matthew Brost CC: John Harrison Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/intel_rps.c | 4 1 file changed, 4 insertions

[PATCH 17/33] drm/i915/guc: Enable GuC engine reset

2021-07-26 Thread Matthew Brost
From: John Harrison Clear the 'disable resets' flag to allow GuC to reset hung contexts (detected via pre-emption timeout). Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 3 +-- 1 file

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

2021-07-26 Thread Matthew Brost
blocked count in unblock function - Ring buffer implementation - Comment about blocked in submission path - Shorter rpm path v3: (Checkpatch) - Fix typos in commit message (Daniel) - Rework to simplier locking structure in guc_context_block / unblock Signed-off-by: Matthew Brost Cc: Tvrtko

[PATCH 21/33] drm/i915/guc: Connect reset modparam updates to GuC policy flags

2021-07-26 Thread Matthew Brost
. This method keeps everything generic by instead using a string lookup on the directory entry name. Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 2 +- drivers/gpu/drm/i915/i915_debugfs_params.c | 32

[PATCH 13/33] drm/i915/guc: Handle engine reset failure notification

2021-07-26 Thread Matthew Brost
GuC will notify the driver, via G2H, if it fails to reset an engine. We recover by resorting to a full GPU reset. v2: (John Harrison): - s/drm_dbg/drm_err Signed-off-by: Matthew Brost Signed-off-by: Fernando Pacheco Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_guc.h

[PATCH 02/33] drm/i915/guc: Make hangcheck work with GuC virtual engines

2021-07-26 Thread Matthew Brost
e low frequency of heartbeat pulses) and it is considered an easier option than trying to make changes to GuC firmware. v2: (Tvrtko) - Update commit message - Have default behavior if no vfunc present Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: Matthew

[PATCH 28/33] drm/i915/selftest: Fix MOCS selftest for GuC submission

2021-07-26 Thread Matthew Brost
: Matthew Brost Cc: Daniele Ceraolo Spurio Cc: Matthew Brost Reviewed-by: Matthew Brost --- drivers/gpu/drm/i915/gt/selftest_mocs.c | 49 ++--- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/selftest_mocs.c b/drivers/gpu/drm/i915/gt

[PATCH 20/33] drm/i915/guc: Hook GuC scheduling policies up

2021-07-26 Thread Matthew Brost
From: John Harrison Use the official driver default scheduling policies for configuring the GuC scheduler rather than a bunch of hardcoded values. v2: (Matthew Brost) - Move I915_ENGINE_WANT_FORCED_PREEMPTION to later patch Signed-off-by: John Harrison Signed-off-by: Matthew Brost

[PATCH 32/33] drm/i915/guc: Implement GuC priority management

2021-07-26 Thread Matthew Brost
ISPLAY 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 --- drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 3 + drivers/gpu/drm/i915/gt/intel_context_types.h | 9 +- drive

[PATCH 26/33] drm/i915/selftest: Better error reporting from hangcheck selftest

2021-07-26 Thread Matthew Brost
From: John Harrison There are many ways in which the hangcheck selftest can fail. Very few of them actually printed an error message to say what happened. So, fill in the missing messages. Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost Cc: Daniele

[PATCH 30/33] drm/i915/selftest: Fix hangcheck self test for GuC submission

2021-07-26 Thread Matthew Brost
Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost Cc: Daniele Ceraolo Spurio Cc: Matthew Brost --- .../drm/i915/gt/selftest_engine_heartbeat.c | 22 ++ .../drm/i915/gt/selftest_engine_heartbeat.h | 2 + drivers/gpu/drm/i915/

[PATCH 03/33] drm/i915: Hold reference to intel_context over life of i915_request

2021-07-26 Thread Matthew Brost
(John Harrison) - Update comment explaining how GuC mode and execlists mode deal with virtual engines differently Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/i915_request.c | 55 - 1 file changed, 23 insertions(+), 32 deletions(-)

[PATCH 09/33] drm/i915: Reset GPU immediately if submission is disabled

2021-07-26 Thread Matthew Brost
If submission is disabled by the backend for any reason, reset the GPU immediately in the heartbeat code as the backend can't be reenabled until the GPU is reset. Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- .../gpu/drm/i915/gt/intel_engine_heartbeat.c

[PATCH 11/33] drm/i915/guc: Suspend/resume implementation for new interface

2021-07-26 Thread Matthew Brost
channels, contexts, etc..). v2: (Michel / John H) - INTEL_GUC_ACTION_RESET_CLIENT 0x5B01 -> 0x5507 Cc: John Harrison Signed-off-by: Matthew Brost Signed-off-by: Michal Wajdeczko Reviewed-by: John Harrison --- .../gpu/drm/i915/gt/uc/abi/guc_actions_abi.h | 1 + drivers/gpu/drm/i915/gt

[PATCH 23/33] drm/i915/guc: Add golden context to GuC ADS

2021-07-26 Thread Matthew Brost
From: John Harrison The media watchdog mechanism involves GuC doing a silent reset and continue of the hung context. This requires the i915 driver provide a golden context to GuC in the ADS. v2: (Matthew Brost): - Fix memory corruption in shmem_read (John H) - Use locals rather than

[PATCH 18/33] drm/i915/guc: Capture error state on context reset

2021-07-26 Thread Matthew Brost
ongoing work to define an API for a GuC debug state dump. The suggestion for now is to manually disable FW initiated resets in cases where debug state is needed. Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/intel_context.c | 20 +++ drivers

[PATCH 27/33] drm/i915/selftest: Fix workarounds selftest for GuC submission

2021-07-26 Thread Matthew Brost
: Matthew Brost Cc: Daniele Ceraolo Spurio Cc: Matthew Brost Reviewed-by: Matthew Brost --- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/gt/intel_engine_types.h | 1 + .../gpu/drm/i915/gt/selftest_workarounds.c| 130 +- .../gpu/drm/i915/gt/uc

[PATCH 29/33] drm/i915/selftest: Increase some timeouts in live_requests

2021-07-26 Thread Matthew Brost
Requests may take slightly longer with GuC submission, let's increase the timeouts in live_requests. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/selftests/i915_request.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/self

[PATCH 33/33] drm/i915/guc: Unblock GuC submission on Gen11+

2021-07-26 Thread Matthew Brost
From: Daniele Ceraolo Spurio Unblock GuC submission on Gen11+ platforms. v2: (Martin Peres / John H) - Delete debug message when GuC is disabled by default on certain platforms Signed-off-by: Michal Wajdeczko Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Matthew Brost Reviewed

[PATCH 19/33] drm/i915/guc: Fix for error capture after full GPU reset with GuC

2021-07-26 Thread Matthew Brost
ng code to avoid duplication across the multiple code paths that are now replicating it. Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_engine.h| 3 + drivers/gpu/drm/i915/gt/intel_engine_cs.c

[PATCH 16/33] drm/i915/guc: Don't complain about reset races

2021-07-26 Thread Matthew Brost
atever the H2G was about should get redone once the reset is over. Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 5 - drivers/gpu/drm/i915/gt/uc/intel_uc.c | 4 drivers/gpu/drm/i915/gt/uc/intel_uc

[PATCH 1/1] drm/i915/selftests: Increase timeout in i915_gem_contexts selftests

2021-07-26 Thread Matthew Brost
Like in the case of several other selftests, generating lots of requests in a loop takes a bit longer with GuC submission. Increase a timeout in i915_gem_contexts selftest to take this into account. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c | 2 +- 1

[PATCH 0/1] Increase timeout in i915_gem_contexts selftests

2021-07-26 Thread Matthew Brost
Patch says it all. Seeing a failure in CI [1] and locally on certain TGL machines with GuC submission enabled. Let's fix this so we can enable CI on TGL with GuC submission. Signed-off-by: Matthew Brost [1] https://patchwork.freedesktop.org/series/92984/#rev4 Matthew Brost (1): drm

Re: [PATCH 11/15] drm/i915/guc/slpc: Enable ARAT timer interrupt

2021-07-27 Thread Matthew Brost
nally don't care at all (nor does checkpatch) but if you want to avoid the wrath of others I'd change this to what I have below: /* * Allow GuC to receive ARAT timer expiry event. * This interrupt register is setup by RPS code * when host based Turbo is enabled. */ Same goes for comm

Re: [Intel-gfx] [PATCH 31/47] drm/i915/guc: Reset implementation for new GuC interface

2021-07-27 Thread Matthew Brost
On Tue, Jul 27, 2021 at 09:56:06AM +0100, Tvrtko Ursulin wrote: > > On 26/07/2021 23:48, Matthew Brost wrote: > > On Thu, Jul 15, 2021 at 10:36:51AM +0100, Tvrtko Ursulin wrote: > > > > > > On 24/06/2021 08:05, Matthew Brost wrote: > > > > Reset impleme

Re: [PATCH 14/15] drm/i915/guc/slpc: Add SLPC selftest

2021-07-27 Thread Matthew Brost
On Mon, Jul 26, 2021 at 12:07:59PM -0700, Vinay Belgaumkar wrote: > Tests that exercise the SLPC get/set frequency interfaces. > > Clamp_max will set max frequency to multiple levels and check > that SLPC requests frequency lower than or equal to it. > > Clamp_min will set min frequency to differ

Re: [PATCH 03/15] drm/i915/guc/slpc: Gate Host RPS when SLPC is enabled

2021-07-27 Thread Matthew Brost
On Mon, Jul 26, 2021 at 12:07:48PM -0700, Vinay Belgaumkar wrote: > Also ensure uc_init is called before we initialize RPS so that we > can check for SLPC support. We do not need to enable up/down > interrupts when SLPC is enabled. However, we still need the ARAT > interrupt, which will be enabled

Re: [PATCH 03/15] drm/i915/guc/slpc: Gate Host RPS when SLPC is enabled

2021-07-27 Thread Matthew Brost
On Tue, Jul 27, 2021 at 03:48:23PM -0700, Belgaumkar, Vinay wrote: > > > On 7/27/2021 3:44 PM, Matthew Brost wrote: > > On Mon, Jul 26, 2021 at 12:07:48PM -0700, Vinay Belgaumkar wrote: > > > Also ensure uc_init is called before we initialize RPS so that we > > &g

Re: [PATCH 07/15] drm/i915/guc/slpc: Remove BUG_ON in guc_submission_disable

2021-07-27 Thread Matthew Brost
On Mon, Jul 26, 2021 at 12:07:52PM -0700, Vinay Belgaumkar wrote: > The assumption when it was added was there would be no wakerefs > held. However, if we fail to enable SLPC, we will still be > holding a wakeref. > So this is if intel_guc_slpc_enable() fails, right? Not seeing where the wakeref

Re: [PATCH 07/15] drm/i915/guc/slpc: Remove BUG_ON in guc_submission_disable

2021-07-27 Thread Matthew Brost
On Tue, Jul 27, 2021 at 06:01:18PM -0700, Belgaumkar, Vinay wrote: > > > On 7/27/2021 5:20 PM, Matthew Brost wrote: > > On Mon, Jul 26, 2021 at 12:07:52PM -0700, Vinay Belgaumkar wrote: > > > The assumption when it was added was there would be no wakerefs > >

[PATCH] drm/i915: Disable bonding on gen12+ platforms

2021-07-28 Thread Matthew Brost
Disable bonding on gen12+ platforms aside from ones already supported by the i915 - TGL, RKL, and ADL-S. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers

[PATCH 0/1] Fix gem_ctx_persistence failures with GuC submission

2021-07-28 Thread Matthew Brost
) after the context is closed and we have no way to detect that with GuC submission unless we keep a list of closed but running contexts which seems like overkill for a non-real world use case. We likely should just skip these tests with GuC submission. Signed-off-by: Matthew Brost Matthew Brost

[PATCH 1/1] drm/i915: Check if engine has heartbeat when closing a context

2021-07-28 Thread Matthew Brost
be a vfunc as we now need to call this function on execlists virtual engines too. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 5 +++-- drivers/gpu/drm/i915/gt/intel_context_types.h | 2 ++ drivers/gpu/drm/i915/gt/intel_engine.h

Re: [Intel-gfx] [PATCH 13/14] drm/i915/guc/slpc: Add SLPC selftest

2021-07-29 Thread Matthew Brost
t min frequency to different levels and check > if SLPC requests are higher or equal to those levels. > > v2: Address review comments (Michal W) > v3: Checkpatch() corrections > v4: Remove unnecessary header file (Matthew Brost) > > Signed-off-by: Vinay Belgaumkar Overall l

Re: [Intel-gfx] [PATCH 1/1] drm/i915: Check if engine has heartbeat when closing a context

2021-07-30 Thread Matthew Brost
On Fri, Jul 30, 2021 at 10:49:01AM +0100, Tvrtko Ursulin wrote: > > On 30/07/2021 01:13, John Harrison wrote: > > On 7/28/2021 17:34, Matthew Brost wrote: > > > If an engine associated with a context does not have a heartbeat, ban it > > > immediately. This is neede

[PATCH] drm/i915: Fix syncmap memory leak

2021-07-30 Thread Matthew Brost
0x33/0x80 [<0000eb7a4831>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: Matthew Brost Fixes: 531958f6f357 ("drm/i915/gt: Track timeline activeness in enter/exit") Cc: --- drivers/gpu/drm/i915/gt/intel_timeline.c | 9 + 1 file changed, 9 inse

Re: [Intel-gfx] [PATCH 13/14] drm/i915/guc/slpc: Add SLPC selftest

2021-07-30 Thread Matthew Brost
t min frequency to different levels and check > if SLPC requests are higher or equal to those levels. > > v2: Address review comments (Michal W) > v3: Checkpatch() corrections > v4: Remove unnecessary header file (Matthew Brost) > v5: checkpatch() and define const for 50/3 (Matt

[PATCH 2/4] drm/i915/guc: put all guc objects in lmem when available

2021-08-02 Thread Matthew Brost
have issues with lmem at that point something is seriously wrong with the system, so no point in trying to handle it. Cc: Matthew Auld Cc: Abdiel Janulgue Cc: Michal Wajdeczko Cc: Vinay Belgaumkar Cc: Radoslaw Szwichtenberg Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Matthew

[PATCH 0/4] Enable GuC submission by default on DG1

2021-08-02 Thread Matthew Brost
selftests. Submissions seem to work. Signed-off-by: Matthew Brost Daniele Ceraolo Spurio (1): drm/i915/guc: put all guc objects in lmem when available Matthew Brost (2): drm/i915/guc: Add DG1 GuC / HuC firmware defs drm/i915/guc: Enable GuC submission by default on DG1 Venkata Sandeep Dhan

[PATCH 1/4] drm/i915: Do not define vma on stack

2021-08-02 Thread Matthew Brost
From: Venkata Sandeep Dhanalakota Defining vma on stack can cause stack overflow, if vma gets populated with new fields. Cc: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Signed-off-by: Venkata Sandeep Dhanalakota Signef-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 18

[PATCH 4/4] drm/i915/guc: Enable GuC submission by default on DG1

2021-08-02 Thread Matthew Brost
Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c index da57d18d9f6b..fc2fc8d111d8 100644 --- a/drivers/gpu/drm/i915/gt/uc

[PATCH 3/4] drm/i915/guc: Add DG1 GuC / HuC firmware defs

2021-08-02 Thread Matthew Brost
Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c index f8cb00ffb506..a685d563df72 100644 --- a/drivers/gpu/drm/i915/gt/uc

Re: [PATCH 0/4] Enable GuC submission by default on DG1

2021-08-03 Thread Matthew Brost
On Tue, Aug 03, 2021 at 02:15:13PM +0200, Daniel Vetter wrote: > On Tue, Aug 3, 2021 at 6:53 AM Matthew Brost wrote: > > > > Minimum set of patches to enable GuC submission on DG1 and enable it by > > default. > > > > A little difficult to test as IGTs do not wo

[PATCH 00/46] Parallel submission aka multi-bb execbuf

2021-08-03 Thread Matthew Brost
after unpin. Not all that related but wanted to get this out on the list for review and based on the tip of all of these patches. Patch 46. Signed-off-by: Matthew Brost [1] https://patchwork.freedesktop.org/series/92028/ [2] https://patchwork.freedesktop.org/series/93071/ Matthew Brost (46): drm

[PATCH 06/46] drm/i915/guc: Check return of __xa_store when registering a context

2021-08-03 Thread Matthew Brost
Check return of __xa_store when registering a context as this can fail in a rare case if not memory can not be allocated. If this occurs fall back on the tasklet flow control and try again in the future. Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c| 16

[PATCH 04/46] drm/i915/guc: Don't allow requests not ready to consume all guc_ids

2021-08-03 Thread Matthew Brost
Add a heuristic which checks if over half of the available guc_ids are currently consumed by requests not ready to be submitted. If this heuristic is true at request creation time (normal guc_id allocation location) force all submissions + guc_ids allocations to tasklet. Signed-off-by: Matthew

[PATCH 03/46] drm/i915/guc: Don't return -EAGAIN to user when guc_ids exhausted

2021-08-03 Thread Matthew Brost
issued from the workqueue because of the locking structure. When we deregister a context, we also do the same thing (waiting on the G2H) but we can safely issue the deregister H2G from the tasklet. Once all the G2H have returned we can trigger a submission on the context. Signed-off-by: Matthew Bros

<    1   2   3   4   5   6   7   8   9   10   >