diff mbox

[2/2] drm: WARN_ON if a modeset driver uses legacy suspend/resume helpers

Message ID 1439496399-25791-2-git-send-email-gustavo@padovan.org (mailing list archive)
State New, archived
Headers show

Commit Message

Gustavo Padovan Aug. 13, 2015, 8:06 p.m. UTC
From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

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 <gustavo.padovan@collabora.co.uk>
---
 drivers/gpu/drm/drm_drv.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Daniel Vetter Aug. 13, 2015, 9:19 p.m. UTC | #1
On Thu, Aug 13, 2015 at 05:06:39PM -0300, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> 
> 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 <gustavo.padovan@collabora.co.uk>

Assuming that Inki picks up the exynos patch I've applied this to
drm-misc.

Thanks, Daniel

> ---
>  drivers/gpu/drm/drm_drv.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index b7bf4ce..4e76193 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -567,6 +567,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)) {
> -- 
> 2.1.0
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index b7bf4ce..4e76193 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -567,6 +567,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)) {