[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD=FV=VSh90tdSDaxThoGaE_uYWPTMrGYBMM0UqcH=HUZaScNg@mail.gmail.com>
Date: Fri, 4 Nov 2022 15:08:12 -0700
From: Doug Anderson <dianders@...omium.org>
To: Stephen Boyd <swboyd@...omium.org>
Cc: Bjorn Andersson <andersson@...nel.org>,
Taniya Das <quic_tdas@...cinc.com>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Judy Hsiao <judyhsiao@...omium.org>,
Srinivasa Rao Mandadapu <quic_srivasam@...cinc.com>,
Matthias Kaehlcke <mka@...omium.org>,
Andy Gross <agross@...nel.org>,
Konrad Dybcio <konrad.dybcio@...ainline.org>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, linux-arm-msm@...r.kernel.org,
linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] clk: qcom: lpass-sc7180: Fix pm_runtime usage
Hi,
On Fri, Nov 4, 2022 at 2:19 PM Stephen Boyd <swboyd@...omium.org> wrote:
>
> Quoting Douglas Anderson (2022-11-04 06:56:29)
> > The sc7180 lpass clock controller's pm_runtime usage wasn't broken
> > quite as spectacularly as the sc7280's pm_runtime usage, but it was
> > still broken. Putting some printouts in at boot showed me this (with
> > serial console enabled, which makes the prints slow and thus changes
> > timing):
> > [ 3.109951] DOUG: my_pm_clk_resume, usage=1
> > [ 3.114767] DOUG: my_pm_clk_resume, usage=1
> > [ 3.664443] DOUG: my_pm_clk_suspend, usage=0
> > [ 3.897566] DOUG: my_pm_clk_suspend, usage=0
> > [ 3.910137] DOUG: my_pm_clk_resume, usage=1
> > [ 3.923217] DOUG: my_pm_clk_resume, usage=0
> > [ 4.440116] DOUG: my_pm_clk_suspend, usage=-1
> > [ 4.444982] DOUG: my_pm_clk_suspend, usage=0
> > [ 14.170501] DOUG: my_pm_clk_resume, usage=1
> > [ 14.176245] DOUG: my_pm_clk_resume, usage=0
> >
> > ...or this w/out serial console:
> > [ 0.556139] DOUG: my_pm_clk_resume, usage=1
> > [ 0.556279] DOUG: my_pm_clk_resume, usage=1
> > [ 1.058422] DOUG: my_pm_clk_suspend, usage=-1
> > [ 1.058464] DOUG: my_pm_clk_suspend, usage=0
> > [ 1.186250] DOUG: my_pm_clk_resume, usage=1
> > [ 1.186292] DOUG: my_pm_clk_resume, usage=0
> > [ 1.731536] DOUG: my_pm_clk_suspend, usage=-1
> > [ 1.731557] DOUG: my_pm_clk_suspend, usage=0
> > [ 10.288910] DOUG: my_pm_clk_resume, usage=1
> > [ 10.289496] DOUG: my_pm_clk_resume, usage=0
> >
> > It seems to be doing roughly the right sequence of calls, but just
> > like with sc7280 this is more by luck than anything. Having a usage of
> > -1 is just not OK.
> >
> > Let's fix this like we did with sc7280.
>
> Any Fixes tag?
Ah, right. I guess the most obvious one is actually:
Fixes: ce8c195e652f ("clk: qcom: lpasscc: Introduce pm autosuspend for SC7180")
That's what got us going negative. One could _sorta_ make the argument
for a "Fixes" tag all the way to the start of the driver, though. The
driver never did a pm_runtime_get() during probe and so there was (I
guess) a chance that some of the bare register writes in probe could
have been unclocked. I'm not aware of that ever being a problem, so I
guess just the above "Fixes" is fine.
> > Signed-off-by: Douglas Anderson <dianders@...omium.org>
> > ---
>
> Reviewed-by: Stephen Boyd <swboyd@...omium.org>
Thanks! Yell if you want me to spin a v2 with the Fixes in place.
-Doug
Powered by blists - more mailing lists