Stable Archive mirror
 help / color / mirror / Atom feed
* [PATCH for-v6.1.y+] drm/msm/dsi: Enable runtime PM
@ 2024-01-30 13:46 Amit Pundir
  2024-01-31 20:19 ` Luca Weiss
  2024-02-03  1:26 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Amit Pundir @ 2024-01-30 13:46 UTC (permalink / raw
  To: Greg KH, Sasha Levin, Konrad Dybcio, Dmitry Baryshkov; +Cc: Stable

From: Konrad Dybcio <konrad.dybcio@linaro.org>

[ 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>
---
Fixes display regression on DB845c running v6.1.75, v6.6.14 and v6.7.2.

 drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
index 62bc3756f2e2..c0bcf020ef66 100644
--- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
+++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
@@ -673,6 +673,10 @@ static int dsi_phy_driver_probe(struct platform_device *pdev)
 		return dev_err_probe(dev, PTR_ERR(phy->ahb_clk),
 				     "Unable to get ahb clk\n");
 
+	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.
 	 */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH for-v6.1.y+] drm/msm/dsi: Enable runtime PM
  2024-01-30 13:46 [PATCH for-v6.1.y+] drm/msm/dsi: Enable runtime PM Amit Pundir
@ 2024-01-31 20:19 ` Luca Weiss
  2024-02-03  1:26 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Luca Weiss @ 2024-01-31 20:19 UTC (permalink / raw
  To: Greg KH, Sasha Levin, Konrad Dybcio, Dmitry Baryshkov,
	Amit Pundir; +Cc: Stable

On Dienstag, 30. Jänner 2024 14:46:47 CET Amit Pundir wrote:
> From: Konrad Dybcio <konrad.dybcio@linaro.org>
> 
> [ 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@linar
> o.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>
> ---
> Fixes display regression on DB845c running v6.1.75, v6.6.14 and v6.7.2.

Can confirm this fixes display on qcom-msm8226 on v6.7.2.

Not sure if it's appropriate for -stable but:

Tested-by: Luca Weiss <luca@z3ntu.xyz>

Regards
Luca

> 
>  drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
> b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c index 62bc3756f2e2..c0bcf020ef66
> 100644
> --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
> +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
> @@ -673,6 +673,10 @@ static int dsi_phy_driver_probe(struct platform_device
> *pdev) return dev_err_probe(dev, PTR_ERR(phy->ahb_clk),
>  				     "Unable to get ahb clk\n");
> 
> +	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.
>  	 */





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH for-v6.1.y+] drm/msm/dsi: Enable runtime PM
  2024-01-30 13:46 [PATCH for-v6.1.y+] drm/msm/dsi: Enable runtime PM Amit Pundir
  2024-01-31 20:19 ` Luca Weiss
@ 2024-02-03  1:26 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2024-02-03  1:26 UTC (permalink / raw
  To: Amit Pundir; +Cc: Sasha Levin, Konrad Dybcio, Dmitry Baryshkov, Stable

On Tue, Jan 30, 2024 at 07:16:47PM +0530, Amit Pundir wrote:
> From: Konrad Dybcio <konrad.dybcio@linaro.org>
> 
> [ 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>
> ---
> Fixes display regression on DB845c running v6.1.75, v6.6.14 and v6.7.2.

Now queued up, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-03  1:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-30 13:46 [PATCH for-v6.1.y+] drm/msm/dsi: Enable runtime PM Amit Pundir
2024-01-31 20:19 ` Luca Weiss
2024-02-03  1:26 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).