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: Wed, 25 Mar 2026 07:34:16 +1000 [thread overview]
Message-ID: <review-patch3-20260323-b4-firmware-context-reset-notification-handling-v3-3-1a66049a9a65@imgtec.com> (raw)
In-Reply-To: <20260323-b4-firmware-context-reset-notification-handling-v3-3-1a66049a9a65@imgtec.com>
Patch Review
**Verdict: Acceptable with minor nits.**
The implementation is clean and does what the commit message describes. A few observations:
1. **Commit message typo**: "deecoding" should be "decoding":
```
part of handling hardware recovery (HWR) events deecoding the message
```
2. **`get_reset_reason_desc` parameter type**: The function signature takes `enum rogue_context_reset_reason reason`, but the caller casts a `u32` to this enum:
```c
get_reset_reason_desc((enum rogue_context_reset_reason)data->reset_reason)
```
This is fine functionally and the `default` case handles unknown values, but since patch 2 explicitly moved away from using the enum type in structures (because "enum is not a fixed size"), it would be more consistent to have `get_reset_reason_desc` take a `u32` parameter instead. This is a style nit — the generated code will be the same.
3. **`get_dm_name` comment about TDM**: The comment and return value are slightly confusing:
```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_TDM` and `PVR_FWIF_DM_2D` are both defined as `(1)` in `pvr_rogue_fwif_common.h`, you can't have separate `case` labels. Returning `"2D or TDM"` is a reasonable compromise, but it could be improved by checking the device feature flag at runtime to return the correct name (since `pvr_dev` is available to the caller). This is optional — the current approach is acceptable for a diagnostic message.
4. **`pvr_dump_context_reset_notification` data parameter should be `const`**: The function only reads from `data`, so the signature should be:
```c
void pvr_dump_context_reset_notification(struct pvr_device *pvr_dev,
const struct rogue_fwif_fwccb_cmd_context_reset_data *data);
```
(Both in the `.c` and `.h` files.)
5. **New file naming**: Creating `pvr_dump.c`/`.h` for a single function is fine if more dump/diagnostic functions are expected to be added later (which seems likely given the generic naming). If this will remain the only function, it could arguably live in `pvr_ccb.c` directly. Not a blocking issue.
6. **Alignment in `pvr_ccb.c`**: The indentation of the continuation line uses spaces that don't align perfectly with the opening parenthesis — minor formatting nit:
```c
pvr_dump_context_reset_notification(pvr_dev,
&cmd->cmd_data.cmd_context_reset_notification);
```
The `&cmd` should align under `pvr_dev`. This is cosmetic.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-03-24 21:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 18:31 [PATCH v3 0/3] drm/imagination: Firmware handling of context reset notification Alexandru Dadu
2026-03-23 18:31 ` [PATCH v3 1/3] drm/imagination: Add missing rogue context reset reasons Alexandru Dadu
2026-03-24 21:34 ` Claude review: " Claude Code Review Bot
2026-03-23 18:31 ` [PATCH v3 2/3] drm/imagination: Switch reset_reason fields from enum to u32 Alexandru Dadu
2026-03-24 21:34 ` Claude review: " Claude Code Review Bot
2026-03-23 18:31 ` [PATCH v3 3/3] drm/imagination: Implement handling of context reset notification Alexandru Dadu
2026-03-24 21:34 ` Claude Code Review Bot [this message]
2026-03-24 8:26 ` [PATCH v3 0/3] drm/imagination: Firmware " Matt Coster
2026-03-24 21:34 ` Claude review: " Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-03-12 11:40 [PATCH v2 0/3] " Alexandru Dadu
2026-03-12 11:40 ` [PATCH v2 3/3] drm/imagination: Implement " Alexandru Dadu
2026-03-13 4:16 ` 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-20260323-b4-firmware-context-reset-notification-handling-v3-3-1a66049a9a65@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