Skip to content

accel/amdxdna: add query DPM level and DPM frequency table support#1465

Open
donwalkarsoham wants to merge 1 commit into
amd:mainfrom
donwalkarsoham:xrt-smi-validate-dpm
Open

accel/amdxdna: add query DPM level and DPM frequency table support#1465
donwalkarsoham wants to merge 1 commit into
amd:mainfrom
donwalkarsoham:xrt-smi-validate-dpm

Conversation

@donwalkarsoham

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves clock/TOPS reporting for the amdxdna AIE4/NPU3 path by adding firmware queries for the current DPM level and the firmware-programmed (per-silicon) DPM frequency tables, then using those to report live domain frequencies.

Changes:

  • Add new AIE4 management message opcodes and ABI structs for querying DPM frequency tables and current DPM levels.
  • Cache firmware-authoritative DPM frequency tables at probe and use them (plus a live DPM level query) to resolve current AIE/NPU-H frequencies.
  • Update clock metadata reporting to rely on refreshed live clock values from aie_update_counters().

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
drivers/accel/amdxdna/npu3_regs.c Update counters to prefer sensor telemetry when available, otherwise query FW DPM level and map to frequency (FW table preferred, static table fallback).
drivers/accel/amdxdna/aie4_pci.h Extend device handle with cached FW DPM tables and add prototypes for new DPM query/init helpers.
drivers/accel/amdxdna/aie4_pci.c Initialize DPM frequency table cache during AIE4 device query and clarify clock metadata reporting.
drivers/accel/amdxdna/aie4_msg_priv.h Define new AIE4 message opcodes and request/response structs for DPM table/level queries.
drivers/accel/amdxdna/aie4_message.c Implement querying/caching of FW DPM frequency tables and querying current FW DPM levels.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread drivers/accel/amdxdna/aie4_message.c
Comment thread drivers/accel/amdxdna/npu3_regs.c Outdated
Comment thread drivers/accel/amdxdna/npu3_regs.c Outdated
@donwalkarsoham
donwalkarsoham force-pushed the xrt-smi-validate-dpm branch 2 times, most recently from c38174c to 78678a8 Compare July 1, 2026 23:30
@donwalkarsoham
donwalkarsoham requested a review from xdavidz July 1, 2026 23:49
Comment thread drivers/accel/amdxdna/aie4_pci.h Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Comment thread drivers/accel/amdxdna/aie4_message.c
Comment thread drivers/accel/amdxdna/aie4_message.c Outdated
Comment thread drivers/accel/amdxdna/aie4_message.c
Comment thread drivers/accel/amdxdna/aie4_pci.c Outdated
@donwalkarsoham
donwalkarsoham force-pushed the xrt-smi-validate-dpm branch from 98cd198 to 0504cfc Compare July 8, 2026 18:49
Comment thread drivers/accel/amdxdna/aie4_message.c
Comment thread drivers/accel/amdxdna/npu3_regs.c Outdated
Comment thread drivers/accel/amdxdna/npu3_regs.c Outdated
@donwalkarsoham
donwalkarsoham force-pushed the xrt-smi-validate-dpm branch 3 times, most recently from 0ba087e to 42c0e80 Compare July 15, 2026 19:45
@donwalkarsoham
donwalkarsoham requested a review from xdavidz July 15, 2026 23:45
@xdavidz

xdavidz commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

@donwalkarsoham why this is still pending? I need this to test SR-IOV TOPs.

@xdavidz

xdavidz commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

retest this please

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Comment thread drivers/accel/amdxdna/aie4_pci.c
Comment thread drivers/accel/amdxdna/aie4_message.c
Comment thread drivers/accel/amdxdna/npu3_regs.c
Comment thread drivers/accel/amdxdna/npu3_regs.c
Comment thread drivers/accel/amdxdna/aie4_pci.c
NishadSaraf
NishadSaraf previously approved these changes Jul 17, 2026
xdavidz
xdavidz previously approved these changes Jul 17, 2026
maxzhen
maxzhen previously approved these changes Jul 17, 2026
@donwalkarsoham
donwalkarsoham dismissed stale reviews from maxzhen, xdavidz, and NishadSaraf via 586f155 July 17, 2026 23:04
Signed-off-by: Soham Donwalkar <Soham.Donwalkar@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants