summaryrefslogtreecommitdiff
path: root/Documentation/accel
diff options
context:
space:
mode:
authorLizhi Hou <lizhi.hou@amd.com>2026-04-09 08:22:59 -0700
committerLizhi Hou <lizhi.hou@amd.com>2026-04-09 13:41:47 -0700
commite0169d0c690f03f379bf71d9332bb2065a5c6a05 (patch)
tree28d451cdb48a2cad460d5182c6d1c6cb5be57138 /Documentation/accel
parentaf29fcbe806ecd10078c406470fecb902b3c0e55 (diff)
downloadlinux-next-e0169d0c690f03f379bf71d9332bb2065a5c6a05.tar.gz
linux-next-e0169d0c690f03f379bf71d9332bb2065a5c6a05.zip
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
Diffstat (limited to 'Documentation/accel')
-rw-r--r--Documentation/accel/amdxdna/amdnpu.rst25
1 files changed, 25 insertions, 0 deletions
diff --git a/Documentation/accel/amdxdna/amdnpu.rst b/Documentation/accel/amdxdna/amdnpu.rst
index 42e54904f9a8..064973bf4893 100644
--- a/Documentation/accel/amdxdna/amdnpu.rst
+++ b/Documentation/accel/amdxdna/amdnpu.rst
@@ -270,6 +270,31 @@ MERT can report various kinds of telemetry information like the following:
* Deep Sleep counter
* etc.
+.. _amdxdna-usage-stats:
+
+Amdxdna DRM client usage stats implementation
+=============================================
+
+The amdxdna driver implements the DRM client usage stats specification as
+documented in :ref:`drm-client-usage-stats`.
+
+Example of the output showing the implemented key value pairs:
+
+::
+
+ pos: 0
+ flags: 0100002
+ mnt_id: 29
+ ino: 939
+ drm-driver: amdxdna_accel_driver
+ drm-client-id: 3219
+ drm-pdev: 0000:c5:00.1
+ amdxdna_accel_driver-heap-alloc: 60 KiB
+ amdxdna_accel_driver-internal-alloc: 67588 KiB
+ amdxdna_accel_driver-external-alloc: 0
+ drm-total-memory: 67632 KiB
+ drm-shared-memory: 0
+
References
==========