mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/3] drm/vc4: dsi: Make failed reads visible and recoverable
@ 2026-10-19 17:49 Henry Zhang
  2026-10-19 17:49 ` [PATCH v2 1/3] drm/vc4: dsi: Don't return error reports as read data Henry Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Henry Zhang @ 2026-10-19 17:49 UTC (permalink / raw)
  To: henryzhang62, Maxime Ripard, Dave Stevenson
  Cc: Maíra Canal, Raspberry Pi Kernel Maintenance,
	Maarten Lankhorst, Thomas Zimmermann, David Airlie,
	Simona Vetter, dri-devel, linux-kernel

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).

Patch 3 serializes host transfers, so that the recovery cannot reset
the block under a concurrent transfer.

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.

Changes in v2:
- Patch 2: restore the registers in the same order as pre_enable, and
  call synchronize_irq() before the reset (Sashiko review)
- Patch 3: new, serialize host transfers (Sashiko review)
- Link to v1: https://lore.kernel.org/r/20261012190249.3167-1-henryzhang62@gmail.com

Henry Zhang (3):
  drm/vc4: dsi: Don't return error reports as read data
  drm/vc4: dsi: Recover from a timed-out transfer
  drm/vc4: dsi: Serialize host transfers

 drivers/gpu/drm/vc4/vc4_dsi.c | 145 ++++++++++++++++++++++++++++++++--
 1 file changed, 138 insertions(+), 7 deletions(-)


base-commit: e6bb593b800813788dc16179d1305747ff974d00
-- 
2.47.3


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-19 17:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-19 17:49 [PATCH v2 0/3] drm/vc4: dsi: Make failed reads visible and recoverable Henry Zhang
2026-10-19 17:49 ` [PATCH v2 1/3] drm/vc4: dsi: Don't return error reports as read data Henry Zhang
2026-10-19 17:49 ` [PATCH v2 2/3] drm/vc4: dsi: Recover from a timed-out transfer Henry Zhang
2026-10-19 17:49 ` [PATCH v2 3/3] drm/vc4: dsi: Serialize host transfers Henry Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®