Skip to contentSkip to conversation

drm/exynos: remove legacy ->suspend()/resume()

PATCH In review Gustavo Padovan 2 participants 5 messages Aug 13, 2015 – Aug 26, 2015

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/exynos: remove legacy ->suspend()/resume()

From: Gustavo Padovan <[email protected]>

These legacy helpers should only be used by shadow-attaching drivers. KMS drivers has its own way to handle suspend/resume and don't need to use these two helpers.

---
 drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_drv.c +0 -2
index f1d6966..9bcf679 100644
@@ -280,8 +280,6 @@ static struct drm_driver exynos_drm_driver = {
 	.driver_features	= DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME,
 	.load			= exynos_drm_load,
 	.unload			= exynos_drm_unload,
-	.suspend		= exynos_drm_suspend,
-	.resume			= exynos_drm_resume,
 	.open			= exynos_drm_open,
 	.preclose		= exynos_drm_preclose,
 	.lastclose		= exynos_drm_lastclose,
Signature · 1 line
2.1.0
#1 lore raw

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

From: Gustavo Padovan <[email protected]>

Legacy s/r hooks are only used for shadow-attaching drivers, warn when a KMS driver tries to use them.

---
 drivers/gpu/drm/drm_drv.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/drm_drv.c +2 -0
index b7bf4ce..4e76193 100644
@@ -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)) {
Signature · 1 line
2.1.0
#2 lore raw

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

Quoted 6 lines · Gustavo Padovan

From: Gustavo Padovan <[email protected]>

Legacy s/r hooks are only used for shadow-attaching drivers, warn when a KMS driver tries to use them.

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

Thanks, Daniel

Quoted 20 lines
---
 drivers/gpu/drm/drm_drv.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/drm_drv.c +2 -0
index b7bf4ce..4e76193 100644
@@ -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)) {
Signature · 1 line
2.1.0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw
In reply to Gustavo Padovan

Hi,

What about this patch? We need it to avoid the WARN_ON added by patch 2/2 that was already picked up by Daniel.

Gustavo

2015-08-13 Gustavo Padovan <[email protected]>:

Quoted 27 lines

From: Gustavo Padovan <[email protected]>

These legacy helpers should only be used by shadow-attaching drivers. KMS drivers has its own way to handle suspend/resume and don't need to use these two helpers.

---
 drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_drv.c +0 -2
index f1d6966..9bcf679 100644
@@ -280,8 +280,6 @@ static struct drm_driver exynos_drm_driver = {
 	.driver_features	= DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME,
 	.load			= exynos_drm_load,
 	.unload			= exynos_drm_unload,
-	.suspend		= exynos_drm_suspend,
-	.resume			= exynos_drm_resume,
 	.open			= exynos_drm_open,
 	.preclose		= exynos_drm_preclose,
 	.lastclose		= exynos_drm_lastclose,
Signature · 1 line
2.1.0
#4 lore raw
Quoted 4 lines · Gustavo Padovan

Hi,

What about this patch? We need it to avoid the WARN_ON added by patch 2/2 that was already picked up by Daniel.

That patch is only for 4.4, so not too time critical to get the exynos one in. But might be good to get it into 4.3.
-Daniel

Quoted 32 lines

Gustavo

2015-08-13 Gustavo Padovan <[email protected]>:

Quoted 27 lines

From: Gustavo Padovan <[email protected]>

These legacy helpers should only be used by shadow-attaching drivers. KMS drivers has its own way to handle suspend/resume and don't need to use these two helpers.

---
 drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_drv.c +0 -2
index f1d6966..9bcf679 100644
@@ -280,8 +280,6 @@ static struct drm_driver exynos_drm_driver = {
 	.driver_features	= DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME,
 	.load			= exynos_drm_load,
 	.unload			= exynos_drm_unload,
-	.suspend		= exynos_drm_suspend,
-	.resume			= exynos_drm_resume,
 	.open			= exynos_drm_open,
 	.preclose		= exynos_drm_preclose,
 	.lastclose		= exynos_drm_lastclose,
Signature · 1 line
2.1.0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel