mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-19 07:43:46 -05:00
drm/i915: 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/ Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.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>
This commit is contained in:
committed by
Christian König
parent
ba1a58d5b9
commit
905a176a3c
@@ -53,7 +53,7 @@ obj_meminfo(struct drm_i915_gem_object *obj,
|
||||
obj->mm.region->id : INTEL_REGION_SMEM;
|
||||
const u64 sz = obj->base.size;
|
||||
|
||||
if (obj->base.handle_count > 1)
|
||||
if (drm_gem_object_is_shared_for_memory_stats(&obj->base))
|
||||
stats[id].shared += sz;
|
||||
else
|
||||
stats[id].private += sz;
|
||||
|
||||
Reference in New Issue
Block a user