Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions launch_chffrplus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ function agnos_init {
sudo rm -f /data/etc/NetworkManager/system-connections/*.nmmeta
rm -f /data/scons_cache/config.lock

# The SDE display driver panics the kernel when a command-mode panel misses two
# consecutive pingpong-done IRQs (sde_encoder_phys_cmd.c, SDE_DBG_DUMP("panic")),
# which heat-soaked EA8074 panels do ~20-45s into boot - so a recoverable panel
# fault becomes a reboot loop. Disarming panic_on_err keeps the register dump and
# the PANEL_DEAD/ctl-reset recovery path; it only skips the panic() call.
# See commaai/openpilot#34971 and commaai/agnos-kernel-sdm845#85.
# Done here rather than in hardwared: this runs before any openpilot DRM client.
echo 0 | sudo tee /sys/kernel/debug/dri/0/debug/panic > /dev/null || true

# set success flag for current boot slot
sudo abctl --set_success

Expand Down
9 changes: 8 additions & 1 deletion openpilot/system/hardware/hardwared.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import openpilot.cereal.messaging as messaging
from openpilot.cereal import log
from openpilot.cereal.services import SERVICE_LIST
from openpilot.common.utils import strip_deprecated_keys
from openpilot.common.utils import strip_deprecated_keys, sudo_read
from openpilot.common.filter_simple import FirstOrderFilter
from openpilot.common.params import Params
from openpilot.common.realtime import DT_HW
Expand Down Expand Up @@ -192,6 +192,13 @@ def hardware_thread(end_event, hw_queue) -> None:
last_uptime_ts: float = time.monotonic()

HARDWARE.initialize_hardware()

if TICI:
# panic-on-display-error is disarmed in launch_chffrplus.sh. journald is only_onroad,
# so nothing else records the state during the offroad boot window where a heat-soaked
# panel faults - log the readback so that boot is diagnosable after the fact.
cloudlog.event("hardwared.sde_panic_on_err", value=sudo_read("/sys/kernel/debug/dri/0/debug/panic"))

thermal_config = HARDWARE.get_thermal_config()

fan_controller = FanController(int(1./DT_HW))
Expand Down
Loading