[Intel-gfx] [PATCH 3/4] drm: Enforce BKL-less ioctls for modern drivers

Daniel Vetter daniel at ffwll.ch
Tue Dec 13 08:39:16 UTC 2016


On Mon, Dec 12, 2016 at 09:50:29AM +0000, Chris Wilson wrote:
> On Sat, Dec 10, 2016 at 10:52:54PM +0100, Daniel Vetter wrote:
> > With the last round of changes all ioctls called by modern drivers now
> > have their own locking. Everything else is only allowed for legacy
> > drivers and hence the lack of locking doesn't matter.
> > 
> > One exception is nouveau, due to the DRIVER_KMS_LEGACY_CONTEXT flag.
> > But that only works its magic on the context and bufs ioctls. And
> > drm_bufs.c is protected with dev->struct_mutex, and drm_context.c by
> > the same and dev->ctxlist_mutex. That should be all safe, and we can
> > finally mandata drm-bkl-less ioctls for everyone!
> > 
> > Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> 
> Meh, I'd much rather if this was just data driven rather than overriding
> based on its own rules. However, it is a small simple step cleaning up
> after the core changes, so in that regard
> 
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
> 
> I'd just rather see DRM_GLOBAL_LOCK instead.

Yeah, same idea, but functional change first, then the large-scale
prettification.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list