aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2024-02-12 21:04:26 +0000
committerChristian König <[email protected]>2024-02-16 11:52:50 +0000
commitba1a58d5b907bdf1814f8f57434aebc86233430f (patch)
treeeee2a0bfb37d9d8e5a1021740a5984617481a5d9 /drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c
parentdrm: update drm_show_memory_stats() for dma-bufs (diff)
downloadkernel-ba1a58d5b907bdf1814f8f57434aebc86233430f.tar.gz
kernel-ba1a58d5b907bdf1814f8f57434aebc86233430f.zip
drm/amdgpu: add shared fdinfo stats
Add shared stats. Useful for seeing shared memory. v2: take dma-buf into account as well v3: use the new gem helper Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Alex Deucher <[email protected]> Cc: Rob Clark <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c
index 5706b282a0c7..c7df7fa3459f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c
@@ -97,6 +97,10 @@ void amdgpu_show_fdinfo(struct drm_printer *p, struct drm_file *file)
stats.requested_visible_vram/1024UL);
drm_printf(p, "amd-requested-gtt:\t%llu KiB\n",
stats.requested_gtt/1024UL);
+ drm_printf(p, "drm-shared-vram:\t%llu KiB\n", stats.vram_shared/1024UL);
+ drm_printf(p, "drm-shared-gtt:\t%llu KiB\n", stats.gtt_shared/1024UL);
+ drm_printf(p, "drm-shared-cpu:\t%llu KiB\n", stats.cpu_shared/1024UL);
+
for (hw_ip = 0; hw_ip < AMDGPU_HW_IP_NUM; ++hw_ip) {
if (!usage[hw_ip])
continue;