drm/v3d: Fix perfmon build error/warning
authorTvrtko Ursulin <tvrtko.ursulin@igalia.com>
Tue, 4 Jun 2024 16:02:10 +0000 (17:02 +0100)
committerMaxime Ripard <mripard@kernel.org>
Wed, 5 Jun 2024 08:44:51 +0000 (10:44 +0200)
commit9c3951ec27b947ea419b48294ff7342fd15005dc
tree579e8b2137ca48ec6ebc9ef5f8101a0e7ca12386
parent35e7a72a67190a3846cfe2f87add4ed1229b2248
drm/v3d: Fix perfmon build error/warning

Move static const array into the source file to fix the "defined but not
used" errors.

The fix is perhaps not the prettiest due hand crafting the array sizes
in v3d_performance_counters.h, but I did add some build time asserts to
validate the counts look sensible, so hopefully it is good enough for a
quick fix.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Fixes: 3cbcbe016c31 ("drm/v3d: Add Performance Counters descriptions for V3D 4.2 and 7.1")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202405211137.hueFkLKG-lkp@intel.com/Cc: MaĆ­ra Canal <mcanal@igalia.com>
Cc: Iago Toral Quiroga <itoral@igalia.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240604160210.24073-1-tursulin@igalia.com
drivers/gpu/drm/v3d/v3d_drv.c
drivers/gpu/drm/v3d/v3d_drv.h
drivers/gpu/drm/v3d/v3d_perfmon.c
drivers/gpu/drm/v3d/v3d_performance_counters.h