[PATCH 0/2] drm/vc4: dsi: Make failed reads visible and recoverable
From: Henry Zhang
Date: Mon Oct 12 2026 - 15:27:21 EST
DSI reads on the Raspberry Pi 4 (vc4, DSI1) can fail in two ways that
the caller cannot handle:
- A peripheral that detected an error answers a read with an
Acknowledge and Error Report. vc4 copies its two bytes into the
caller's buffer and returns success, so the error bits look like
register contents (patch 1).
- After a read whose bus turnaround times out, every following DSI
transfer times out as well, until the display is switched off and on
(patch 2).
These patches do not prevent the timeouts. With video running, vc4
does not keep commands within vertical blanking, so a read can still
collide with active video and time out. That is a separate issue; this
series makes such failures visible to the caller and recoverable
without a modeset.
Tested on a Raspberry Pi 4 with a 2-lane video mode panel at 120 Hz,
using a backport of this series to the Raspberry Pi 6.18 kernel and a
panel driver that retries failed reads up to 8 times: 499 of 500 reads
with video running and 1000 of 1000 with video stopped returned the
expected data, with no lock-up. Without the series, the first timeout
left DSI unusable.
Compile-tested on drm-misc-next (arm64 defconfig, DRM_VC4=m, W=1), each
patch on its own.
Henry Zhang (2):
drm/vc4: dsi: Don't return error reports as read data
drm/vc4: dsi: Recover from a timed-out transfer
drivers/gpu/drm/vc4/vc4_dsi.c | 114 ++++++++++++++++++++++++++++++++--
1 file changed, 109 insertions(+), 5 deletions(-)
base-commit: 3e32932d3626d0279f9b3531bd648f8c0a16cb08
--
2.47.3