[Intel-gfx] [PATCH v4 5/5] drm/i915: Solve the GPU reset vs. modeset deadlocks with an rw_semaphore

Chris Wilson chris at chris-wilson.co.uk
Mon Jul 3 08:16:54 UTC 2017


Quoting Daniel Vetter (2017-07-03 09:03:36)
> On Fri, Jun 30, 2017 at 5:39 PM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> >> Yeah, but my point is that this here is an extremely fancy and fragile
> >> (and afaics in this form, incomplete) fix for something that in the past
> >> was fixed much, much simpler. Why do we need this massive amount of
> >> complexity now? Who's asking for all this (we don't even have anyone yet
> >> asking for fully queued atomic commits, much less on gen4)?
> >
> > It was never "fixed", it was always borked; broken by design.
> 
> Hm, what was broken by design in gen3/4 reset? We never bothered to
> resubmit rendering when the gpu died, but besides that I'm not aware
> of a deisgn issue in that logic. We nuked in-flight pageflips (and
> restored those), and we stalled for any pending modesets (grabbing
> locks did that since all modesets where blocking), and that made sure
> the hw was in a consistent state.

KMS reset was taking mutexes within reset without any means of breaking the
inherent deadlock, instead relying on something else to magically fix
it. We only ever engineered around struct_mutex for reset, the remains
of the deadlock upon struct_mutex within modeset is an issue but not the
one causing trouble here.

Please do note the bugs that indicate that even without modeset reset,
hw is not in a consistent state.
-Chris


More information about the Intel-gfx mailing list