]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/v3d: Replace IDR with XArray for perfmon tracking
authorMaíra Canal <mcanal@igalia.com>
Tue, 27 Jan 2026 11:56:59 +0000 (08:56 -0300)
committerMaíra Canal <mcanal@igalia.com>
Mon, 2 Feb 2026 10:54:43 +0000 (07:54 -0300)
commit0a5b0d095bcdb219348ed8ae1c97ee99fc4913b8
tree5e28934af0770570cdf5281b8ea49dcf59220492
parent3d65e4c276b32c03450261d114e495fda03c8e97
drm/v3d: 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 here, introduce the v3d_perfmon_delete() helper to consolidate
the perfmon cleanup logic used by both v3d_perfmon_close_file() and
v3d_perfmon_destroy_ioctl().

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