* [PATCH] clk: qcom: gdsc: Bump parent usage count when GDSC is found enabled
@ 2022-06-06 21:21 Bjorn Andersson
2022-06-07 12:15 ` Andrew Halaney
2022-06-08 20:54 ` Stephen Boyd
0 siblings, 2 replies; 4+ messages in thread
From: Bjorn Andersson @ 2022-06-06 21:21 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Dmitry Baryshkov
Cc: linux-arm-msm, linux-clk, linux-kernel
When a GDSC is found to be enabled at boot the pm_runtime state will
be unbalanced as the GDSC is later turned off. Fix this by increasing
the usage counter on the power-domain, in line with how we handled the
regulator state.
Fixes: 1b771839de05 ("clk: qcom: gdsc: enable optional power domain support")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
drivers/clk/qcom/gdsc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk/qcom/gdsc.c
index 44520efc6c72..a1fa7c4cff60 100644
--- a/drivers/clk/qcom/gdsc.c
+++ b/drivers/clk/qcom/gdsc.c
@@ -420,6 +420,9 @@ static int gdsc_init(struct gdsc *sc)
return ret;
}
+ /* ...and the power-domain */
+ gdsc_pm_runtime_get(sc);
+
/*
* Votable GDSCs can be ON due to Vote from other masters.
* If a Votable GDSC is ON, make sure we have a Vote.
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] clk: qcom: gdsc: Bump parent usage count when GDSC is found enabled
2022-06-06 21:21 [PATCH] clk: qcom: gdsc: Bump parent usage count when GDSC is found enabled Bjorn Andersson
@ 2022-06-07 12:15 ` Andrew Halaney
2022-06-09 13:49 ` Andrew Halaney
2022-06-08 20:54 ` Stephen Boyd
1 sibling, 1 reply; 4+ messages in thread
From: Andrew Halaney @ 2022-06-07 12:15 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Michael Turquette, Stephen Boyd, Dmitry Baryshkov, linux-arm-msm,
linux-clk, linux-kernel
On Mon, Jun 06, 2022 at 02:21:12PM -0700, Bjorn Andersson wrote:
> When a GDSC is found to be enabled at boot the pm_runtime state will
> be unbalanced as the GDSC is later turned off. Fix this by increasing
> the usage counter on the power-domain, in line with how we handled the
> regulator state.
>
> Fixes: 1b771839de05 ("clk: qcom: gdsc: enable optional power domain support")
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
> drivers/clk/qcom/gdsc.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk/qcom/gdsc.c
> index 44520efc6c72..a1fa7c4cff60 100644
> --- a/drivers/clk/qcom/gdsc.c
> +++ b/drivers/clk/qcom/gdsc.c
> @@ -420,6 +420,9 @@ static int gdsc_init(struct gdsc *sc)
> return ret;
> }
>
> + /* ...and the power-domain */
> + gdsc_pm_runtime_get(sc);
> +
> /*
> * Votable GDSCs can be ON due to Vote from other masters.
> * If a Votable GDSC is ON, make sure we have a Vote.
> --
> 2.35.1
>
Makes sense to me!
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] clk: qcom: gdsc: Bump parent usage count when GDSC is found enabled
2022-06-06 21:21 [PATCH] clk: qcom: gdsc: Bump parent usage count when GDSC is found enabled Bjorn Andersson
2022-06-07 12:15 ` Andrew Halaney
@ 2022-06-08 20:54 ` Stephen Boyd
1 sibling, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2022-06-08 20:54 UTC (permalink / raw)
To: Bjorn Andersson, Dmitry Baryshkov, Michael Turquette
Cc: linux-arm-msm, linux-clk, linux-kernel
Quoting Bjorn Andersson (2022-06-06 14:21:12)
> When a GDSC is found to be enabled at boot the pm_runtime state will
> be unbalanced as the GDSC is later turned off. Fix this by increasing
> the usage counter on the power-domain, in line with how we handled the
> regulator state.
>
> Fixes: 1b771839de05 ("clk: qcom: gdsc: enable optional power domain support")
Is it fixing a regression to the point that I need to merge this on
-fixes? The commit text talks about fixing it but I don't understand the
urgency, i.e. was it discovered recently and this fixes display on some
board or something like that?
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
> drivers/clk/qcom/gdsc.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk/qcom/gdsc.c
> index 44520efc6c72..a1fa7c4cff60 100644
> --- a/drivers/clk/qcom/gdsc.c
> +++ b/drivers/clk/qcom/gdsc.c
> @@ -420,6 +420,9 @@ static int gdsc_init(struct gdsc *sc)
> return ret;
> }
>
> + /* ...and the power-domain */
> + gdsc_pm_runtime_get(sc);
Shouldn't we check for error and bail out if it fails?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] clk: qcom: gdsc: Bump parent usage count when GDSC is found enabled
2022-06-07 12:15 ` Andrew Halaney
@ 2022-06-09 13:49 ` Andrew Halaney
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Halaney @ 2022-06-09 13:49 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Michael Turquette, Stephen Boyd, Dmitry Baryshkov, linux-arm-msm,
linux-clk, linux-kernel
On Tue, Jun 07, 2022 at 07:15:48AM -0500, Andrew Halaney wrote:
> On Mon, Jun 06, 2022 at 02:21:12PM -0700, Bjorn Andersson wrote:
> > When a GDSC is found to be enabled at boot the pm_runtime state will
> > be unbalanced as the GDSC is later turned off. Fix this by increasing
> > the usage counter on the power-domain, in line with how we handled the
> > regulator state.
> >
> > Fixes: 1b771839de05 ("clk: qcom: gdsc: enable optional power domain support")
> > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> > ---
> > drivers/clk/qcom/gdsc.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk/qcom/gdsc.c
> > index 44520efc6c72..a1fa7c4cff60 100644
> > --- a/drivers/clk/qcom/gdsc.c
> > +++ b/drivers/clk/qcom/gdsc.c
> > @@ -420,6 +420,9 @@ static int gdsc_init(struct gdsc *sc)
> > return ret;
> > }
> >
> > + /* ...and the power-domain */
> > + gdsc_pm_runtime_get(sc);
> > +
> > /*
> > * Votable GDSCs can be ON due to Vote from other masters.
> > * If a Votable GDSC is ON, make sure we have a Vote.
> > --
> > 2.35.1
> >
>
> Makes sense to me!
>
> Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Gah, too trigger happy -- I missed checking the return of
gdsc_pm_runtime_get() as Stephen pointed out in his reply.
I think with that in place feel free to add my R-B.
Thanks,
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-06-09 13:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-06 21:21 [PATCH] clk: qcom: gdsc: Bump parent usage count when GDSC is found enabled Bjorn Andersson
2022-06-07 12:15 ` Andrew Halaney
2022-06-09 13:49 ` Andrew Halaney
2022-06-08 20:54 ` Stephen Boyd
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).