drm/mediatek: Modify dpi power on/off sequence.
[ Upstream commitff446c0f62
] Modify dpi power on/off sequence so that the first gpio operation will take effect. Fixes:6bd4763fd5
("drm/mediatek: set dpi pin mode to gpio low to avoid leakage current") Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.com> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6d25bc6370
commit
a06ba0f7f8
@ -387,9 +387,6 @@ static void mtk_dpi_power_off(struct mtk_dpi *dpi)
|
|||||||
if (--dpi->refcount != 0)
|
if (--dpi->refcount != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (dpi->pinctrl && dpi->pins_gpio)
|
|
||||||
pinctrl_select_state(dpi->pinctrl, dpi->pins_gpio);
|
|
||||||
|
|
||||||
mtk_dpi_disable(dpi);
|
mtk_dpi_disable(dpi);
|
||||||
clk_disable_unprepare(dpi->pixel_clk);
|
clk_disable_unprepare(dpi->pixel_clk);
|
||||||
clk_disable_unprepare(dpi->engine_clk);
|
clk_disable_unprepare(dpi->engine_clk);
|
||||||
@ -414,9 +411,6 @@ static int mtk_dpi_power_on(struct mtk_dpi *dpi)
|
|||||||
goto err_pixel;
|
goto err_pixel;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dpi->pinctrl && dpi->pins_dpi)
|
|
||||||
pinctrl_select_state(dpi->pinctrl, dpi->pins_dpi);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_pixel:
|
err_pixel:
|
||||||
@ -630,12 +624,18 @@ static void mtk_dpi_bridge_disable(struct drm_bridge *bridge)
|
|||||||
struct mtk_dpi *dpi = bridge_to_dpi(bridge);
|
struct mtk_dpi *dpi = bridge_to_dpi(bridge);
|
||||||
|
|
||||||
mtk_dpi_power_off(dpi);
|
mtk_dpi_power_off(dpi);
|
||||||
|
|
||||||
|
if (dpi->pinctrl && dpi->pins_gpio)
|
||||||
|
pinctrl_select_state(dpi->pinctrl, dpi->pins_gpio);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mtk_dpi_bridge_enable(struct drm_bridge *bridge)
|
static void mtk_dpi_bridge_enable(struct drm_bridge *bridge)
|
||||||
{
|
{
|
||||||
struct mtk_dpi *dpi = bridge_to_dpi(bridge);
|
struct mtk_dpi *dpi = bridge_to_dpi(bridge);
|
||||||
|
|
||||||
|
if (dpi->pinctrl && dpi->pins_dpi)
|
||||||
|
pinctrl_select_state(dpi->pinctrl, dpi->pins_dpi);
|
||||||
|
|
||||||
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);
|
mtk_dpi_enable(dpi);
|
||||||
|
Reference in New Issue
Block a user