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: Add some sensor data to amdxdna
Date: Tue, 03 Mar 2026 14:37:39 +1000	[thread overview]
Message-ID: <review-overall-20260228061109.361239-1-superm1@kernel.org> (raw)
In-Reply-To: <20260228061109.361239-1-superm1@kernel.org>

Overall Series Review

Subject: Add some sensor data to amdxdna
Author: "Mario Limonciello (AMD)" <superm1@kernel.org>
Patches: 4
Reviewed: 2026-03-03T14:37:39.281145

---

This 2-patch series adds sensor data reporting to the amdxdna (NPU accelerator) driver by hooking into the AMD PMF (Platform Management Framework) driver to obtain realtime NPU power and column utilization metrics. The UAPI enum `DRM_AMDXDNA_QUERY_SENSORS` already exists but had no handler — this series provides the implementation.

The overall approach is reasonable, but there are several design issues:

1. **Patch 2 breaks the API contract established by patch 1** — patch 1 requires a buffer for 1 sensor, patch 2 retroactively requires space for 1+N sensors or returns `-EINVAL`. Userspace cannot discover the required buffer size without trial-and-error.
2. **The macro abstraction is messy** — patch 1 introduces `AIE2_GET_PMF_NPU_DATA` then patch 2 immediately adds a parallel `AIE2_GET_PMF_NPU_METRICS`, leaving the former as dead code.
3. **The `unitm` / `units` semantics are inconsistent** for the power sensor.

---

---
Generated by Claude Code Patch Reviewer

      parent reply	other threads:[~2026-03-03  4:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-28  6:10 [PATCH 0/2] Add some sensor data to amdxdna Mario Limonciello (AMD)
2026-02-28  6:10 ` [PATCH 1/2] accel/amdxdna: Add IOCTL to retrieve realtime NPU power estimate Mario Limonciello (AMD)
2026-03-03  4:37   ` Claude review: " Claude Code Review Bot
2026-02-28  6:10 ` [PATCH 2/2] accel/amdxdna: Support sensors for column utilization Mario Limonciello (AMD)
2026-02-28 19:56   ` Lizhi Hou
2026-03-03  4:37   ` Claude review: " Claude Code Review Bot
2026-03-03  4:37 ` 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-20260228061109.361239-1-superm1@kernel.org \
    --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