All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/guc: clear stalled request after a reset
@ 2022-08-11 21:08 ` Daniele Ceraolo Spurio
  0 siblings, 0 replies; 16+ messages in thread
From: Daniele Ceraolo Spurio @ 2022-08-11 21:08 UTC (permalink / raw)
  To: intel-gfx
  Cc: Matthew Brost, stable, Daniele Ceraolo Spurio, John Harrison, dri-devel

If the GuC CTs are full and we need to stall the request submission
while waiting for space, we save the stalled request and where the stall
occurred; when the CTs have space again we pick up the request submission
from where we left off.

If a full GT reset occurs, the state of all contexts is cleared and all
non-guilty requests are unsubmitted, therefore we need to restart the
stalled request submission from scratch. To make sure that we do so,
clear the saved request after a reset.

Fixes note: the patch that introduced the bug is in 5.15, but no
officially supported platform had GuC submission enabled by default
in that kernel, so the backport to that particular version (and only
that one) can potentially be skipped.

Fixes: 925dc1cf58ed ("drm/i915/guc: Implement GuC submission tasklet")
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: John Harrison <john.c.harrison@intel.com>
Cc: <stable@vger.kernel.org> # v5.15+
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
index 0d17da77e787..0d56b615bf78 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -4002,6 +4002,13 @@ static inline void guc_init_lrc_mapping(struct intel_guc *guc)
 	/* make sure all descriptors are clean... */
 	xa_destroy(&guc->context_lookup);
 
+	/*
+	 * A reset might have occurred while we had a pending stalled request,
+	 * so make sure we clean that up.
+	 */
+	guc->stalled_request = NULL;
+	guc->submission_stall_reason = STALL_NONE;
+
 	/*
 	 * Some contexts might have been pinned before we enabled GuC
 	 * submission, so we need to add them to the GuC bookeeping.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-08-30 14:13 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-11 21:08 [PATCH] drm/i915/guc: clear stalled request after a reset Daniele Ceraolo Spurio
2022-08-11 21:08 ` Daniele Ceraolo Spurio
2022-08-11 21:08 ` [Intel-gfx] " Daniele Ceraolo Spurio
2022-08-11 22:19 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2022-08-12  7:29 ` [Intel-gfx] [PATCH] " Tvrtko Ursulin
2022-08-12  7:29   ` Tvrtko Ursulin
2022-08-12 15:31   ` Ceraolo Spurio, Daniele
2022-08-12 15:31     ` Ceraolo Spurio, Daniele
2022-08-12 15:31     ` Ceraolo Spurio, Daniele
2022-08-30 14:13     ` Tvrtko Ursulin
2022-08-30 14:13       ` Tvrtko Ursulin
2022-08-30 14:13       ` Tvrtko Ursulin
2022-08-12  8:19 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork
2022-08-15 22:27 ` [PATCH] " John Harrison
2022-08-15 22:27   ` [Intel-gfx] " John Harrison
2022-08-15 22:27   ` John Harrison

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.