mbox series

[v3,0/2] clk: qcom: gcc-sm8550: Fix shared clk parking breakage

Message ID 20240828171722.1251587-1-swboyd@chromium.org
Headers show
Series clk: qcom: gcc-sm8550: Fix shared clk parking breakage | expand

Message

Stephen Boyd Aug. 28, 2024, 5:17 p.m. UTC
Amit Pundir reported[1] that a recent commit 01a0a6cc8cfd ("clk: qcom:
Park shared RCGs upon registration") broke USB and audio on sm8550-hdk.
These two patches fix the issue by skipping the parking bit of the
shared RCGs for all clks except for the ones that were causing trouble,
i.e. the display RCGs on sc7180.

The first patch is all that's required, while the second patch can be
applied anytime to simplify the QUP clks that don't need to be parked.

Changes from v2: https://lore.kernel.org/r/20240827231237.1014813-1-swboyd@chromium.org
 * Reword first patch commit text to clarify further

Changes from v1: https://lore.kernel.org/r/20240819233628.2074654-1-swboyd@chromium.org
 * Revert most of the bad patch, except for the sc7180 display clks that still
   want to park at init
 * Re-order series

[1] https://lore.kernel.org/CAMi1Hd1KQBE4kKUdAn8E5FV+BiKzuv+8FoyWQrrTHPDoYTuhgA@mail.gmail.com/

Stephen Boyd (2):
  clk: qcom: dispcc-sc7180: Only park display clks at init
  clk: qcom: gcc-sm8550: Don't use shared clk_ops for QUPs

 drivers/clk/qcom/clk-rcg.h       |  1 +
 drivers/clk/qcom/clk-rcg2.c      | 36 ++++++++++++++++++++--
 drivers/clk/qcom/dispcc-sc7180.c |  8 ++---
 drivers/clk/qcom/gcc-sm8550.c    | 52 ++++++++++++++++----------------
 4 files changed, 64 insertions(+), 33 deletions(-)


base-commit: 8400291e289ee6b2bf9779ff1c83a291501f017b

Comments

Stephen Boyd Sept. 3, 2024, 7:55 p.m. UTC | #1
Quoting Johan Hovold (2024-09-02 00:15:53)
> On Fri, Aug 30, 2024 at 03:29:22PM -0700, Stephen Boyd wrote:
> > Quoting Stephen Boyd (2024-08-29 09:34:05)
> 
> > > It sounds like it's better to make the default always park at
> > > registration time and special case the one or two places where that
> > > isn't possible, i.e. USB because it has special rate requirements. So I
> > > should just go back to v1 then and pile on the QUP patches.
> > 
> > I've done this now and I'll push out clk-fixes with the QUP patches.
> 
> I assumed you'd fix up all the other SoCs affected by this, but I only
> saw fixes for sm8550, sm8650 and x1e80100 in your fixes branch.
> 
> Just sent a corresponding fix for sc8280xp, which I've confirmed also
> needs this for QUP:

Thanks!

> 
>         https://lore.kernel.org/lkml/20240902070830.8535-1-johan+linaro@kernel.org/
> 
> But what about the sm8550 USB issue? Don't the other platforms also need
> a corresponding fix (e.g. for when booting from USB)?

I don't know. Are you seeing USB host issues on other platforms with
shared RCG clk_ops for the USB clk? It looks inconsistent that sometimes
there's a USB GDSC but the shared clk ops aren't used. If nothing is
broken then let's work on the proper fix, which is parking RCGs when the
GDSC is turned off so that turning on the GDSC always works. If USB is
broken for you then send another patch.