summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2024-02-12 16:04:28 -0500
committerChristian König <christian.koenig@amd.com>2024-02-16 12:52:50 +0100
commit61e738d81f759743bebe5df41b5cc6f777aedaa5 (patch)
tree1e3c6ba6559a2c7286eaba0fb97fd7948c8a6a97
parent905a176a3ca3d269eb4ea682aa047fcb378498c4 (diff)
downloadlinux-stable-61e738d81f759743bebe5df41b5cc6f777aedaa5.tar.gz
linux-stable-61e738d81f759743bebe5df41b5cc6f777aedaa5.tar.bz2
linux-stable-61e738d81f759743bebe5df41b5cc6f777aedaa5.zip
drm/xe: Update shared stats to use the new gem helper
Switch to using the new gem shared memory stats helper rather than hand rolling it. Link: https://lore.kernel.org/all/20231207180225.439482-1-alexander.deucher@amd.com/ Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com>
-rw-r--r--drivers/gpu/drm/xe/xe_drm_client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c
index 82d1305e831f..ecf2eb67d310 100644
--- a/drivers/gpu/drm/xe/xe_drm_client.c
+++ b/drivers/gpu/drm/xe/xe_drm_client.c
@@ -113,7 +113,7 @@ static void bo_meminfo(struct xe_bo *bo,
else
mem_type = XE_PL_TT;
- if (bo->ttm.base.handle_count > 1)
+ if (drm_gem_object_is_shared_for_memory_stats(&bo->ttm.base))
stats[mem_type].shared += sz;
else
stats[mem_type].private += sz;