@@ -685,6 +685,16 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi)
685
685
if (-- dsi -> refcount != 0 )
686
686
return ;
687
687
688
+ /*
689
+ * mtk_dsi_stop() and mtk_dsi_start() is asymmetric, since
690
+ * mtk_dsi_stop() should be called after mtk_drm_crtc_atomic_disable(),
691
+ * which needs irq for vblank, and mtk_dsi_stop() will disable irq.
692
+ * mtk_dsi_start() needs to be called in mtk_output_dsi_enable(),
693
+ * after dsi is fully set.
694
+ */
695
+ mtk_dsi_stop (dsi );
696
+
697
+ mtk_dsi_switch_to_cmd_mode (dsi , VM_DONE_INT_FLAG , 500 );
688
698
mtk_dsi_reset_engine (dsi );
689
699
mtk_dsi_lane0_ulp_mode_enter (dsi );
690
700
mtk_dsi_clk_ulp_mode_enter (dsi );
@@ -735,17 +745,6 @@ static void mtk_output_dsi_disable(struct mtk_dsi *dsi)
735
745
if (!dsi -> enabled )
736
746
return ;
737
747
738
- /*
739
- * mtk_dsi_stop() and mtk_dsi_start() is asymmetric, since
740
- * mtk_dsi_stop() should be called after mtk_drm_crtc_atomic_disable(),
741
- * which needs irq for vblank, and mtk_dsi_stop() will disable irq.
742
- * mtk_dsi_start() needs to be called in mtk_output_dsi_enable(),
743
- * after dsi is fully set.
744
- */
745
- mtk_dsi_stop (dsi );
746
-
747
- mtk_dsi_switch_to_cmd_mode (dsi , VM_DONE_INT_FLAG , 500 );
748
-
749
748
dsi -> enabled = false;
750
749
}
751
750
@@ -808,10 +807,13 @@ static void mtk_dsi_bridge_atomic_post_disable(struct drm_bridge *bridge,
808
807
809
808
static const struct drm_bridge_funcs mtk_dsi_bridge_funcs = {
810
809
.attach = mtk_dsi_bridge_attach ,
810
+ .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state ,
811
811
.atomic_disable = mtk_dsi_bridge_atomic_disable ,
812
+ .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state ,
812
813
.atomic_enable = mtk_dsi_bridge_atomic_enable ,
813
814
.atomic_pre_enable = mtk_dsi_bridge_atomic_pre_enable ,
814
815
.atomic_post_disable = mtk_dsi_bridge_atomic_post_disable ,
816
+ .atomic_reset = drm_atomic_helper_bridge_reset ,
815
817
.mode_set = mtk_dsi_bridge_mode_set ,
816
818
};
817
819
0 commit comments