[Intel-gfx] [PATCH] drm: Make each driver's struct_mutex its own subclass
Chris Wilson
chris at chris-wilson.co.uk
Sat Dec 10 21:23:35 UTC 2016
On Sat, Dec 10, 2016 at 10:19:30PM +0100, Daniel Vetter wrote:
> On Fri, Dec 09, 2016 at 04:52:32PM +0000, Chris Wilson wrote:
> > With prime, we are running into false circular dependencies based on the
> > order in which two drivers may lock their own struct_mutex wrt to a
> > common lock (like the reservation->lock). Work around this by adding the
> > lock_class_key to the struct drm_driver such that each driver can have
> > its own subclass of struct_mutex. Circular dependencies between drivers
> > will now be ignored, but real circular dependencies on any one mutex
> > will still be caught. A driver creating more than one device will still
> > need to be careful!
> >
> > Reported-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de>
> > Reported-by: Hans de Goede <hdegoede at redhat.com>
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
>
> Where does this even happen? i915, msm and udl are the only drivers left
> over that do struct_mutex, and i915 can't really share buffers with msm,
> and udl doesn't do reservations. How exactly does this still go boom in
> latest upstream?
How about cc: stable?
The reports are nouveau vs i915. I was quite pleased with the
drm_driver_class!
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list