* [PATCH] drm/msm/mdp5: drop vdd regulator
@ 2021-11-04 0:34 ` Dmitry Baryshkov
0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2021-11-04 0:34 UTC (permalink / raw)
To: Bjorn Andersson, Rob Clark, Sean Paul, Abhinav Kumar
Cc: Jonathan Marek, Stephen Boyd, linux-arm-msm, dri-devel,
David Airlie, freedreno
The "vdd" regulator was used by the mdp5 driver only on downstream
kernels, where the GDSC is represented as a regulator. On all current
kernels the MDSS_GDSC is implemented as the power domain, removing the
need for this regulator. Remove it from the mdp5 driver.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c | 24 ++---------------------
1 file changed, 2 insertions(+), 22 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c
index 2f4895bcb0b0..2ac8fd37c76b 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c
@@ -16,8 +16,6 @@ struct mdp5_mdss {
void __iomem *mmio, *vbif;
- struct regulator *vdd;
-
struct clk *ahb_clk;
struct clk *axi_clk;
struct clk *vsync_clk;
@@ -189,8 +187,6 @@ static void mdp5_mdss_destroy(struct drm_device *dev)
irq_domain_remove(mdp5_mdss->irqcontroller.domain);
mdp5_mdss->irqcontroller.domain = NULL;
- regulator_disable(mdp5_mdss->vdd);
-
pm_runtime_disable(dev->dev);
}
@@ -238,31 +234,17 @@ int mdp5_mdss_init(struct drm_device *dev)
goto fail;
}
- /* Regulator to enable GDSCs in downstream kernels */
- mdp5_mdss->vdd = devm_regulator_get(dev->dev, "vdd");
- if (IS_ERR(mdp5_mdss->vdd)) {
- ret = PTR_ERR(mdp5_mdss->vdd);
- goto fail;
- }
-
- ret = regulator_enable(mdp5_mdss->vdd);
- if (ret) {
- DRM_DEV_ERROR(dev->dev, "failed to enable regulator vdd: %d\n",
- ret);
- goto fail;
- }
-
ret = devm_request_irq(dev->dev, platform_get_irq(pdev, 0),
mdss_irq, 0, "mdss_isr", mdp5_mdss);
if (ret) {
DRM_DEV_ERROR(dev->dev, "failed to init irq: %d\n", ret);
- goto fail_irq;
+ goto fail;
}
ret = mdss_irq_domain_init(mdp5_mdss);
if (ret) {
DRM_DEV_ERROR(dev->dev, "failed to init sub-block irqs: %d\n", ret);
- goto fail_irq;
+ goto fail;
}
mdp5_mdss->base.funcs = &mdss_funcs;
@@ -271,8 +253,6 @@ int mdp5_mdss_init(struct drm_device *dev)
pm_runtime_enable(dev->dev);
return 0;
-fail_irq:
- regulator_disable(mdp5_mdss->vdd);
fail:
return ret;
}
--
2.33.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [Freedreno] [PATCH] drm/msm/mdp5: drop vdd regulator
2021-11-04 0:34 ` Dmitry Baryshkov
@ 2021-11-05 1:06 ` Abhinav Kumar
-1 siblings, 0 replies; 6+ messages in thread
From: Abhinav Kumar @ 2021-11-05 1:06 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Rob Clark, Sean Paul,
Abhinav Kumar
Cc: Jonathan Marek, Stephen Boyd, linux-arm-msm, dri-devel,
David Airlie, Daniel Vetter, freedreno
On 11/3/2021 5:34 PM, Dmitry Baryshkov wrote:
> The "vdd" regulator was used by the mdp5 driver only on downstream
> kernels, where the GDSC is represented as a regulator. On all current
> kernels the MDSS_GDSC is implemented as the power domain, removing the
> need for this regulator. Remove it from the mdp5 driver.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
> ---
> drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c | 24 ++---------------------
> 1 file changed, 2 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c
> index 2f4895bcb0b0..2ac8fd37c76b 100644
> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c
> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c
> @@ -16,8 +16,6 @@ struct mdp5_mdss {
>
> void __iomem *mmio, *vbif;
>
> - struct regulator *vdd;
> -
> struct clk *ahb_clk;
> struct clk *axi_clk;
> struct clk *vsync_clk;
> @@ -189,8 +187,6 @@ static void mdp5_mdss_destroy(struct drm_device *dev)
> irq_domain_remove(mdp5_mdss->irqcontroller.domain);
> mdp5_mdss->irqcontroller.domain = NULL;
>
> - regulator_disable(mdp5_mdss->vdd);
> -
> pm_runtime_disable(dev->dev);
> }
>
> @@ -238,31 +234,17 @@ int mdp5_mdss_init(struct drm_device *dev)
> goto fail;
> }
>
> - /* Regulator to enable GDSCs in downstream kernels */
> - mdp5_mdss->vdd = devm_regulator_get(dev->dev, "vdd");
> - if (IS_ERR(mdp5_mdss->vdd)) {
> - ret = PTR_ERR(mdp5_mdss->vdd);
> - goto fail;
> - }
> -
> - ret = regulator_enable(mdp5_mdss->vdd);
> - if (ret) {
> - DRM_DEV_ERROR(dev->dev, "failed to enable regulator vdd: %d\n",
> - ret);
> - goto fail;
> - }
> -
> ret = devm_request_irq(dev->dev, platform_get_irq(pdev, 0),
> mdss_irq, 0, "mdss_isr", mdp5_mdss);
> if (ret) {
> DRM_DEV_ERROR(dev->dev, "failed to init irq: %d\n", ret);
> - goto fail_irq;
> + goto fail;
> }
>
> ret = mdss_irq_domain_init(mdp5_mdss);
> if (ret) {
> DRM_DEV_ERROR(dev->dev, "failed to init sub-block irqs: %d\n", ret);
> - goto fail_irq;
> + goto fail;
> }
>
> mdp5_mdss->base.funcs = &mdss_funcs;
> @@ -271,8 +253,6 @@ int mdp5_mdss_init(struct drm_device *dev)
> pm_runtime_enable(dev->dev);
>
> return 0;
> -fail_irq:
> - regulator_disable(mdp5_mdss->vdd);
> fail:
> return ret;
> }
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Freedreno] [PATCH] drm/msm/mdp5: drop vdd regulator
@ 2021-11-05 1:06 ` Abhinav Kumar
0 siblings, 0 replies; 6+ messages in thread
From: Abhinav Kumar @ 2021-11-05 1:06 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Rob Clark, Sean Paul,
Abhinav Kumar
Cc: Jonathan Marek, Stephen Boyd, linux-arm-msm, dri-devel,
David Airlie, freedreno
On 11/3/2021 5:34 PM, Dmitry Baryshkov wrote:
> The "vdd" regulator was used by the mdp5 driver only on downstream
> kernels, where the GDSC is represented as a regulator. On all current
> kernels the MDSS_GDSC is implemented as the power domain, removing the
> need for this regulator. Remove it from the mdp5 driver.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
> ---
> drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c | 24 ++---------------------
> 1 file changed, 2 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c
> index 2f4895bcb0b0..2ac8fd37c76b 100644
> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c
> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c
> @@ -16,8 +16,6 @@ struct mdp5_mdss {
>
> void __iomem *mmio, *vbif;
>
> - struct regulator *vdd;
> -
> struct clk *ahb_clk;
> struct clk *axi_clk;
> struct clk *vsync_clk;
> @@ -189,8 +187,6 @@ static void mdp5_mdss_destroy(struct drm_device *dev)
> irq_domain_remove(mdp5_mdss->irqcontroller.domain);
> mdp5_mdss->irqcontroller.domain = NULL;
>
> - regulator_disable(mdp5_mdss->vdd);
> -
> pm_runtime_disable(dev->dev);
> }
>
> @@ -238,31 +234,17 @@ int mdp5_mdss_init(struct drm_device *dev)
> goto fail;
> }
>
> - /* Regulator to enable GDSCs in downstream kernels */
> - mdp5_mdss->vdd = devm_regulator_get(dev->dev, "vdd");
> - if (IS_ERR(mdp5_mdss->vdd)) {
> - ret = PTR_ERR(mdp5_mdss->vdd);
> - goto fail;
> - }
> -
> - ret = regulator_enable(mdp5_mdss->vdd);
> - if (ret) {
> - DRM_DEV_ERROR(dev->dev, "failed to enable regulator vdd: %d\n",
> - ret);
> - goto fail;
> - }
> -
> ret = devm_request_irq(dev->dev, platform_get_irq(pdev, 0),
> mdss_irq, 0, "mdss_isr", mdp5_mdss);
> if (ret) {
> DRM_DEV_ERROR(dev->dev, "failed to init irq: %d\n", ret);
> - goto fail_irq;
> + goto fail;
> }
>
> ret = mdss_irq_domain_init(mdp5_mdss);
> if (ret) {
> DRM_DEV_ERROR(dev->dev, "failed to init sub-block irqs: %d\n", ret);
> - goto fail_irq;
> + goto fail;
> }
>
> mdp5_mdss->base.funcs = &mdss_funcs;
> @@ -271,8 +253,6 @@ int mdp5_mdss_init(struct drm_device *dev)
> pm_runtime_enable(dev->dev);
>
> return 0;
> -fail_irq:
> - regulator_disable(mdp5_mdss->vdd);
> fail:
> return ret;
> }
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/msm/mdp5: drop vdd regulator
2021-11-04 0:34 ` Dmitry Baryshkov
@ 2021-11-06 15:49 ` Bjorn Andersson
-1 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2021-11-06 15:49 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Rob Clark, Sean Paul, Abhinav Kumar, Jonathan Marek, Stephen Boyd,
David Airlie, Daniel Vetter, linux-arm-msm, dri-devel, freedreno
On Wed 03 Nov 19:34 CDT 2021, Dmitry Baryshkov wrote:
> The "vdd" regulator was used by the mdp5 driver only on downstream
> kernels, where the GDSC is represented as a regulator. On all current
> kernels the MDSS_GDSC is implemented as the power domain, removing the
> need for this regulator. Remove it from the mdp5 driver.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> ---
> drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c | 24 ++---------------------
> 1 file changed, 2 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c
> index 2f4895bcb0b0..2ac8fd37c76b 100644
> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c
> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c
> @@ -16,8 +16,6 @@ struct mdp5_mdss {
>
> void __iomem *mmio, *vbif;
>
> - struct regulator *vdd;
> -
> struct clk *ahb_clk;
> struct clk *axi_clk;
> struct clk *vsync_clk;
> @@ -189,8 +187,6 @@ static void mdp5_mdss_destroy(struct drm_device *dev)
> irq_domain_remove(mdp5_mdss->irqcontroller.domain);
> mdp5_mdss->irqcontroller.domain = NULL;
>
> - regulator_disable(mdp5_mdss->vdd);
> -
> pm_runtime_disable(dev->dev);
> }
>
> @@ -238,31 +234,17 @@ int mdp5_mdss_init(struct drm_device *dev)
> goto fail;
> }
>
> - /* Regulator to enable GDSCs in downstream kernels */
> - mdp5_mdss->vdd = devm_regulator_get(dev->dev, "vdd");
> - if (IS_ERR(mdp5_mdss->vdd)) {
> - ret = PTR_ERR(mdp5_mdss->vdd);
> - goto fail;
> - }
> -
> - ret = regulator_enable(mdp5_mdss->vdd);
> - if (ret) {
> - DRM_DEV_ERROR(dev->dev, "failed to enable regulator vdd: %d\n",
> - ret);
> - goto fail;
> - }
> -
> ret = devm_request_irq(dev->dev, platform_get_irq(pdev, 0),
> mdss_irq, 0, "mdss_isr", mdp5_mdss);
> if (ret) {
> DRM_DEV_ERROR(dev->dev, "failed to init irq: %d\n", ret);
> - goto fail_irq;
> + goto fail;
> }
>
> ret = mdss_irq_domain_init(mdp5_mdss);
> if (ret) {
> DRM_DEV_ERROR(dev->dev, "failed to init sub-block irqs: %d\n", ret);
> - goto fail_irq;
> + goto fail;
> }
>
> mdp5_mdss->base.funcs = &mdss_funcs;
> @@ -271,8 +253,6 @@ int mdp5_mdss_init(struct drm_device *dev)
> pm_runtime_enable(dev->dev);
>
> return 0;
> -fail_irq:
> - regulator_disable(mdp5_mdss->vdd);
> fail:
> return ret;
> }
> --
> 2.33.0
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] drm/msm/mdp5: drop vdd regulator
@ 2021-11-06 15:49 ` Bjorn Andersson
0 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2021-11-06 15:49 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: freedreno, Jonathan Marek, Stephen Boyd, linux-arm-msm,
Abhinav Kumar, David Airlie, dri-devel, Sean Paul
On Wed 03 Nov 19:34 CDT 2021, Dmitry Baryshkov wrote:
> The "vdd" regulator was used by the mdp5 driver only on downstream
> kernels, where the GDSC is represented as a regulator. On all current
> kernels the MDSS_GDSC is implemented as the power domain, removing the
> need for this regulator. Remove it from the mdp5 driver.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> ---
> drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c | 24 ++---------------------
> 1 file changed, 2 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c
> index 2f4895bcb0b0..2ac8fd37c76b 100644
> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c
> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c
> @@ -16,8 +16,6 @@ struct mdp5_mdss {
>
> void __iomem *mmio, *vbif;
>
> - struct regulator *vdd;
> -
> struct clk *ahb_clk;
> struct clk *axi_clk;
> struct clk *vsync_clk;
> @@ -189,8 +187,6 @@ static void mdp5_mdss_destroy(struct drm_device *dev)
> irq_domain_remove(mdp5_mdss->irqcontroller.domain);
> mdp5_mdss->irqcontroller.domain = NULL;
>
> - regulator_disable(mdp5_mdss->vdd);
> -
> pm_runtime_disable(dev->dev);
> }
>
> @@ -238,31 +234,17 @@ int mdp5_mdss_init(struct drm_device *dev)
> goto fail;
> }
>
> - /* Regulator to enable GDSCs in downstream kernels */
> - mdp5_mdss->vdd = devm_regulator_get(dev->dev, "vdd");
> - if (IS_ERR(mdp5_mdss->vdd)) {
> - ret = PTR_ERR(mdp5_mdss->vdd);
> - goto fail;
> - }
> -
> - ret = regulator_enable(mdp5_mdss->vdd);
> - if (ret) {
> - DRM_DEV_ERROR(dev->dev, "failed to enable regulator vdd: %d\n",
> - ret);
> - goto fail;
> - }
> -
> ret = devm_request_irq(dev->dev, platform_get_irq(pdev, 0),
> mdss_irq, 0, "mdss_isr", mdp5_mdss);
> if (ret) {
> DRM_DEV_ERROR(dev->dev, "failed to init irq: %d\n", ret);
> - goto fail_irq;
> + goto fail;
> }
>
> ret = mdss_irq_domain_init(mdp5_mdss);
> if (ret) {
> DRM_DEV_ERROR(dev->dev, "failed to init sub-block irqs: %d\n", ret);
> - goto fail_irq;
> + goto fail;
> }
>
> mdp5_mdss->base.funcs = &mdss_funcs;
> @@ -271,8 +253,6 @@ int mdp5_mdss_init(struct drm_device *dev)
> pm_runtime_enable(dev->dev);
>
> return 0;
> -fail_irq:
> - regulator_disable(mdp5_mdss->vdd);
> fail:
> return ret;
> }
> --
> 2.33.0
>
^ permalink raw reply [flat|nested] 6+ messages in thread