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:
@@ -92,7 +92,7 @@ static int drm_setup(struct drm_device * dev)
|
||||
int ret;
|
||||
|
||||
if (dev->driver->firstopen &&
|
||||
!drm_core_check_feature(dev, DRIVER_MODESET)) {
|
||||
drm_core_check_feature(dev, DRIVER_LEGACY)) {
|
||||
ret = dev->driver->firstopen(dev);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
@@ -346,7 +346,7 @@ void drm_lastclose(struct drm_device * dev)
|
||||
dev->driver->lastclose(dev);
|
||||
DRM_DEBUG("driver lastclose completed\n");
|
||||
|
||||
if (!drm_core_check_feature(dev, DRIVER_MODESET))
|
||||
if (drm_core_check_feature(dev, DRIVER_LEGACY))
|
||||
drm_legacy_dev_reinit(dev);
|
||||
}
|
||||
|
||||
@@ -389,7 +389,7 @@ int drm_release(struct inode *inode, struct file *filp)
|
||||
(long)old_encode_dev(file_priv->minor->kdev->devt),
|
||||
dev->open_count);
|
||||
|
||||
if (!drm_core_check_feature(dev, DRIVER_MODESET))
|
||||
if (drm_core_check_feature(dev, DRIVER_LEGACY))
|
||||
drm_legacy_lock_release(dev, filp);
|
||||
|
||||
if (drm_core_check_feature(dev, DRIVER_HAVE_DMA))
|
||||
|
مرجع در شماره جدید
Block a user