]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/mediatek: Add pull-down MIPI operation in mtk_dsi_poweroff function
authorXinlei Lee <xinlei.lee@mediatek.com>
Fri, 20 May 2022 02:00:07 +0000 (10:00 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:17:38 +0000 (11:17 +0200)
[ Upstream commit af5cddd581ada55e2ac4c582d15903e7ecb6bafa ]

In the dsi_enable function, mtk_dsi_rxtx_control is to
pull up the MIPI signal operation. Before dsi_disable,
MIPI should also be pulled down by writing a register
instead of disabling dsi.

If disable dsi without pulling the mipi signal low, the value of
the register will still maintain the setting of the mipi signal being
pulled high.
After resume, even if the mipi signal is not pulled high, it will still
be in the high state.

Fixes: 72d7fa4f9495 ("drm/mediatek: Add DSI sub driver")
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/1653012007-11854-5-git-send-email-xinlei.lee@mediatek.com/
Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.com>
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/mediatek/mtk_dsi.c

index 224afb666881c496e11343c8c9264917d3291154..e82705a33acfdb9fb96c216208953c23282a1eaa 100644 (file)
@@ -645,6 +645,8 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi)
        mtk_dsi_reset_engine(dsi);
        mtk_dsi_lane0_ulp_mode_enter(dsi);
        mtk_dsi_clk_ulp_mode_enter(dsi);
+       /* set the lane number as 0 to pull down mipi */
+       writel(0, dsi->regs + DSI_TXRX_CTRL);
 
        mtk_dsi_disable(dsi);