Skip to content

Commit

Permalink
drm/i915: Update shared stats to use the new gem helper
Browse files Browse the repository at this point in the history
Switch to using the new gem shared memory stats helper
rather than hand rolling it.

Link: https://lore.kernel.org/all/[email protected]/
Reviewed-by: Tvrtko Ursulin <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
  • Loading branch information
alexdeucher authored and ChristianKoenigAMD committed Feb 16, 2024
1 parent ba1a58d commit 905a176
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_drm_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 905a176

Please sign in to comment.