From: Gustavo Padovan Date: Thu, 13 Aug 2015 20:06:39 +0000 (-0300) Subject: drm: WARN_ON if a modeset driver uses legacy suspend/resume helpers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bcfe0c0954f3336c44993e5ce444e09ad6087637;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm: WARN_ON if a modeset driver uses legacy suspend/resume helpers Legacy s/r hooks are only used for shadow-attaching drivers, warn when a KMS driver tries to use them. Signed-off-by: Gustavo Padovan Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 53d09a19f7e1..dc93c881f29d 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -566,6 +566,8 @@ struct drm_device *drm_dev_alloc(struct drm_driver *driver, ret = drm_minor_alloc(dev, DRM_MINOR_CONTROL); if (ret) goto err_minors; + + WARN_ON(driver->suspend || driver->resume); } if (drm_core_check_feature(dev, DRIVER_RENDER)) {