drm: Used DRM_LEGACY for all legacy functions
Except for nouveau, only legacy drivers need this really. And nouveau is already marked up with DRIVER_KMS_LEGACY_CONTEXT as the special case. I've tried to be careful to leave everything related to modeset still using the DRIVER_MODESET flag. Otherwise it's a direct replacement of !DRIVER_MODESET with DRIVER_LEGACY checks. Also helps readability since fewer negative checks overall. Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Frank Binns <frank.binns@imgtec.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1470251470-30830-2-git-send-email-daniel.vetter@ffwll.ch
This commit is contained in:
@@ -714,9 +714,9 @@ long drm_ioctl(struct file *filp,
|
||||
if (ksize > in_size)
|
||||
memset(kdata + in_size, 0, ksize - in_size);
|
||||
|
||||
/* Enforce sane locking for kms driver ioctls. Core ioctls are
|
||||
/* Enforce sane locking for modern driver ioctls. Core ioctls are
|
||||
* too messy still. */
|
||||
if ((drm_core_check_feature(dev, DRIVER_MODESET) && is_driver_ioctl) ||
|
||||
if ((!drm_core_check_feature(dev, DRIVER_LEGACY) && is_driver_ioctl) ||
|
||||
(ioctl->flags & DRM_UNLOCKED))
|
||||
retcode = func(dev, kdata, file_priv);
|
||||
else {
|
||||
|
Reference in New Issue
Block a user