public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: accel/amdxdna: Initial support for AIE4 platform
Date: Tue, 31 Mar 2026 17:05:08 +1000	[thread overview]
Message-ID: <review-overall-20260330163705.3153647-1-lizhi.hou@amd.com> (raw)
In-Reply-To: <20260330163705.3153647-1-lizhi.hou@amd.com>

Overall Series Review

Subject: accel/amdxdna: Initial support for AIE4 platform
Author: Lizhi Hou <lizhi.hou@amd.com>
Patches: 10
Reviewed: 2026-03-31T17:05:08.529572

---

This 6-patch series adds initial AIE4 (NPU3) Physical Function support with SR-IOV to the amdxdna accel driver (PCI IDs 0x17F2 and 0x1B0B). The approach is to refactor existing AIE2-specific mailbox, PSP, and SMU code into shared "aie_" common code, then build AIE4 support on top.

**Overall assessment: The refactoring approach is sound**, and the series is structured logically (common code first, then AIE4 specifics). However, there are several issues:

1. **Two `struct amdxdna_dev_hdl` definitions** — AIE2 (`aie2_pci.h`) and AIE4 (`aie4_pci.h`) define completely different structs with the same name. This works because they're compiled in separate translation units, but it's fragile and makes the codebase confusing. A more scalable approach would use different names or a proper inheritance pattern.

2. **Two `struct amdxdna_dev_priv` definitions** — same problem. Both `aie2_pci.h` and `aie4_pci.h` define this struct differently.

3. **Behavioral change in status checking** — The old `DECLARE_AIE2_MSG` used `MAX_AIE2_STATUS_CODE` for the status sentinel, the new `DECLARE_AIE_MSG` uses `-1`. This changes how success/failure is determined in `aie_send_mgmt_msg_wait()`.

4. **UAPI gap** — `AMDXDNA_DEV_TYPE_PF = 2` skips value 1, which should be explicitly documented.

5. **Missing `sriov_configure` in existing ops** — NULL dereference is avoided by a check, but the ops struct lacks the field declaration in the same patch that adds it.

---

---
Generated by Claude Code Patch Reviewer

      parent reply	other threads:[~2026-03-31  7:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-30 16:36 [PATCH V1 0/6] accel/amdxdna: Initial support for AIE4 platform Lizhi Hou
2026-03-30 16:37 ` [PATCH V1 1/6] accel/amdxdna: Create shared functions for AIE2 and AIE4 Lizhi Hou
2026-03-31  7:05   ` Claude review: " Claude Code Review Bot
2026-03-30 16:37 ` [PATCH V1 2/6] accel/amdxdna: Add basic support for AIE4 devices Lizhi Hou
2026-03-31  7:05   ` Claude review: " Claude Code Review Bot
2026-03-30 16:37 ` [PATCH V1 3/6] accel/amdxdna: Create common PSP interfaces for AIE2 and AIE4 Lizhi Hou
2026-03-31  7:05   ` Claude review: " Claude Code Review Bot
2026-03-30 16:37 ` [PATCH V1 4/6] accel/amdxdna: Add AIE4 firmware loading Lizhi Hou
2026-03-30 20:17   ` Mario Limonciello
2026-03-30 20:30     ` yidong Zhang
2026-03-31  2:45   ` Mario Limonciello
2026-03-31  7:05   ` Claude review: " Claude Code Review Bot
2026-03-30 16:37 ` [PATCH V1 5/6] accel/amdxdna: Create common SMU interfaces for AIE2 and AIE4 Lizhi Hou
2026-03-31  7:05   ` Claude review: " Claude Code Review Bot
2026-03-30 16:37 ` [PATCH V1 6/6] accel/amdxdna: Add AIE4 power on and off support Lizhi Hou
2026-03-31  7:05   ` Claude review: " Claude Code Review Bot
2026-03-31  7:05 ` Claude Code Review Bot [this message]

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-overall-20260330163705.3153647-1-lizhi.hou@amd.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