* [Patch v3 ] drm/msm/dpu: Correct dpu destroy and disable order
@ 2018-11-19 6:25 Jayant Shekhar
2018-11-19 8:32 ` Rajendra Nayak
2018-12-02 2:24 ` Jeykumar Sankaran
0 siblings, 2 replies; 3+ messages in thread
From: Jayant Shekhar @ 2018-11-19 6:25 UTC (permalink / raw)
To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
devicetree-u79uwXL29TY76Z2rM5mHXA
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
abhinavk-sgV2jX0FEOL9JmXXK+q4OQ, Jayant Shekhar,
robdclark-Re5JQEeQqe8AvxtiuMwx3w, nganji-sgV2jX0FEOL9JmXXK+q4OQ,
seanpaul-F7+t8E8rja9g9hUCZPvPmw, hoegsberg-F7+t8E8rja9g9hUCZPvPmw,
jsanka-sgV2jX0FEOL9JmXXK+q4OQ, chandanu-sgV2jX0FEOL9JmXXK+q4OQ
In case of msm drm bind failure, pm runtime put sync
is called from dsi driver which issues an asynchronous
put on mdss device. Subsequently when dpu_mdss_destroy
is triggered the change will make sure to put the mdss
device in suspend and clearing pending work if not
scheduled.
Changes in v2:
- Removed double spacings [Jeykumar]
Changes in v3:
- Fix clock on issue during bootup [Rajendra]
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c
index fd9c893..df8127b 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c
@@ -156,18 +156,16 @@ static void dpu_mdss_destroy(struct drm_device *dev)
struct dpu_mdss *dpu_mdss = to_dpu_mdss(priv->mdss);
struct dss_module_power *mp = &dpu_mdss->mp;
+ pm_runtime_suspend(dev->dev);
+ pm_runtime_disable(dev->dev);
_dpu_mdss_irq_domain_fini(dpu_mdss);
-
free_irq(platform_get_irq(pdev, 0), dpu_mdss);
-
msm_dss_put_clk(mp->clk_config, mp->num_clk);
devm_kfree(&pdev->dev, mp->clk_config);
if (dpu_mdss->mmio)
devm_iounmap(&pdev->dev, dpu_mdss->mmio);
dpu_mdss->mmio = NULL;
-
- pm_runtime_disable(dev->dev);
priv->mdss = NULL;
}
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Patch v3 ] drm/msm/dpu: Correct dpu destroy and disable order
2018-11-19 6:25 [Patch v3 ] drm/msm/dpu: Correct dpu destroy and disable order Jayant Shekhar
@ 2018-11-19 8:32 ` Rajendra Nayak
2018-12-02 2:24 ` Jeykumar Sankaran
1 sibling, 0 replies; 3+ messages in thread
From: Rajendra Nayak @ 2018-11-19 8:32 UTC (permalink / raw)
To: Jayant Shekhar, dri-devel, linux-arm-msm, freedreno, devicetree
Cc: linux-kernel, robdclark, seanpaul, hoegsberg, abhinavk, jsanka,
chandanu, nganji
On 11/19/2018 11:55 AM, Jayant Shekhar wrote:
> In case of msm drm bind failure, pm runtime put sync
> is called from dsi driver which issues an asynchronous
> put on mdss device. Subsequently when dpu_mdss_destroy
> is triggered the change will make sure to put the mdss
> device in suspend and clearing pending work if not
> scheduled.
>
> Changes in v2:
> - Removed double spacings [Jeykumar]
>
> Changes in v3:
> - Fix clock on issue during bootup [Rajendra]
>
> Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
So I no longer see the clock usecount mismatch with this patch now,
that I had earlier reported with the v2.
Tested-by: Rajendra Nayak <rnayak@codeaurora.org>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c
> index fd9c893..df8127b 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c
> @@ -156,18 +156,16 @@ static void dpu_mdss_destroy(struct drm_device *dev)
> struct dpu_mdss *dpu_mdss = to_dpu_mdss(priv->mdss);
> struct dss_module_power *mp = &dpu_mdss->mp;
>
> + pm_runtime_suspend(dev->dev);
> + pm_runtime_disable(dev->dev);
> _dpu_mdss_irq_domain_fini(dpu_mdss);
> -
> free_irq(platform_get_irq(pdev, 0), dpu_mdss);
> -
> msm_dss_put_clk(mp->clk_config, mp->num_clk);
> devm_kfree(&pdev->dev, mp->clk_config);
>
> if (dpu_mdss->mmio)
> devm_iounmap(&pdev->dev, dpu_mdss->mmio);
> dpu_mdss->mmio = NULL;
> -
> - pm_runtime_disable(dev->dev);
> priv->mdss = NULL;
> }
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch v3 ] drm/msm/dpu: Correct dpu destroy and disable order
2018-11-19 6:25 [Patch v3 ] drm/msm/dpu: Correct dpu destroy and disable order Jayant Shekhar
2018-11-19 8:32 ` Rajendra Nayak
@ 2018-12-02 2:24 ` Jeykumar Sankaran
1 sibling, 0 replies; 3+ messages in thread
From: Jeykumar Sankaran @ 2018-12-02 2:24 UTC (permalink / raw)
To: Jayant Shekhar
Cc: dri-devel, linux-arm-msm, freedreno, devicetree, linux-kernel,
robdclark, seanpaul, hoegsberg, abhinavk, chandanu, nganji
On 2018-11-18 22:25, Jayant Shekhar wrote:
> In case of msm drm bind failure, pm runtime put sync
> is called from dsi driver which issues an asynchronous
> put on mdss device. Subsequently when dpu_mdss_destroy
> is triggered the change will make sure to put the mdss
> device in suspend and clearing pending work if not
> scheduled.
>
> Changes in v2:
> - Removed double spacings [Jeykumar]
>
> Changes in v3:
> - Fix clock on issue during bootup [Rajendra]
>
> Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
> ---
Acked-by: Jeykumar Sankaran <jsanka@codeaurora.org>
> drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c
> index fd9c893..df8127b 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c
> @@ -156,18 +156,16 @@ static void dpu_mdss_destroy(struct drm_device
> *dev)
> struct dpu_mdss *dpu_mdss = to_dpu_mdss(priv->mdss);
> struct dss_module_power *mp = &dpu_mdss->mp;
>
> + pm_runtime_suspend(dev->dev);
> + pm_runtime_disable(dev->dev);
> _dpu_mdss_irq_domain_fini(dpu_mdss);
> -
> free_irq(platform_get_irq(pdev, 0), dpu_mdss);
> -
> msm_dss_put_clk(mp->clk_config, mp->num_clk);
> devm_kfree(&pdev->dev, mp->clk_config);
>
> if (dpu_mdss->mmio)
> devm_iounmap(&pdev->dev, dpu_mdss->mmio);
> dpu_mdss->mmio = NULL;
> -
> - pm_runtime_disable(dev->dev);
> priv->mdss = NULL;
> }
--
Jeykumar S
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-02 2:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-19 6:25 [Patch v3 ] drm/msm/dpu: Correct dpu destroy and disable order Jayant Shekhar
2018-11-19 8:32 ` Rajendra Nayak
2018-12-02 2:24 ` Jeykumar Sankaran
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 NNTP newsgroup(s).