]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/mediatek: dpi: Only enable dpi after the bridge is enabled
authorGuillaume Ranquet <granquet@baylibre.com>
Fri, 1 Jul 2022 03:58:44 +0000 (11:58 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Aug 2022 13:15:44 +0000 (15:15 +0200)
[ Upstream commit aed61ef6beb911cc043af0f2f291167663995065 ]

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: 9e629c17aa8d ("drm/mediatek: Add DPI sub driver")
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Tested-by: AngeloGioacchino 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: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/mediatek/mtk_dpi.c

index 554ad60af4e915708c1908022ebd7197b4dd9ce4..c1ae336df68330941f206d1b185b3c14699f0da6 100644 (file)
@@ -397,7 +397,6 @@ static int mtk_dpi_power_on(struct mtk_dpi *dpi)
        if (dpi->pinctrl && dpi->pins_dpi)
                pinctrl_select_state(dpi->pinctrl, dpi->pins_dpi);
 
-       mtk_dpi_enable(dpi);
        return 0;
 
 err_pixel:
@@ -534,6 +533,7 @@ static void mtk_dpi_bridge_enable(struct drm_bridge *bridge)
 
        mtk_dpi_power_on(dpi);
        mtk_dpi_set_display_mode(dpi, &dpi->mode);
+       mtk_dpi_enable(dpi);
 }
 
 static const struct drm_bridge_funcs mtk_dpi_bridge_funcs = {