]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/vc4: Replace IDR with XArray for perfmon tracking
authorMaíra Canal <mcanal@igalia.com>
Tue, 27 Jan 2026 11:57:00 +0000 (08:57 -0300)
committerMaíra Canal <mcanal@igalia.com>
Mon, 2 Feb 2026 10:54:49 +0000 (07:54 -0300)
commitb1cc4172cc60b1039235c9dfc08c3c1ffa4fb863
treea8e340677431f65dc3f4fc8f48a68b1acd966367
parent0a5b0d095bcdb219348ed8ae1c97ee99fc4913b8
drm/vc4: Replace IDR with XArray for perfmon tracking

The IDR interface is deprecated and the XArray API is the recommended
replacement. Replace the per-file IDR used to track perfmons with an
XArray. This allows us to remove the external mutex that protects the
IDR.

While at it, introduce the vc4_perfmon_delete() helper to consolidate
the perfmon cleanup logic used by both vc4_perfmon_close_file() and
vc4_perfmon_destroy_ioctl(). Also, remove the redundant assignment of
vc4file->dev to itself in vc4_perfmon_open_file().

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Link: https://patch.msgid.link/20260127115822.64401-2-mcanal@igalia.com
Signed-off-by: Maíra Canal <mcanal@igalia.com>
drivers/gpu/drm/vc4/vc4_drv.h
drivers/gpu/drm/vc4/vc4_perfmon.c