From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: Add some sensor data to amdxdna Date: Tue, 03 Mar 2026 14:37:39 +1000 Message-ID: In-Reply-To: <20260228061109.361239-1-superm1@kernel.org> References: <20260228061109.361239-1-superm1@kernel.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Overall Series Review Subject: Add some sensor data to amdxdna Author: "Mario Limonciello (AMD)" Patches: 4 Reviewed: 2026-03-03T14:37:39.281145 --- This 2-patch series adds sensor data reporting to the amdxdna (NPU accelera= tor) driver by hooking into the AMD PMF (Platform Management Framework) dri= ver to obtain realtime NPU power and column utilization metrics. The UAPI e= num `DRM_AMDXDNA_QUERY_SENSORS` already exists but had no handler =E2=80=94= 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** =E2=80=94 pat= ch 1 requires a buffer for 1 sensor, patch 2 retroactively requires space f= or 1+N sensors or returns `-EINVAL`. Userspace cannot discover the required= buffer size without trial-and-error. 2. **The macro abstraction is messy** =E2=80=94 patch 1 introduces `AIE2_GE= T_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 senso= r. --- --- Generated by Claude Code Patch Reviewer