dispcc reconfigures display PLLs at probe, corrupting a bootloader splash (upstreamable) #20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
disp_cc_sm8250_probe()unconditionally rewrites both display PLLs, with no check for whether anything is currently running off them. On any device whose bootloader hands over a live scanout, this corrupts the display.Not a gts6l quirk — the code path is generic and affects every SoC the driver covers (sm8150, sc8180x, sm8250, sm8350).
The code
drivers/clk/qcom/dispcc-sm8250.c(sm8150 uses this driver — it matchesqcom,sm8150-dispcc):clk_*_pll_configure()writes the full PLL configuration — L value, alpha,config_ctl,user_ctl, test registers. There is no "is this PLL already enabled/locked?" guard.Symptom on gts6l
ABL hands over a live dual-DSI 2560x1600 scanout of
cont_splash_memat0x9c400000, clocked fromdisp_cc_pll0/pll1. dispcc's probe pulls that configuration out from under the running display, and the panel garbles into the "two panes, shrunken" state recorded in MAINLINE-NOTES, then freezes.Confirmed by bisect (#17): with dispcc/videocc/gpucc bound and
&mdssstill disabled — so no DRM involvement whatsoever — the panel freezes. The system stays up: 6/6 clean boots. So this is display corruption, not instability; the boot hang is a separate problem (#19).That also explains why the historical workaround needed both
&mdssdisabled andinitcall_blacklist=disp_cc_sm8250_driver_init: disabling the DRM driver alone still leaves dispcc free to wreck the PLLs.Why it matters to us specifically
The
gtsfbframebuffer earlycon paints into that same live scanout and is our only pre-USB diagnostic channel — it is how the ldo17 regression that killed the whole pm8150 regulator provider was caught. dispcc probing destroys it. So today we must choose between a usable panel console and a bound dispcc, which is an unnecessary tradeoff.Proposed fix
Skip the reconfigure when the PLL is already running. Roughly: read
PLL_MODE/ the enable and lock bits via the regmap before callingclk_*_pll_configure(), and leave a locked, enabled PLL alone — the same reasoningqcom_branch_set_clk_en()style helpers already use elsewhere, and what downstream does implicitly by taking votes on live clocks rather than programming them.Needs care about what the rest of probe assumes:
qcom_cc_really_probe()registers the PLLs as clocks afterwards, so the in-kernel state must still reflect the hardware's actual rate rather than the config that was skipped. That is the part worth getting right before proposing it upstream.Upstream angle
This is the more submittable of the two display issues — small, generic, and reproducible in principle on any Qualcomm board with a bootloader splash. #19 (the missing continuous-splash handoff in DRM/MSM) is the larger structural gap and is likely a much longer conversation upstream.
Related: #17 (bisect that isolated this), #19 (the
&mdssboot hang).