[PATCH 7/8] drm: convert crtc and connection_mutex to ww_mutex (v3)

Daniel Vetter daniel at ffwll.ch
Wed Jun 4 02:21:09 PDT 2014


On Wed, Jun 04, 2014 at 01:38:38PM +1000, Dave Airlie wrote:
> On 3 June 2014 23:29, Daniel Vetter <daniel at ffwll.ch> wrote:
> > On Fri, May 30, 2014 at 01:12:09PM -0400, Rob Clark wrote:
> >> For atomic, it will be quite necessary to not need to care so much
> >> about locking order.  And 'state' gives us a convenient place to stash a
> >> ww_ctx for any sort of update that needs to grab multiple crtc locks.
> >>
> >> Because we will want to eventually make locking even more fine grained
> >> (giving locks to planes, connectors, etc), split out drm_modeset_lock
> >> and drm_modeset_acquire_ctx to track acquired locks.
> >>
> >> Atomic will use this to keep track of which locks have been acquired
> >> in a transaction.
> >>
> >> v1: original
> >> v2: remove a few things not needed until atomic, for now
> >> v3: update for v3 of connection_mutex patch..
> >>
> >> Signed-off-by: Rob Clark <robdclark at gmail.com>
> >
> > Still meh about the lock_all_crtcs helper, imo that one should die. But
> > one todo you've missed from my fixup patch is to add kerneldoc for all the
> > locking helpers (maybe that convinces you to inline lock_all_crtcs ;-) and
> > pull it into the drm docbook template. Otherwise nothing stuck out any
> > more.
> 
> I'm happy to apply this one if we get some kerneldoc into it.
> 
> I've applied the previous patches to drm-next, there was one conflict in i915,
> but I think I fixed it up okay, f7ef3fa77fa85b3a8a15b464efd56d0314a3231c
> was what it was conflicting with.

Yeah, I've done the modeset_lock_all specifically because of that
conflict, so looks good. Could have dropped the braces too ;-)
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the dri-devel mailing list