drm/msm/dpu: Correct dpu destroy and disable order
PATCH v3 1/1 drm/msm/dpu: Correct dpu destroy and disable order
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]
--- drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c +2 -4
@@ -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 ; }
Signature · 7 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project _______________________________________________ Freedreno mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/freedreno
Quoted 7 lines · Jayant Shekhar
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_destroyis triggered the change will make sure to put the mdss device in suspend and clearing pending work if not scheduled.
Quoted 7 lines
Changes in v2:
- Removed double spacings [Jeykumar]Changes in v3:
- Fix clock on issue during bootup [Rajendra]Signed-off-by Jayant Shekhar <[email protected]>
So I no longer see the clock usecount mismatch with this patch now, that I had earlier reported with the v2.
Quoted 30 lines
--- drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c +2
-4@@ -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 ; }
Quoted 7 lines · Jayant Shekhar
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_destroyis triggered the change will make sure to put the mdss device in suspend and clearing pending work if not scheduled.
Quoted 8 lines
Changes in v2:
- Removed double spacings [Jeykumar]Changes in v3:
- Fix clock on issue during bootup [Rajendra]Signed-off-by Jayant Shekhar <[email protected]>---
Quoted 29 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c +2
-4@@ -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 ; }
Signature · 1 line
Jeykumar S