Commit ae911b23 authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915/execlists: Relax assertion for a pinned context image on reset

A gpu hang can occur at any time, given a sufficiently angry gpu. An
example is when it forgets to perform a context-switch at the end of a
request, leaving us with a hanging GPU on a completed request. Here, we
may retire the request, only leaving its context alive via the active
barrier. When we reset the GPU on a completed request, we do not modify
its context image (just updating the ring state) and can safely defer
the assertion that we have the image pinned and ready to modify.

Fixes: dffa8feb

 ("drm/i915/perf: Assert locking for i915_init_oa_perf_state()")
Signed-off-by: default avatarChris Wilson <>
Cc: Mika Kuoppala <>
Reviewed-by: default avatarMika Kuoppala <>
parent 6cd02e77
......@@ -2383,7 +2383,6 @@ static void __execlists_reset(struct intel_engine_cs *engine, bool stalled)
/* Proclaim we have exclusive access to the context image! */
mutex_acquire(&ce->pin_mutex.dep_map, 2, 0, _THIS_IP_);
rq = active_request(rq);
......@@ -2432,6 +2431,7 @@ static void __execlists_reset(struct intel_engine_cs *engine, bool stalled)
* future request will be after userspace has had the opportunity
* to recreate its own state.
regs = ce->lrc_reg_state;
if (engine->pinned_default_state) {
memcpy(regs, /* skip restoring the vanilla PPHWSP */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment