Skip to contentSkip to conversation

drm: mxsfb: Shutdown the display on system shutdown

PATCH In review Marek Vasut 2 participants 2 messages Jan 1, 2022

Subsystems (4)
lore
Share & tools
lore

Marek Vasut

author maintainer
#0 lore raw

PATCH 1/1 drm: mxsfb: Shutdown the display on system shutdown

When the system shuts down or warm reboots, the display may be active. Implement the platform_driver .shutdown() operation and shut down the display.

Cc Daniel Vetter <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Lucas Stach <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Stefan Agner <[email protected]>
Cc Thomas Zimmermann <[email protected]>
---
 drivers/gpu/drm/mxsfb/mxsfb_drv.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/mxsfb/mxsfb_drv.c +8 -0
index 6d7a3aeff50b0..375f26d4a4172 100644
@@ -381,6 +381,13 @@ static int mxsfb_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static void mxsfb_shutdown(struct platform_device *pdev)
+{
+	struct drm_device *drm = platform_get_drvdata(pdev);
+
+	drm_atomic_helper_shutdown(drm);
+}
+
 #ifdef CONFIG_PM_SLEEP
 static int mxsfb_suspend(struct device *dev)
 {
@@ -404,6 +411,7 @@ static const struct dev_pm_ops mxsfb_pm_ops = {
 static struct platform_driver mxsfb_platform_driver = {
 	.probe		= mxsfb_probe,
 	.remove		= mxsfb_remove,
+	.shutdown	= mxsfb_shutdown,
 	.driver	= {
 		.name		= "mxsfb",
 		.of_match_table	= mxsfb_dt_ids,
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

Hi Marek,

Thank you for the patch.

Quoted 11 lines · Marek Vasut

When the system shuts down or warm reboots, the display may be active. Implement the platform_driver .shutdown() operation and shut down the display.

Cc Daniel Vetter <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Lucas Stach <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Stefan Agner <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Quoted 30 lines
---
 drivers/gpu/drm/mxsfb/mxsfb_drv.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/mxsfb/mxsfb_drv.c +8 -0
index 6d7a3aeff50b0..375f26d4a4172 100644
@@ -381,6 +381,13 @@ static int mxsfb_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static void mxsfb_shutdown(struct platform_device *pdev)
+{
+	struct drm_device *drm = platform_get_drvdata(pdev);
+
+	drm_atomic_helper_shutdown(drm);
+}
+
 #ifdef CONFIG_PM_SLEEP
 static int mxsfb_suspend(struct device *dev)
 {
@@ -404,6 +411,7 @@ static const struct dev_pm_ops mxsfb_pm_ops = {
 static struct platform_driver mxsfb_platform_driver = {
 	.probe		= mxsfb_probe,
 	.remove		= mxsfb_remove,
+	.shutdown	= mxsfb_shutdown,
 	.driver	= {
 		.name		= "mxsfb",
 		.of_match_table	= mxsfb_dt_ids,
Signature · 3 lines
Regards,

Laurent Pinchart