[PATCH V2 0/2] Get real time power input via AMD PMF

Lizhi Hou posted 2 patches 1 day, 7 hours ago
drivers/accel/amdxdna/aie2_pci.c        | 29 ++++++++++
drivers/accel/amdxdna/aie2_pci.h        | 20 +++++++
drivers/accel/amdxdna/amdxdna_pci_drv.c |  3 +-
drivers/platform/x86/amd/pmf/core.c     | 75 +++++++++++++++++++++++++
drivers/platform/x86/amd/pmf/pmf.h      |  2 +
include/linux/amd-pmf-io.h              | 21 +++++++
6 files changed, 149 insertions(+), 1 deletion(-)
[PATCH V2 0/2] Get real time power input via AMD PMF
Posted by Lizhi Hou 1 day, 7 hours ago
Adding new NPU metrics API to AMD PMF driver is pending because of
lacking real case.
  https://lore.kernel.org/all/d344b850-f68d-f9a5-f0dc-55af4b48b714@linux.intel.com/

Create xdna driver patch to fetch real time power input via PMF API.
Here is an example output with xrt-smi(1) tool.

# xrt-smi examine -r all | grep Power
  Power Mode             : Default
Estimated Power          : 0.563 Watts

V2:
    Including header file for struct mutex will be added by
        https://patchwork.kernel.org/project/platform-driver-x86/patch/20251202042219.245173-1-Shyam-sundar.S-k@amd.com/
    Add include for U32_MAX
    Replace snprintf by scnprintf
    Fix coding style

Lizhi Hou (1):
  accel/amdxdna: Add IOCTL to retrieve realtime NPU power estimate

Shyam Sundar S K (1):
  platform/x86/amd/pmf: Introduce new interface to export NPU metrics

 drivers/accel/amdxdna/aie2_pci.c        | 29 ++++++++++
 drivers/accel/amdxdna/aie2_pci.h        | 20 +++++++
 drivers/accel/amdxdna/amdxdna_pci_drv.c |  3 +-
 drivers/platform/x86/amd/pmf/core.c     | 75 +++++++++++++++++++++++++
 drivers/platform/x86/amd/pmf/pmf.h      |  2 +
 include/linux/amd-pmf-io.h              | 21 +++++++
 6 files changed, 149 insertions(+), 1 deletion(-)

-- 
2.34.1