From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/imagination: Implement handling of context reset notification
Date: Fri, 13 Mar 2026 14:16:58 +1000 [thread overview]
Message-ID: <review-patch3-20260312-b4-firmware-context-reset-notification-handling-v2-3-aec5a64cb06f@imgtec.com> (raw)
In-Reply-To: <20260312-b4-firmware-context-reset-notification-handling-v2-3-aec5a64cb06f@imgtec.com>
Patch Review
This is the main patch. It adds a new `pvr_dump.c` / `pvr_dump.h` and hooks the `ROGUE_FWIF_FWCCB_CMD_CONTEXT_RESET_NOTIFICATION` case into `process_fwccb_command()`.
**Issues and observations:**
1. **Typo in commit message:** "deecoding" should be "decoding":
> `part of handling hardware recovery (HWR) events deecoding the message`
2. **Missing Co-authored-by tag format:** The `Co-authored-by:` tag is present but there is no `Signed-off-by` from Sarah Walker. Kernel convention typically expects a `Signed-off-by` from all co-authors to certify DCO compliance.
3. **`get_dm_name()` comment about PVR_FWIF_DM_TDM:** The code has:
```c
/* PVR_FWIF_DM_TDM has the same index, but is discriminated by a device feature */
case PVR_FWIF_DM_2D:
return "2D or TDM";
```
Since `PVR_FWIF_DM_2D` and `PVR_FWIF_DM_TDM` both equal 1 (confirmed in `pvr_rogue_fwif_common.h:26,31`), you can't have separate `case` labels. The "2D or TDM" string is a reasonable compromise, but it could be improved by checking the device features at runtime (via `pvr_dev`) to print the correct name. The `pvr_device` is already passed to the caller. This is a minor nit though — the current approach is functional.
4. **Cast from u32 to enum in `get_reset_reason_desc` call:**
```c
get_reset_reason_desc((enum rogue_context_reset_reason)data->reset_reason)
```
This is fine functionally, but the `default: return "Unknown"` case in `get_reset_reason_desc()` properly handles unexpected values, which is good. However, this cast slightly contradicts the spirit of patch 2 which changed the field to `u32` precisely because enum sizes aren't fixed. Consider accepting a `u32` parameter in `get_reset_reason_desc()` instead, which would be more consistent. This is a minor style point.
5. **`pvr_dump.c` / `pvr_dump.h` naming:** The file name `pvr_dump` is quite generic. Right now it only contains context reset notification handling. If more dump-type functionality is expected, the name is fine. If this is specifically about FW CCB notification handling, a more specific name might be clearer. This is subjective and not blocking.
6. **Alignment of function parameter continuation in pvr_ccb.c:**
```c
pvr_dump_context_reset_notification(pvr_dev,
&cmd->cmd_data.cmd_context_reset_notification);
```
The continuation line alignment looks slightly off (tabs vs spaces mix), but this matches the surrounding code style in the file, so it's acceptable.
7. **Log level consideration:** All notifications are printed via `drm_info()`. For high-frequency HWR events this could be noisy. A rate-limited variant (`drm_info_ratelimited()`) or using `drm_dbg()` for the detail lines might be worth considering, but this is a design choice the maintainers can weigh in on.
**Overall:** The series is straightforward and correct. The main actionable items are the commit message typo and the missing `Signed-off-by` from the co-author.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-03-13 4:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-12 11:40 [PATCH v2 0/3] drm/imagination: Firmware handling of context reset notification Alexandru Dadu
2026-03-12 11:40 ` [PATCH v2 1/3] drm/imagination: Add missing rogue context reset reasons Alexandru Dadu
2026-03-13 4:16 ` Claude review: " Claude Code Review Bot
2026-03-12 11:40 ` [PATCH v2 2/3] drm/imagination: Switch reset_reason fields from enum to u32 Alexandru Dadu
2026-03-13 4:16 ` Claude review: " Claude Code Review Bot
2026-03-12 11:40 ` [PATCH v2 3/3] drm/imagination: Implement handling of context reset notification Alexandru Dadu
2026-03-13 4:16 ` Claude Code Review Bot [this message]
2026-03-13 4:16 ` Claude review: drm/imagination: Firmware " Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-03-23 18:31 [PATCH v3 0/3] " Alexandru Dadu
2026-03-23 18:31 ` [PATCH v3 3/3] drm/imagination: Implement " Alexandru Dadu
2026-03-24 21:34 ` 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-patch3-20260312-b4-firmware-context-reset-notification-handling-v2-3-aec5a64cb06f@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