]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/mediatek: fix unbind functions
authorHsin-Yi Wang <hsinyi@chromium.org>
Wed, 29 May 2019 10:25:52 +0000 (18:25 +0800)
committerCK Hu <ck.hu@mediatek.com>
Tue, 4 Jun 2019 01:27:59 +0000 (09:27 +0800)
detatch panel in mtk_dsi_destroy_conn_enc(), since .bind will try to
attach it again.

Fixes: 2e54c14e310f ("drm/mediatek: Add DSI sub driver")
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Signed-off-by: CK Hu <ck.hu@mediatek.com>
drivers/gpu/drm/mediatek/mtk_dsi.c

index b00eb2d2e086c69a0bdb043bc6c524327c6a9a1f..1ae3be99e0ffed255ac27d4c27506c908e82e84f 100644 (file)
@@ -844,6 +844,8 @@ static void mtk_dsi_destroy_conn_enc(struct mtk_dsi *dsi)
        /* Skip connector cleanup if creation was delegated to the bridge */
        if (dsi->conn.dev)
                drm_connector_cleanup(&dsi->conn);
+       if (dsi->panel)
+               drm_panel_detach(dsi->panel);
 }
 
 static void mtk_dsi_ddp_start(struct mtk_ddp_comp *comp)