diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-12-04 15:12:32 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-16 10:58:37 +0100 |
commit | 43013b6eb92458c5e2f68e90e08dfd75a3f3d9d0 (patch) | |
tree | 422e66a6ec0b6488131f053b439190d9aec6ddd5 | |
parent | b20eb804cf6187ed96be15b59612449f42b404c9 (diff) | |
download | linux-stable-43013b6eb92458c5e2f68e90e08dfd75a3f3d9d0.tar.gz linux-stable-43013b6eb92458c5e2f68e90e08dfd75a3f3d9d0.tar.bz2 linux-stable-43013b6eb92458c5e2f68e90e08dfd75a3f3d9d0.zip |
drm/i915/gt: Cancel the preemption timeout on responding to it
commit 0fe8bf4d3edce7aad6c14b9d5d92ff54dc19f0ba upstream.
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
Fixes: 3a7a92aba8fb ("drm/i915/execlists: Force preemption")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: <stable@vger.kernel.org> # v5.5+
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201204151234.19729-2-chris@chris-wilson.co.uk
(cherry picked from commit d997e240ceecb4f732611985d3a939ad1bfc1893)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/gpu/drm/i915/gt/intel_lrc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c index 336232624eed..e5a2d9984657 100644 --- a/drivers/gpu/drm/i915/gt/intel_lrc.c +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c @@ -3172,8 +3172,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"); + } } } |