vc4: HVS FIFO frame counter stalls after DPMS cycles, stale DLIST entries never freed, display goes white
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 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時間
- マージ済み PR(30日)
- 37
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 件 ·
メンテナーはふだん 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 日以内に返信