drm/v3d: Size the kperfmon_ids array at runtime
authorTvrtko Ursulin <tvrtko.ursulin@igalia.com>
Thu, 11 Jul 2024 13:53:36 +0000 (14:53 +0100)
committerMaíra Canal <mcanal@igalia.com>
Sat, 13 Jul 2024 14:00:31 +0000 (11:00 -0300)
commitc9d6630f7c67a5c6cc2ba90f1abbd0dff7d8eca9
treebc45437223dbe1fd08781fe6fb77286f08b42714
parent4bd75a81e61ab691154a83068a694c9af44e2dd6
drm/v3d: Size the kperfmon_ids array at runtime

Instead of statically reserving pessimistic space for the kperfmon_ids
array, make the userspace extension code allocate the exactly required
amount of space.

Apart from saving some memory at runtime, this also removes the need for
the V3D_MAX_PERFMONS macro whose removal will benefit further driver
cleanup.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240711135340.84617-8-tursulin@igalia.com
drivers/gpu/drm/v3d/v3d_drv.h
drivers/gpu/drm/v3d/v3d_sched.c
drivers/gpu/drm/v3d/v3d_submit.c