diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2024-02-13 00:04:28 +0300 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2024-02-16 14:52:50 +0300 |
commit | 61e738d81f759743bebe5df41b5cc6f777aedaa5 (patch) | |
tree | 1e3c6ba6559a2c7286eaba0fb97fd7948c8a6a97 /drivers/gpu/drm/xe | |
parent | 905a176a3ca3d269eb4ea682aa047fcb378498c4 (diff) | |
download | linux-61e738d81f759743bebe5df41b5cc6f777aedaa5.tar.xz |
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>
Diffstat (limited to 'drivers/gpu/drm/xe')
-rw-r--r-- | drivers/gpu/drm/xe/xe_drm_client.c | 2 |
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; |