All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Subject: [Intel-gfx] [PATCH 2/4] drm/i915/gt: Cancel the preemption timeout on responding to it
Date: Thu,  3 Dec 2020 08:16:14 +0000	[thread overview]
Message-ID: <20201203081616.1645-2-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20201203081616.1645-1-chris@chris-wilson.co.uk>

We currently presume that the engine reset is successful, cancelling the
expired preemption timer in the process. However, engine resets can
fail, leaving the timeout still pending and we will then respond to the
timeout again next time the tasklet fires. What we want is for the
failed engine reset to be promoted to a full device reset, which is
kicked by the heartbeat once the engine stops processing events.

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 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 1d209a8a95e8..7f25894e41d5 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -3209,8 +3209,10 @@ static void execlists_submission_tasklet(unsigned long data)
 		spin_unlock_irqrestore(&engine->active.lock, flags);
 
 		/* Recheck after serialising with direct-submission */
-		if (unlikely(timeout && preempt_timeout(engine)))
+		if (unlikely(timeout && preempt_timeout(engine))) {
+			cancel_timer(&engine->execlists.preempt);
 			execlists_reset(engine, "preemption time out");
+		}
 	}
 }
 
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-12-03  8:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03  8:16 [Intel-gfx] [PATCH 1/4] drm/i915/gt: Ignore repeated attempts to suspend request flow across reset Chris Wilson
2020-12-03  8:16 ` Chris Wilson [this message]
2020-12-03  8:16 ` [Intel-gfx] [PATCH 3/4] drm/i915/gt: Include reset failures in the trace Chris Wilson
2020-12-04 13:59   ` Mika Kuoppala
2020-12-03  8:16 ` [Intel-gfx] [PATCH 4/4] drm/i915/gt: Clear the execlists timers upon reset Chris Wilson
2020-12-04 13:58   ` Mika Kuoppala
2020-12-03  8:27 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/i915/gt: Ignore repeated attempts to suspend request flow across reset Patchwork
2020-12-03  8:28 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-12-03  8:58 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-12-03 11:21 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-12-03 13:49 ` [Intel-gfx] [PATCH 1/4] " Chris Wilson
2020-12-03 13:50 ` Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201203081616.1645-2-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.