aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
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_object.h
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_object.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_object.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
index a3ea8a82db23..be679c42b0b8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
@@ -138,12 +138,18 @@ struct amdgpu_bo_vm {
struct amdgpu_mem_stats {
/* current VRAM usage, includes visible VRAM */
uint64_t vram;
+ /* current shared VRAM usage, includes visible VRAM */
+ uint64_t vram_shared;
/* current visible VRAM usage */
uint64_t visible_vram;
/* current GTT usage */
uint64_t gtt;
+ /* current shared GTT usage */
+ uint64_t gtt_shared;
/* current system memory usage */
uint64_t cpu;
+ /* current shared system memory usage */
+ uint64_t cpu_shared;
/* sum of evicted buffers, includes visible VRAM */
uint64_t evicted_vram;
/* sum of evicted buffers due to CPU access */