]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/msm/dsi: Enable runtime PM
authorKonrad Dybcio <konrad.dybcio@linaro.org>
Tue, 30 Jan 2024 12:46:30 +0000 (18:16 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 07:42:32 +0000 (08:42 +0100)
[ Upstream commit 6ab502bc1cf3147ea1d8540d04b83a7a4cb6d1f1 ]

Some devices power the DSI PHY/PLL through a power rail that we model
as a GENPD. Enable runtime PM to make it suspendable.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/543352/
Link: https://lore.kernel.org/r/20230620-topic-dsiphy_rpm-v2-2-a11a751f34f0@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Stable-dep-of: 3d07a411b4fa ("drm/msm/dsi: Use pm_runtime_resume_and_get to prevent refcnt leaks")
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/msm/dsi/phy/dsi_phy.c

index 10eacfd95fb1ceb5922b241bc2e204ce95c64173..b49135f38583a6f24f3eb66adb15cb083eaa6957 100644 (file)
@@ -710,6 +710,10 @@ static int dsi_phy_driver_probe(struct platform_device *pdev)
                        goto fail;
        }
 
+       ret = devm_pm_runtime_enable(&pdev->dev);
+       if (ret)
+               return ret;
+
        /* PLL init will call into clk_register which requires
         * register access, so we need to enable power and ahb clock.
         */