[PATCH 02/20] drm/mediatek: dsi: provide LP-11 mode during .pre_enable
Michael Walle
mwalle at kernel.org
Mon May 6 06:34:31 PDT 2024
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 at kernel.org>
---
drivers/gpu/drm/mediatek/mtk_dsi.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index c255559cc56e..ed45c9cc3137 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -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,
--
2.39.2
More information about the linux-arm-kernel
mailing list