Skip to contentSkip to conversation

drm: mxsfb: Shutdown the display on remove

PATCH In review Marek Vasut 2 participants 2 messages Dec 31, 2021

Subsystems (4)
lore
Share & tools
lore

Marek Vasut

author maintainer
#0 lore raw

PATCH 1/1 drm: mxsfb: Shutdown the display on remove

When the device is unbound from the driver, the display may be active. Make sure it gets shut down.

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 | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/mxsfb/mxsfb_drv.c +1 -0
index 86d78634a9799..6d7a3aeff50b0 100644
@@ -374,6 +374,7 @@ static int mxsfb_remove(struct platform_device *pdev)
 	struct drm_device *drm = platform_get_drvdata(pdev);
 
 	drm_dev_unregister(drm);
+	drm_atomic_helper_shutdown(drm);
 	mxsfb_unload(drm);
 	drm_dev_put(drm);
 
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

Hi Marek,

Thank you for the patch.

Quoted 19 lines · Marek Vasut

When the device is unbound from the driver, the display may be active. Make sure it gets shut down.

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 | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/mxsfb/mxsfb_drv.c +0 -0
index 86d78634a9799..6d7a3aeff50b0 100644

drivers/gpu/drm/mxsfb/mxsfb_drv.c static int mxsfb_remove(struct platform_device *pdev) · line 377

Quoted 4 lines
drivers/gpu/drm/mxsfb/mxsfb_drv.c +1 -0
@@ -374,6 +374,7 @@ static int mxsfb_remove(struct platform_device *pdev)
 	struct drm_device *drm = platform_get_drvdata(pdev);
 
 	drm_dev_unregister(drm);
+	drm_atomic_helper_shutdown(drm);

That looks reasonable. While at it, should you also implement the .shutdown driver operation ?

Quoted 3 lines
drivers/gpu/drm/mxsfb/mxsfb_drv.c +0 -0
 	mxsfb_unload(drm);
 	drm_dev_put(drm);
 
Signature · 3 lines
Regards,

Laurent Pinchart