diff options
Diffstat (limited to 'drivers/gpu/drm/mediatek/mtk_dsi.c')
-rw-r--r-- | drivers/gpu/drm/mediatek/mtk_dsi.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 4a0b9150a7bb..b91c4616644a 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c | |||
@@ -622,6 +622,15 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi) | |||
622 | if (--dsi->refcount != 0) | 622 | if (--dsi->refcount != 0) |
623 | return; | 623 | return; |
624 | 624 | ||
625 | /* | ||
626 | * mtk_dsi_stop() and mtk_dsi_start() is asymmetric, since | ||
627 | * mtk_dsi_stop() should be called after mtk_drm_crtc_atomic_disable(), | ||
628 | * which needs irq for vblank, and mtk_dsi_stop() will disable irq. | ||
629 | * mtk_dsi_start() needs to be called in mtk_output_dsi_enable(), | ||
630 | * after dsi is fully set. | ||
631 | */ | ||
632 | mtk_dsi_stop(dsi); | ||
633 | |||
625 | if (!mtk_dsi_switch_to_cmd_mode(dsi, VM_DONE_INT_FLAG, 500)) { | 634 | if (!mtk_dsi_switch_to_cmd_mode(dsi, VM_DONE_INT_FLAG, 500)) { |
626 | if (dsi->panel) { | 635 | if (dsi->panel) { |
627 | if (drm_panel_unprepare(dsi->panel)) { | 636 | if (drm_panel_unprepare(dsi->panel)) { |
@@ -688,7 +697,6 @@ static void mtk_output_dsi_disable(struct mtk_dsi *dsi) | |||
688 | } | 697 | } |
689 | } | 698 | } |
690 | 699 | ||
691 | mtk_dsi_stop(dsi); | ||
692 | mtk_dsi_poweroff(dsi); | 700 | mtk_dsi_poweroff(dsi); |
693 | 701 | ||
694 | dsi->enabled = false; | 702 | dsi->enabled = false; |
@@ -836,6 +844,8 @@ static void mtk_dsi_destroy_conn_enc(struct mtk_dsi *dsi) | |||
836 | /* Skip connector cleanup if creation was delegated to the bridge */ | 844 | /* Skip connector cleanup if creation was delegated to the bridge */ |
837 | if (dsi->conn.dev) | 845 | if (dsi->conn.dev) |
838 | drm_connector_cleanup(&dsi->conn); | 846 | drm_connector_cleanup(&dsi->conn); |
847 | if (dsi->panel) | ||
848 | drm_panel_detach(dsi->panel); | ||
839 | } | 849 | } |
840 | 850 | ||
841 | static void mtk_dsi_ddp_start(struct mtk_ddp_comp *comp) | 851 | static void mtk_dsi_ddp_start(struct mtk_ddp_comp *comp) |