[Intel-gfx] [PATCH] drm/i915: Break modeset deadlocks on reset

Chris Wilson chris at chris-wilson.co.uk
Wed Jun 21 12:40:39 UTC 2017


Quoting Chris Wilson (2017-06-21 12:46:51)
> Quoting Tvrtko Ursulin (2017-06-21 12:30:15)
> > 
> > On 20/06/2017 20:55, Chris Wilson wrote:
> > > +     i915_gem_set_wedged(w->i915);
> > 
> > Is it safe to do the execlist_port manipulation at this point? Couldn't 
> > we receive an interrupt for one request completing after we have cleared 
> > it from ports but before the actual reset?
> 
> We do the port manipulation and queue cancellation inside stop_machine,
> i.e. in complete isolation. That ensures we won't succumb to a race
> there, we just have to be careful that the execlists cancellation works
> once the machine process the interrupts afterwards. That I'm not sure
> about...

I got very worried, but then remembered we installed a filter on the
intel_lrc_irq_handler; that is we don't call into the irq handler unless
port[0] is set. So we should not get an extra call between the
stop_machine() and the actual reset, but I suppose we might get a
conitinuation of a tasklet? I doubt it, but adding a clear_bit to
i915_gem_set_wedged would alleviate that concern.

I'm happier, but randomly calling i915_gem_set_wedged() is definitely
undertested (just gem_eio tries), it is and always has been meant as a
last resort to keep the driver limping along.
-Chris


More information about the Intel-gfx mailing list