From: Alex Deucher Date: Mon, 12 Feb 2024 21:04:28 +0000 (-0500) Subject: drm/xe: Update shared stats to use the new gem helper X-Git-Tag: v6.9-rc1~126^2~17^2~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=61e738d81f759743bebe5df41b5cc6f777aedaa5;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Christian König Signed-off-by: Christian König --- diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c index 82d1305e831f2..ecf2eb67d3106 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;