@@ -711,8 +711,6 @@ static void mtk_output_dsi_enable(struct mtk_dsi *dsi)
mtk_dsi_set_mode(dsi);
mtk_dsi_clk_hs_mode(dsi, 1);
- mtk_dsi_start(dsi);
-
dsi->enabled = true;
}
@@ -759,7 +757,7 @@ static void mtk_dsi_bridge_atomic_enable(struct drm_bridge *bridge,
if (dsi->refcount == 0)
return;
- mtk_output_dsi_enable(dsi);
+ mtk_dsi_start(dsi);
}
static void mtk_dsi_bridge_atomic_pre_enable(struct drm_bridge *bridge,
@@ -771,6 +769,9 @@ static void mtk_dsi_bridge_atomic_pre_enable(struct drm_bridge *bridge,
ret = mtk_dsi_poweron(dsi);
if (ret < 0)
DRM_ERROR("failed to power on dsi\n");
+
+ /* Enter LP-11 state */
+ mtk_output_dsi_enable(dsi);
}
static void mtk_dsi_bridge_atomic_post_disable(struct drm_bridge *bridge,
As per specification in drivers/gpu/drm/drm_bridge.c the data lanes should be in LP-11 mode after .pre_enable() has been run. HS mode of the data lanes are enabled with mtk_dsi_start(). Therefore, move that call to the .enable() callback. Signed-off-by: Michael Walle <mwalle@kernel.org> --- drivers/gpu/drm/mediatek/mtk_dsi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)