[PATCH 0/2] Fix a black screen on sc7180 Trogdor devices
From: Stephen Boyd
Date: Wed Mar 27 2024 - 16:27:54 EST
This patch series fixes a black screen seen at boot on Trogdor devices.
The details of that problem are in the second patch, but the TL;DR is
that shared RCGs report the wrong parent to the clk framework and shared
RCGs never get turned off if they're left force enabled out of boot,
wedging the display GDSC causing the display bridge to fail to probe
because it can't turn on DSI.
The first patch is basically a hack. It avoids a problem where the mdss
driver probes, turns on and off the mdp clk, and hangs the rotator clk
because the rotator clk is using the same parent. We don't care about
this case on sc7180, so we simply disable the clk at driver probe so it
can't get stuck on.
The second patch fixes the shared RCG implementation so that the parent
is properly reported and so that the force enable bit is cleared. Fixing
the parent causes the problem that the first patch is avoiding, which is
why that patch is first. Just applying this second patch will make it so
that disabling the mdp clk disables the display pll that the rotator clk
is also using, causing the rotator clk to be stuck on.
This problem comes about because of a combination of issues. The clk
framework doesn't handle the case where two clks share the same parent
and are enabled at boot. The first clk to enable and disable will turn
off the parent. The mdss driver doesn't stay out of runtime suspend
while populating the child devices. In fact, of_platform_populate()
triggers runtime resume and suspend of the mdss device multiple times
while devices are being added. These patches side-step the larger issues
here with the goal of fixing Trogdor in the short-term. Long-term we
need to fix the clk framework and display driver so that shared parents
aren't disabled during boot and so that mdss can't runtime suspend until
the display pipeline/card is fully formed.
Stephen Boyd (2):
clk: qcom: dispcc-sc7180: Force off rotator clk at probe
clk: qcom: Properly initialize shared RCGs upon registration
drivers/clk/qcom/clk-rcg2.c | 19 +++++++++++++++++++
drivers/clk/qcom/dispcc-sc7180.c | 14 ++++++++++++++
2 files changed, 33 insertions(+)
Cc: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
Cc: Douglas Anderson <dianders@xxxxxxxxxxxx>
Cc: Taniya Das <quic_tdas@xxxxxxxxxxx>
Cc: Laura Nao <laura.nao@xxxxxxxxxxxxx>
base-commit: e8f897f4afef0031fe618a8e94127a0934896aba
--
https://chromeos.dev