diff mbox series

[1/4] drm/i915/gt: Ignore repeated attempts to suspend request flow across reset

Message ID 20201203081616.1645-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series [1/4] drm/i915/gt: Ignore repeated attempts to suspend request flow across reset | expand

Commit Message

Chris Wilson Dec. 3, 2020, 8:16 a.m. UTC
Before reseting the engine, we suspend the execution of the guilty
request, so that we can continue execution with a new context while we
slowly compress the captured error state for the guilty context. However,
if the reset fails, we will promptly attempt to reset the same request
again, and discover the ongoing capture. Ignore the second attempt to
suspend and capture the same request.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1168
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gt/intel_lrc.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Chris Wilson Dec. 3, 2020, 1:49 p.m. UTC | #1
Quoting Chris Wilson (2020-12-03 08:16:13)
> Before reseting the engine, we suspend the execution of the guilty
> request, so that we can continue execution with a new context while we
> slowly compress the captured error state for the guilty context. However,
> if the reset fails, we will promptly attempt to reset the same request
> again, and discover the ongoing capture. Ignore the second attempt to
> suspend and capture the same request.
> 
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1168
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes: 32ff621fd744 ("drm/i915/gt: Allow temporary suspension of inflight requests")
Cc: <stable@vger.kernel.org> # v5.7+
Chris Wilson Dec. 3, 2020, 1:50 p.m. UTC | #2
Quoting Chris Wilson (2020-12-03 08:16:13)
> Before reseting the engine, we suspend the execution of the guilty
> request, so that we can continue execution with a new context while we
> slowly compress the captured error state for the guilty context. However,
> if the reset fails, we will promptly attempt to reset the same request
> again, and discover the ongoing capture. Ignore the second attempt to
> suspend and capture the same request.
> 
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1168
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes: 3a7a92aba8fb ("drm/i915/execlists: Force preemption")
Cc: <stable@vger.kernel.org> # v5.5+
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 43703efb36d1..1d209a8a95e8 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -2823,6 +2823,9 @@  static void __execlists_hold(struct i915_request *rq)
 static bool execlists_hold(struct intel_engine_cs *engine,
 			   struct i915_request *rq)
 {
+	if (i915_request_on_hold(rq))
+		return false;
+
 	spin_lock_irq(&engine->active.lock);
 
 	if (i915_request_completed(rq)) { /* too late! */