]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
accel/amdxdna: Expose per-client BO memory usage via fdinfo
authorLizhi Hou <lizhi.hou@amd.com>
Thu, 9 Apr 2026 15:22:59 +0000 (08:22 -0700)
committerLizhi Hou <lizhi.hou@amd.com>
Thu, 9 Apr 2026 20:41:47 +0000 (13:41 -0700)
commite0169d0c690f03f379bf71d9332bb2065a5c6a05
tree28d451cdb48a2cad460d5182c6d1c6cb5be57138
parentaf29fcbe806ecd10078c406470fecb902b3c0e55
accel/amdxdna: Expose per-client BO memory usage via fdinfo

Implement amdxdna_show_fdinfo() to report per-client memory usage,
including below driver-specific memory stat:
  - heap allocation
  - internal BO allocation
  - external BO allocation

Hook the implementation into the DRM fdinfo infrastructure via
drm_driver.show_fdinfo, while continuing to expose standard DRM
memory stat through drm_show_memory_stats().

This improves observability of per-process memory usage and aligns
with existing fdinfo reporting mechanisms used by other drivers.

Suggested-by: Ian Rogers <irogers@google.com>
Signed-off-by: Max Zhen <max.zhen@amd.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patch.msgid.link/20260409152259.176883-1-lizhi.hou@amd.com
Documentation/accel/amdxdna/amdnpu.rst
Documentation/gpu/drm-usage-stats.rst
drivers/accel/amdxdna/amdxdna_pci_drv.c