Skip to content

Commit

Permalink
drm/i915/gt: Cancel the preemption timeout on responding to it
Browse files Browse the repository at this point in the history
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: 3a7a92a ("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 d997e24)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
  • Loading branch information
Chris Wilson authored and Rodrigo Vivi committed Dec 8, 2020
1 parent 5419d93 commit 0fe8bf4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/i915/gt/intel_lrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
}

Expand Down

0 comments on commit 0fe8bf4

Please sign in to comment.