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 4/4] drm/i915/gt: Clear the execlists timers upon reset
Date: Thu,  3 Dec 2020 08:16:16 +0000	[thread overview]
Message-ID: <20201203081616.1645-4-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20201203081616.1645-1-chris@chris-wilson.co.uk>

Across a reset, we stop the engine but not the timers. This leaves a
window where the timers have inconsistent state with the engine, but
should only result in a spurious timeout. As we cancel the outstanding
events, also cancel their timers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gt/intel_lrc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 7f25894e41d5..0c7f1e3dee5c 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -2450,6 +2450,11 @@ cancel_port_requests(struct intel_engine_execlists * const execlists)
 
 	smp_wmb(); /* complete the seqlock for execlists_active() */
 	WRITE_ONCE(execlists->active, execlists->inflight);
+
+	/* Having cancelled all outstanding process_csb(), stop their timers */
+	GEM_BUG_ON(execlists->pending[0]);
+	cancel_timer(&execlists->timer);
+	cancel_timer(&execlists->preempt);
 }
 
 static inline void
-- 
2.20.1

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

  parent 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 ` [Intel-gfx] [PATCH 2/4] drm/i915/gt: Cancel the preemption timeout on responding to it Chris Wilson
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 ` Chris Wilson [this message]
2020-12-04 13:58   ` [Intel-gfx] [PATCH 4/4] drm/i915/gt: Clear the execlists timers upon reset 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-4-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.