[PATCH 1/2] drm/imx: imx-ldb: detach bridge on unbind

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


Don't leave the bridge 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/imx-ldb.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c
index 33a7613..b300998 100644
--- a/drivers/gpu/drm/imx/imx-ldb.c
+++ b/drivers/gpu/drm/imx/imx-ldb.c
@@ -745,6 +745,8 @@ static void imx_ldb_unbind(struct device *dev, struct device *master,
 	for (i = 0; i < 2; i++) {
 		struct imx_ldb_channel *channel = &imx_ldb->channel[i];
 
+		if (channel->bridge)
+			drm_bridge_detach(channel->bridge);
 		if (channel->panel)
 			drm_panel_detach(channel->panel);
 
-- 
2.8.1



More information about the dri-devel mailing list