From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/v3d: Clean caches before runtime suspend Date: Thu, 04 Jun 2026 15:23:15 +1000 Message-ID: In-Reply-To: <20260530-v3d-fix-rpi4-freezes-v1-3-c2c8307da6ce@igalia.com> References: <20260530-v3d-fix-rpi4-freezes-v1-0-c2c8307da6ce@igalia.com> <20260530-v3d-fix-rpi4-freezes-v1-3-c2c8307da6ce@igalia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Purpose:** Ensure all dirty cache lines are written back to memory before= the power domain is shut down, preventing "MMU error from client L2T... pt= e invalid" on resume. **Code added in `v3d_power.c:55`:** ```c v3d_clean_caches(v3d); ``` This is placed after `v3d_irq_disable(v3d)` and before `v3d_suspend_sms(v3d= )`. **Analysis:** - The placement is correct: IRQs are disabled (no new work can arrive), so = the clean is serialized. The clean happens before SMS suspend/clock disable= , so the hardware is still accessible. - `v3d_clean_caches()` takes `v3d->cache_clean_lock`, which serializes agai= nst any in-flight flush from `v3d_flush_l2t()`. Since IRQs are disabled and= the scheduler should have drained, there shouldn't be contention, but the = lock provides safety. - The Fixes tag correctly points to the runtime PM introduction commit. **One observation:** The commit message says this directly addresses the "p= te invalid" MMU errors. The `Closes:` tags on all three GitHub issues are a= pplied to this patch specifically. But the cover letter says patch 2 "direc= tly addresses the system hangs" and patch 3 "directly addresses the error."= Having all three `Closes:` on patch 3 alone seems slightly off =E2=80=94 a= rguably patch 2 is equally important for the fix. However, since patches 2 = and 3 work together and will be applied as a series, this is a nit about at= tribution rather than correctness. **Verdict: Correct and straightforward.** --- --- Generated by Claude Code Patch Reviewer