]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/msm/dsi/phy: Toggle back buffer resync after preparing PLL
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tue, 10 Jun 2025 14:05:44 +0000 (16:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:11 +0000 (15:37 -0500)
[ Upstream commit b63f008f395ca5f6bc89123db97440bdc19981c4 ]

According to Hardware Programming Guide for DSI PHY, the retime buffer
resync should be done after PLL clock users (byte_clk and intf_byte_clk)
are enabled.  Downstream also does it as part of configuring the PLL.

Driver was only turning off the resync FIFO buffer, but never bringing it
on again.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/657823/
Link: https://lore.kernel.org/r/20250610-b4-sm8750-display-v6-6-ee633e3ddbff@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c

index 8c98f91a5930c9f2563a6b4824690ceef56987c0..6b765f3fd529a7dbc1d623299a7ec91ab512ff43 100644 (file)
@@ -491,6 +491,10 @@ static int dsi_pll_7nm_vco_prepare(struct clk_hw *hw)
        if (pll_7nm->slave)
                dsi_pll_enable_global_clk(pll_7nm->slave);
 
+       writel(0x1, pll_7nm->phy->base + REG_DSI_7nm_PHY_CMN_RBUF_CTRL);
+       if (pll_7nm->slave)
+               writel(0x1, pll_7nm->slave->phy->base + REG_DSI_7nm_PHY_CMN_RBUF_CTRL);
+
 error:
        return rc;
 }