Skip to content

vc4: HVS FIFO frame counter stalls after DPMS cycles, stale DLIST entries never freed, display goes white #7805

Backlog

Description

@alitofresko

Summary

On CM4 Rev 1.1 (BCM2711) with a DSI panel behind an ICN6211 bridge, the HVS FIFO frame counter (FRCNT in SCALER_DISPSTATx) stops advancing after some uptime. Stale DLIST entries are never freed by the normal path (which waits for FRCNT to advance past the target frame), the 4064-word DLIST fills up, and the display goes permanently white with vertical colored bars. Only a full reboot recovers.

The fallback flush in vc4_hvs_alloc_dlist_entry() does fire (the "Failed to allocate DLIST entry" error is logged before the retry), but since the HVS channel is no longer producing frames, the display shows nothing useful.

Hardware / Software

  • SoC: BCM2711 (Compute Module 4 Rev 1.1)
  • Display: DSI → ICN6211 (DSI-to-DPI bridge, i2c-1 @0x2c) → 480×854 panel (custom panel-maxen driver)
  • Kernel: 6.6.78-v8 (rpi-6.6.y, built Mar 2025)
  • Compositor: weston (DRM backend, single DSI-1 output)
  • Display power management: weston DPMS cycle — idle timeout triggers panel disable (GPIO sequence: en5, env, reset, vdd off), wake triggers full re-init (vdd, reset, en5, env, ICN6211 register programming via i2c, DSI clock recalc, panel enable + 200ms settle)

Observations

Incident 1 — Lab device, October 2026

  • Uptime at first DLIST error: 1,195,716s (~13.8 days)
  • 22 DLIST errors total, recurring every ~26s when the screen is on
  • DISPCTRL frozen at 0xaa00008e
  • hvs_dlist_allocs debugfs showed stale entries with frame counter stuck (values 52, 54, 55)
  • hvs_underrun = 0
  • 9 clean DPMS cycles before the fault, 8 cycles with DLIST errors after
  • Reboot fixed it; screen worked immediately

Incident 2 — Production device, November 2026

  • Same hardware (CM4 Rev 1.1), same kernel (6.6.78-v8)
  • Uptime at first DLIST error: 14,511s (~4 hours) — dramatically faster onset
  • 27 DLIST errors in the journal
  • DISPCTRL frozen at 0xaa00008e (identical to incident 1)
  • 33 clean DPMS on/off cycles before the fault (uptime 0–14300s), errors on every cycle after
  • First error occurred during a wake triggered by an incoming call with video
  • Overnight gap (screen off for ~15 hours): no DLIST errors
  • Morning: errors resume on the very first wake
  • The DSI/ICN6211/panel re-init sequence is byte-for-byte identical before and after the fault: same DSI clock (28892→29411), same ICN6211 registers, same MIPI PHY clock (176,472,000 Hz), same panel GPIO sequence. The fault is not in the panel path.
  • Previous boot ended abnormally (FAT-fs "not properly unmounted" on 3 partitions, EXT4 recovery on /data) — likely a forced power cycle to recover from the same display issue

Pattern

Incident 1 Incident 2
Onset 13.8 days 4 hours
DISPCTRL aa00008e aa00008e
Error interval ~26s ~21s
Clean cycles before 9 33
Underrun 0 not captured (no debugfs dump)
Fix reboot reboot

The ~21–26s error interval matches the time to fill 4064 words at 9 words/frame at the compositor's frame rate — confirming that stale entries are never freed by the frame-counter path.

Analysis

What's broken

The DLIST deallocation path in vc4_hvs_alloc_dlist_entry() / vc4_hvs_mark_dlist_entry_stale() relies on vc4_hvs_get_fifo_frame_count() returning an advancing value. When the frame counter stalls, entries marked stale at frame N are never freed because vc4_hvs_frcnt_lte(target, current) never becomes true.

The driver already has a comment acknowledging this:

/*
 * Eventually the frame count will wrap around, and
 * vc4_hvs_frcnt_lte(target, current) will start
 * returning true. However we've seen this fail for
 * reasons currently unknown.
 */

What's NOT broken

What we don't know

  • Why the frame counter stops. Is the HVS channel itself stuck (not compositing), or is the counter frozen while compositing continues?
  • Whether SCALER_DISPSTATx shows a stuck line counter as well, or only a stuck frame counter. In incident 1, the debugfs snapshot was taken with the screen off. In incident 2, no debugfs dump was available.
  • Whether explicitly stopping and restarting the HVS channel (without a full reboot) would recover.

Related issues

What would help

  1. A way to force-free stale DLIST entries when FRCNT hasn't advanced after N attempts (a watchdog in vc4_hvs_alloc_dlist_entry or a periodic check)
  2. Better understanding of what makes FRCNT stop — is there a hardware errata, or a software state that can disable it?
  3. Optionally, a debugfs knob to force-reset the HVS channel (stop + restart compositing) as a recovery mechanism short of rebooting

Steps to reproduce

We cannot reproduce on demand. The fault occurs after variable uptime (4 hours to 13.8 days) on CM4 Rev 1.1 with DSI output and frequent DPMS on/off cycles (weston idle timeout). We have seen it on 3 devices so far (2 production, 1 lab).

Kernel config

Standard rpi-6.6.y defconfig for bcm2711 (aarch64), vc4-kms-dsi-maxen-chipone-icn6211-4lane overlay. Single display on DSI-1, no HDMI connected.

Activity

  1. alitofresko commented on Nov 28, 2026

    @alitofresko
    Author

    Photo of the display when the fault is active"

    Screenshot 2026-11-28 alle 16 33 29
  2. popcornmix commented on Nov 29, 2026

    @popcornmix
    Collaborator

    Kernel: 6.6.78-v8 (rpi-6.6.y, built Mar 2025)

    Have you tried with 6.18 kernel? 6.6 kernel is ancient any even if we find a fix, the 6.6 kernel wouldn't see it.

    Really we need a reproducer to have a high chance of fixing this.

    Next time you have it in the faied state, can you capture:

    1. hvs_regs read twice, 1 s apart: DISPSTAT0 mode/line, DISPLACT0, and the frame counters.
    2. crtc1_regs and dsi1_regs.
    3. hvs_dlist (which planes are active, and whether they are scaled or YUV).
    4. vcgencmd measure_clock core and vcgencmd get_throttled.
    5. Any flip_done timed out messages in dmesg.
    6. Whether the fault happens with weston's video and scaled planes disabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions