aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2024-02-12 16:04:28 -0500
committerChristian König <[email protected]>2024-02-16 12:52:50 +0100
commit61e738d81f759743bebe5df41b5cc6f777aedaa5 (patch)
tree1e3c6ba6559a2c7286eaba0fb97fd7948c8a6a97
parent905a176a3ca3d269eb4ea682aa047fcb378498c4 (diff)
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/[email protected]/ Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Christian König <[email protected]>
-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;