提交 314c8683 编写于 作者: G Guillaume Ranquet 提交者: Zheng Zengkai

drm/mediatek: dpi: Only enable dpi after the bridge is enabled

stable inclusion
from stable-v5.10.137
commit 8bb0be3186b1da884895aa8db84e475613a6b053
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I60PLB

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8bb0be3186b1da884895aa8db84e475613a6b053

--------------------------------

[ Upstream commit aed61ef6 ]

Enabling the dpi too early causes glitches on screen.

Move the call to mtk_dpi_enable() at the end of the bridge_enable
callback to ensure everything is setup properly before enabling dpi.

Fixes: 9e629c17 ("drm/mediatek: Add DPI sub driver")
Signed-off-by: NGuillaume Ranquet <granquet@baylibre.com>
Signed-off-by: NBo-Chen Chen <rex-bc.chen@mediatek.com>
Tested-by: NAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-16-rex-bc.chen@mediatek.com/Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
上级 c20bbaca
...@@ -397,7 +397,6 @@ static int mtk_dpi_power_on(struct mtk_dpi *dpi) ...@@ -397,7 +397,6 @@ static int mtk_dpi_power_on(struct mtk_dpi *dpi)
if (dpi->pinctrl && dpi->pins_dpi) if (dpi->pinctrl && dpi->pins_dpi)
pinctrl_select_state(dpi->pinctrl, dpi->pins_dpi); pinctrl_select_state(dpi->pinctrl, dpi->pins_dpi);
mtk_dpi_enable(dpi);
return 0; return 0;
err_pixel: err_pixel:
...@@ -534,6 +533,7 @@ static void mtk_dpi_bridge_enable(struct drm_bridge *bridge) ...@@ -534,6 +533,7 @@ static void mtk_dpi_bridge_enable(struct drm_bridge *bridge)
mtk_dpi_power_on(dpi); mtk_dpi_power_on(dpi);
mtk_dpi_set_display_mode(dpi, &dpi->mode); mtk_dpi_set_display_mode(dpi, &dpi->mode);
mtk_dpi_enable(dpi);
} }
static const struct drm_bridge_funcs mtk_dpi_bridge_funcs = { static const struct drm_bridge_funcs mtk_dpi_bridge_funcs = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册