Flaky boot is display bring-up: dispcc reprograms ABL's live scanout #17
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?
The intermittent "device doesn't come back from reboot" failure that has taxed this project for weeks is display bring-up. It is not U-Boot, not the SD card, not the battery, and not random.
Evidence — single-variable test (2026-08-25)
&mdssdisabled +initcall_blacklist=disp_cc_sm8250_driver_init,video_cc_sm8150_driver_init,gpu_cc_sm8150_driver_initImages A and B were byte-identical apart from the display change. Both carried: ldo17 at 3304000, pm8150b removed, ramoops relaid to match stock,
ss_plog+sec_debugreservations,CONFIG_GTS6L_SECLOG,clk_ignore_unused pd_ignore_unused regulator_ignore_unused,loglevel=7,log_buf_len=4M.~50% hang rate with display on, 0/5+ with it off.
Mechanism
ABL hands over a live 2560x1600 x8r8g8b8 stride-10240 scanout of
cont_splash_memat0x9c400000. Mainline DRM/MSM has no continuous-splash handoff for sm8150, sodispccreprograms the display clocks underneath a display that is mid-scanout.This is the same mechanism MAINLINE-NOTES already documented from the console side — "dispcc probes and reprograms the display clocks, the scanout changes shape (two panes, shrunken)". That was recorded as a cosmetic problem (we go blind) once the console moved to USB. It is not cosmetic; roughly half the time it takes the boot with it.
Corroborating: pre-fix boots log
dsi 0 TIMEOUT_STATUS=00000001anddsi 1 TIMEOUT_STATUS=00000001, six times, at 14.5 s.It is a hang, not a crash
After a hung boot, TWRP reports
reset_reason=NPONandreset_klog/reset_summary/auto_comment/reset_tzlogare all 0 bytes. Samsung's debug layer records resets; a hang that gets power-cycled out of leaves no record. So there is no post-mortem for this — the panel console is the only window, which is why it stayed invisible for so long.Not yet isolated
Four things were disabled together. Still to bisect:
&mdssitselfdisp_cc_sm8250_driver_init(sm8150 uses the sm8250 dispcc driver —dispcc-sm8250.cmatchesqcom,sm8150-dispcc)video_cc_sm8150_driver_initgpu_cc_sm8150_driver_initdispcc is the prime suspect — it is what reprograms the display clocks under the live scanout. videocc/gpucc were likely blacklisted alongside it historically and are probably innocent.
Consequences
Keep display off for bring-up work. A device that boots every time is worth far more than a panel, and the framebuffer console still works in that configuration — that is how the ldo17 regression was caught.
Every experiment run before 2026-08-25 was collected on a platform that failed to boot about a third of the time. Results whose arms were single boots should be treated as suspect (see #16 for the class of error this causes).
Real fix (open question)
Either implement continuous-splash handoff, or have the bootloader stop the display before handing over. The latter is simpler but costs the U-Boot/earlycon framebuffer console, which is currently our only pre-USB diagnostic channel — so it is not free.
Related: #10 and #12 touch the same panel driver; #6 depends on how the splash handover is resolved.
Full write-up:
baselines/flaky-boot-display.md.Bisected: two separate failures, one root cause
The four things that were disabled together are not equivalent. Measured on the now-reliable platform:
&mdssoff + 3 initcalls blacklisted)&mdssstill offdispcc corrupts the display but does not hang the system.
&mdssis what hangs it.Why dispcc corrupts the panel
disp_cc_sm8250_probe()(sm8150 uses the sm8250 driver) unconditionally rewrites both display PLLs:No check for whether anything is running off them. ABL hands over a live dual-DSI scanout clocked from exactly those PLLs, so this yanks the configuration out from under an active display — which is the "two panes, shrunken" garbling, and it happens with no DRM involvement at all. That is why disabling
&mdssalone was never sufficient and the initcall blacklist was also needed.This looks like a genuine upstream bug, not a gts6l quirk: a clock controller should not reconfigure a PLL that is already locked and running, on any Qualcomm device that boots with a bootloader splash. Plausible fix is small — read the PLL state at probe and skip
clk_lucid_pll_configure()if it is already enabled/locked.Why downstream does not have either problem
Confirmed from Samsung's source, not inferred.
dsi_display_splash_res_init()indrivers/gpu/drm/msm/dsi-staging/dsi_display.c:dsi_display_get_cont_splash_status()→hw->ops.get_cont_splash_status(hw)dsi_config_host_engine_state_for_cont_splash()syncs driver state to hardware state, never the reversedsi_panel_bl_handoff()inherits brightness without re-initAnd on the panel side it is explicit (
samsung_lego/ss_dsi_panel_common.c:2689):Mainline 6.17 has no equivalent whatsoever —
cont_splashappears in zero files underdrivers/gpu/drm/msm/. There is no detection, no adoption, no skip.Note our
panel-samsung-ana38401.cis not at fault here: itsprepare()does a correct cold init (reset asserted 70 ms, released, wait fortcon_rdy). The problem is that a correct cold init is being performed on live hardware, in the wrong order, by a stack that does not know the hardware is live.Consequences
&mdsshang is the one that matters for a usable device, and it is the harder of the two — it is the cont_splash gap proper.Method note
The first attempt at this bisect produced six clean boots that meant nothing: a stale
bootargsleft in U-Boot's saved env from an unrelated experiment was being merged with the boot image's cmdline, so the kernel saw twoinitcall_blacklist=entries and dispcc stayed blacklisted despite the image saying otherwise. Caught only becausedispcc=unboundcontradicted what the test claimed to be testing. Any arm of this bisect should verify the thing it claims to have changed actually changed —/sys/bus/platform/devices/af00000.clock-controller/driverfor dispcc.Split out into two issues
The bisect above found two independent failures sharing one root cause (ABL handing over a live scanout). They have different fixes, different scope and different upstream stories, so they now have their own issues:
&mdsshangs the boot. The substantive half: the ~50% boot hang. Mainline has no detection/adoption/skip at all, where downstream has all four. Larger, structural, gates Display and GPU.dispcc-sm8250.ccovers, and the more plausible upstream submission of the two.This issue stays as the record of how the flaky boot was tracked down and bisected — the single-variable test, the
dsi TIMEOUT_STATUScorroboration, the hang-not-crash finding from Samsung's reset diagnostics, and the invalid first bisect run and how it was caught.Practical takeaway for anyone picking this up: keep the display off for bring-up work.
&mdssdisabled plusinitcall_blacklist=disp_cc_sm8250_driver_init,video_cc_sm8150_driver_init,gpu_cc_sm8150_driver_init,simplefb_driver_initgives a device that boots every time and keeps thegtsfbpanel console legible end-to-end. Note the two are not the same requirement: dispcc only needs blacklisting for the console (#20), not for stability —&mdssis what costs you the boot (#19).