public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 0/4] drm/v3d: Fix RPi 4 system hangs from stale cache and MMU state
@ 2026-05-30 18:37 Maíra Canal
  2026-05-30 18:37 ` [PATCH 1/4] drm/v3d: Wait for pending L2T flush before cleaning caches Maíra Canal
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Maíra Canal @ 2026-05-30 18:37 UTC (permalink / raw)
  To: Melissa Wen, Iago Toral; +Cc: kernel-dev, dri-devel, stable, Maíra Canal

Some users have reported hard system hangs on the Raspberry Pi 4 (V3D 4.2)
under GPU load [1][2][3]. Investigation had traced these to V3D caches and
MMU being left in an inconsistent state across PM transitions. This series
addresses three distinct issues in the cache and MMU maintenance:

  1. PATCH 1: Addresses an issue on pre-V3D 7.1 hardware, in which
     starting a clean while an L2T flush is still pending can clobber bits
     in L2TCACTL and leave the caches inconsistent. This issue existed
     before the runtime PM series.

  2. PATCH 2: Fixes the MMU TLB/cache flush in v3d_mmu_set_page_table()
     being silently skipped during runtime resume. Directly addresses
     the system hangs reported by the users.

  3. PATCH 3: Cleans the V3D caches on runtime suspend, so all dirty lines
     are written back to memory before the power domain is shut down.
     Directly addresses the error `v3d fec00000.v3d: MMU error from
     client L2T (7) at 0xff877600, pte invalid` reported during the
     hangs.

Together these restore correct cache/MMU coherency around runtime PM,
addressing the reported hangs. Moreover, with this fixes, it was possible
to reduce the autosuspend delay, which was increased as the shorter delays
used to cause more frequent runtime suspend/resume cycles, which exposed
the cache and MMU coherency bugs as random GPU hangs. With those fixed,
we can reduce the autosuspend delay to a more reasonable value.

[1] https://github.com/raspberrypi/linux/issues/7381
[2] https://github.com/raspberrypi/linux/issues/7396
[3] https://github.com/raspberrypi/linux/issues/7397

Best regards,
- Maíra

---
Maíra Canal (4):
      drm/v3d: Wait for pending L2T flush before cleaning caches
      drm/v3d: Flush MMU TLB and cache during runtime resume
      drm/v3d: Clean caches before runtime suspend
      drm/v3d: Reduce PM runtime autosuspend delay

 drivers/gpu/drm/v3d/v3d_drv.c   |  2 +-
 drivers/gpu/drm/v3d/v3d_gem.c   |  8 ++++++++
 drivers/gpu/drm/v3d/v3d_mmu.c   | 31 ++++++++++++++++++++++---------
 drivers/gpu/drm/v3d/v3d_power.c |  2 ++
 4 files changed, 33 insertions(+), 10 deletions(-)
---
base-commit: 61de054a772a1feda6364931ab1baf9038abf1c8
change-id: 20260528-v3d-fix-rpi4-freezes-8bae519d04ce


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

end of thread, other threads:[~2026-06-04  5:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-30 18:37 [PATCH 0/4] drm/v3d: Fix RPi 4 system hangs from stale cache and MMU state Maíra Canal
2026-05-30 18:37 ` [PATCH 1/4] drm/v3d: Wait for pending L2T flush before cleaning caches Maíra Canal
2026-06-04  5:23   ` Claude review: " Claude Code Review Bot
2026-05-30 18:37 ` [PATCH 2/4] drm/v3d: Flush MMU TLB and cache during runtime resume Maíra Canal
2026-06-04  5:23   ` Claude review: " Claude Code Review Bot
2026-05-30 18:37 ` [PATCH 3/4] drm/v3d: Clean caches before runtime suspend Maíra Canal
2026-06-04  5:23   ` Claude review: " Claude Code Review Bot
2026-05-30 18:37 ` [PATCH 4/4] drm/v3d: Reduce PM runtime autosuspend delay Maíra Canal
2026-06-04  5:23   ` Claude review: " Claude Code Review Bot
2026-06-04  5:23 ` Claude review: drm/v3d: Fix RPi 4 system hangs from stale cache and MMU state Claude Code Review Bot

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