[Intel-gfx] [PATCH] drm/i915: fix up locking inconsistency around gem_do_init

Daniel Vetter daniel at ffwll.ch
Thu Jan 26 14:45:17 CET 2012


On Thu, Jan 26, 2012 at 01:42:02PM +0000, Chris Wilson wrote:
> On Thu, 26 Jan 2012 11:41:11 +0100, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> > The locking in our setup and teardown paths is rather arbitrary, but
> > generally we try to protect gem stuff with dev->struct_mutex. Further,
> > the ums/gem ioctl to setup gem _does_ take the look. So fix up this
> > benign inconsistency.
> 
> It is completely arbitrary and only exists to keep lockdep and various
> BUG_ON(mutex_lock) happy. From your reading, we would have a lockdep
> warning with ums/gem?
> 
> The extra little step towards consistency is likely to save a warning
> later, so
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

Actually no lockdep splat to be expected, because gem_do_init is _really_
simple. But maybe we'll extend the gtt_clear stuff in there to be more
involved and this could indeed change. But currently the only reason for
that change is to satisfy my ocd ;-)
-Daniel
-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48



More information about the Intel-gfx mailing list