[PATCH 2/2] drm/imx: parallel-display: detach bridge or panel on unbind

Philipp Zabel p.zabel at pengutronix.de
Mon Aug 29 09:50:36 UTC 2016


Don't leave any bridge or panel attached to a stale driver instance
when unbinding, to allow reattachment on a rebind.

Signed-off-by: Philipp Zabel <p.zabel at pengutronix.de>
---
 drivers/gpu/drm/imx/parallel-display.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/imx/parallel-display.c b/drivers/gpu/drm/imx/parallel-display.c
index f203337..d796ada 100644
--- a/drivers/gpu/drm/imx/parallel-display.c
+++ b/drivers/gpu/drm/imx/parallel-display.c
@@ -293,6 +293,11 @@ static void imx_pd_unbind(struct device *dev, struct device *master,
 {
 	struct imx_parallel_display *imxpd = dev_get_drvdata(dev);
 
+	if (imxpd->bridge)
+		drm_bridge_detach(imxpd->bridge);
+	if (imxpd->panel)
+		drm_panel_detach(imxpd->panel);
+
 	kfree(imxpd->edid);
 }
 
-- 
2.8.1



More information about the dri-devel mailing list