vc4: HVS FIFO frame counter stalls after DPMS cycles, stale DLIST entries never freed, display goes white
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 32/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- c, linux
研究方向
Start with vc4_hvs_alloc_dlist_entry() and vc4_hvs_mark_dlist_entry_stale() in the vc4 HVS driver, then inspect the HVS frame-counter and channel-reset paths. Reproduce or instrument the stalled FRCNT/DISPSTAT state, including DPMS wake cycles and debugfs output. Done means the root cause of the counter stall is identified or a safe stale-entry recovery and channel-restart mechanism is implemented with regression coverage.
由索引模型根據 Issue 內容生成。
描述
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-maxendriver) - 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
DISPCTRLfrozen at0xaa00008ehvs_dlist_allocsdebugfs 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
DISPCTRLfrozen at0xaa00008e(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
- The DSI link, ICN6211 bridge, and panel are fully re-initialized on every DPMS wake. The init sequence is identical before and after the fault. The problem is upstream of the panel path, in the HVS.
__vc4_hvs_stop_channel()resetsDISPCTRLX(writes RESET then 0) but does NOT touchDISPSTATwhere FRCNT lives. Since FRCNT is documented as free-running, this shouldn't matter — but something makes it stop.- All known fixes from #5674 (PRs #5684, #5733, #5935) are present in our kernel. Those fix a different bug: a R-M-W race on
SCALER_DISPCTRLbetween underrun and EOF IRQ handlers that could lose an EOF interrupt. Our bug is that the frame counter itself stops advancing.
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_DISPSTATxshows 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
- #5674 — DLIST stale entry bug (R-M-W race), fixed by #5935. Different root cause.
- #7757 — Recent discussion where
@6by9confirms FRCNT is free-running and "there are no statements over when it gets reset"
What would help
- A way to force-free stale DLIST entries when
FRCNThasn't advanced after N attempts (a watchdog invc4_hvs_alloc_dlist_entryor a periodic check) - Better understanding of what makes FRCNT stop — is there a hardware errata, or a software state that can disable it?
- 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.
- 主要語言
- C
- 星號
- 13.4k
- 分支
- 5.5k
- 平均合併
- 1 天 8 小時
- 30 天內合併 PR
- 37
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
raspberrypi/linux 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
raspberrypi/linux#7822 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
raspberrypi/linux#7415 · 2 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
rp1-cfe doesn't forward V4L2_EVENT_SOURCE_CHANGE event from csi-2 sensor driver to userspace app未關閉
難度 2/5 1-3 小時 新手友好度 72/100
raspberrypi/linux#7399 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 82/100
raspberrypi/linux#7357 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
raspberrypi/linux#7054 · 2 則留言 ·
維護者通常 1 天內回覆
查看 raspberrypi/linux 的全部 Issue
相似的 Issue
-
CF_CFDP_S_SendFileData computes the file checksum from the SB buffer after CFE_SB_TransmitBuffer未關閉
難度 2/5 1-3 小時 新手友好度 78/100
-
needs triage
難度 2/5 1-3 小時 新手友好度 72/100
389ds/389-ds-base#8251 ·
維護者通常 1 天內回覆
-
ColumnDecimal::Append(Int128) stores a value outside the Decimal(P, S) range with no error: cut to 32/64 bits, or with too many digits可能已有人在做 @RUSHIT305 今天認領。 未關閉bug data-types
難度 2/5 1-3 小時 新手友好度 76/100
ClickHouse/clickhouse-cpp#645 · 1 則留言 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 85/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
ROCm/hrx-system#3628 ·
維護者通常 1 天內回覆