From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/imagination: Synchronize interrupts before suspending the GPU
Date: Wed, 27 May 2026 15:07:57 +1000 [thread overview]
Message-ID: <review-patch1-20260526-sync-irqs-6-12-v2-1-b4306e95194d@imgtec.com> (raw)
In-Reply-To: <20260526-sync-irqs-6-12-v2-1-b4306e95194d@imgtec.com>
Patch Review
**Correctness of the approach:**
The patch adds a `synchronize_irq()` call in `pvr_power_fw_disable()` when called from the runtime PM suspend path (`rpm_suspend == true`), placed after the firmware has been told to idle and power off but before `pvr_fw_stop()` actually shuts down hardware:
```c
+ if (rpm_suspend) {
+ /* Wait for late processing of GPU or firmware IRQs in other cores */
+ synchronize_irq(pvr_dev->irq);
+ }
+
return pvr_fw_stop(pvr_dev);
```
This placement is correct — by the time we reach this point, the FW has acknowledged the idle and power-off requests, so no new IRQs should be generated, and `synchronize_irq()` ensures any in-flight handler completes before proceeding with `pvr_fw_stop()`.
**API parameter addition:**
The `bool rpm_suspend` parameter is added to `pvr_power_fw_disable()`:
```c
-pvr_power_fw_disable(struct pvr_device *pvr_dev, bool hard_reset)
+pvr_power_fw_disable(struct pvr_device *pvr_dev, bool hard_reset, bool rpm_suspend)
```
Both call sites are updated correctly:
- `pvr_power_device_suspend()` passes `true` — this is the runtime PM path that needs the synchronization
- `pvr_power_reset()` passes `false` — this path already handles IRQs separately (it calls `disable_irq()`/`disable_irq_nosync()` before entering the reset loop)
**Comparison with upstream:**
The upstream version on drm-next uses `disable_irq()`/`enable_irq()` instead of `synchronize_irq()`, which is stronger — it not only waits for in-flight handlers but also prevents new IRQs from being delivered. However, for the 6.12 stable context, `synchronize_irq()` is sufficient because:
1. By the time it's called, the FW has acknowledged power-off, so no new IRQs should fire
2. It avoids the need for a matching `enable_irq()` in `pvr_power_fw_enable()`, which would require additional changes to a function that doesn't exist in the same form on 6.12
This is a deliberate and reasonable simplification for the stable backport, and the commit message documents this explicitly.
**Minor observations (not blocking):**
- The comment `/* Wait for late processing of GPU or firmware IRQs in other cores */` is clear and explains the "why."
- The `v2` changelog properly notes the only changes were restoring missing upstream trailers, so the core logic is unchanged from v1 which was already reviewed.
**No issues found.** The patch is a clean, minimal stable backport that correctly addresses the race condition.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-27 5:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 8:13 [PATCH 6.12.y v2] drm/imagination: Synchronize interrupts before suspending the GPU Alessio Belle
2026-05-26 13:38 ` Sasha Levin
2026-05-27 5:07 ` Claude review: " Claude Code Review Bot
2026-05-27 5:07 ` Claude Code Review Bot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-05-22 13:15 [PATCH 6.12.y] " Alessio Belle
2026-05-25 8:34 ` Claude review: " Claude Code Review Bot
2026-05-25 8:34 ` Claude Code Review Bot
2026-03-10 11:41 [PATCH 0/2] drm/imagination: Drain " Alessio Belle
2026-03-10 11:41 ` [PATCH 1/2] drm/imagination: Synchronize " Alessio Belle
2026-03-11 3:25 ` Claude review: " Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=review-patch1-20260526-sync-irqs-6-12-v2-1-b4306e95194d@imgtec.com \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox