aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_sysfs.c')
-rw-r--r--drivers/gpu/drm/drm_sysfs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index 5aa6780652aa..480546b542fe 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -35,7 +35,9 @@ static int drm_sysfs_suspend(struct device *dev, pm_message_t state)
35 struct drm_minor *drm_minor = to_drm_minor(dev); 35 struct drm_minor *drm_minor = to_drm_minor(dev);
36 struct drm_device *drm_dev = drm_minor->dev; 36 struct drm_device *drm_dev = drm_minor->dev;
37 37
38 if (drm_minor->type == DRM_MINOR_LEGACY && drm_dev->driver->suspend) 38 if (drm_minor->type == DRM_MINOR_LEGACY &&
39 !drm_core_check_feature(drm_dev, DRIVER_MODESET) &&
40 drm_dev->driver->suspend)
39 return drm_dev->driver->suspend(drm_dev, state); 41 return drm_dev->driver->suspend(drm_dev, state);
40 42
41 return 0; 43 return 0;
@@ -53,7 +55,9 @@ static int drm_sysfs_resume(struct device *dev)
53 struct drm_minor *drm_minor = to_drm_minor(dev); 55 struct drm_minor *drm_minor = to_drm_minor(dev);
54 struct drm_device *drm_dev = drm_minor->dev; 56 struct drm_device *drm_dev = drm_minor->dev;
55 57
56 if (drm_minor->type == DRM_MINOR_LEGACY && drm_dev->driver->resume) 58 if (drm_minor->type == DRM_MINOR_LEGACY &&
59 !drm_core_check_feature(drm_dev, DRIVER_MODESET) &&
60 drm_dev->driver->resume)
57 return drm_dev->driver->resume(drm_dev); 61 return drm_dev->driver->resume(drm_dev);
58 62
59 return 0; 63 return 0;