hardware: don't kernel panic when a heat-soaked display stops acking frames - #38515
Open
jojobird6 wants to merge 1 commit into
Open
hardware: don't kernel panic when a heat-soaked display stops acking frames#38515jojobird6 wants to merge 1 commit into
jojobird6 wants to merge 1 commit into
Conversation
…frames The SDE display driver calls panic() when a command-mode panel misses two consecutive pingpong-done IRQs (sde_encoder_phys_cmd.c). On a heat-soaked comma 3X panel this fires 20-45s into boot, turning a recoverable panel fault into a reboot loop. Disarm panic_on_err in agnos_init(), before any openpilot DRM client starts drawing. This only skips the panic() call - the register dump, PANEL_DEAD event, and ctl-reset recovery path are untouched. Also log the readback once at hardwared start, since journald is only_onroad and nothing else records kernel state during the offroad boot window where this fault fires. See commaai#34971, commaai/agnos-kernel-sdm845#85, commaai#36191.
Contributor
Process replay diff reportReplays driving segments through this PR and compares the behavior to master. ✅ 0 changed, 66 passed, 0 errors |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On a heat-soaked comma 3X the SDE display driver panics the kernel ~20-45s into boot, offroad — on a hot day that becomes a boot loop until the device cools.
It's a debug panic, not a thermal trip: after a command-mode panel misses two consecutive pingpong-done IRQs,
_sde_encoder_phys_cmd_handle_ppdone_timeout()hitsSDE_DBG_DUMP("panic"), andpanic_on_errdefaults to 1. This clears that knob inagnos_init().Only the
panic()is skipped — the register dump still runs,PANEL_DEADis still delivered, and the encoder still recovers on the next kickoff. A recoverable panel fault stays recoverable.Related: #34971, commaai/agnos-kernel-sdm845#85, #36191. The panel-jitter DT change reduced the fault rate but didn't remove it — this device is on current AGNOS and still faults above ~68 °C board.
Verification
bash -nandruffclean, no newshellcheckfindings; no cereal change./sys/kernel/debug/dri/0/debug/panicreads0after reboot.Kernel panic - not syncing: _sde_encoder_phys_cmd_handle_ppdone_timeout. After disarming: 32 boots, 0 reboots, 0 panic dumps — while the panel fault kept recurring on 4 of them, the hottest at 82.4 °C board faulting at 46s (inside the old panic window) and then running 22 min unbroken. Faults separate cleanly on board temp: every boot ≥68.3 °C faulted, every boot ≤67.5 °C did not.Data and figures: https://github.com/jojobird6/comma3x-thermal-investigation/tree/main/display-panic
Notes: placed in
agnos_init()rather thanTici.initialize_hardware()because hardwared starts after registration, later than the earliest observed panic at 20.6s — that timing is inferred from log timestamps rather than directly measured, so happy to move it to a systemd drop-in if you'd prefer.sudo teerather thansudo_write(), whosePermissionErrorfallback would leave a root-owned debugfs knob world-writable. The hardwared hunk only logs the readback, sincejournaldisonly_onroadand nothing else records kernel state during the offroad boot window where this fires.Evidence was gathered on a device running a fork's userspace; the fault is in the AGNOS kernel display driver and is independent of which openpilot build is running.