diff options
author | Tvrtko Ursulin <tvrtko.ursulin@igalia.com> | 2024-07-11 14:53:38 +0100 |
---|---|---|
committer | Maíra Canal <mcanal@igalia.com> | 2024-07-13 11:00:32 -0300 |
commit | 3ef80d4ed6ff8441195a90a7897db3b67f38cd95 (patch) | |
tree | 80442dc9c7e386c6c87b96fae3dc91cb39b0a302 /drivers/gpu/drm/v3d/v3d_performance_counters.h | |
parent | 1be825c5c060b6239f7c8ef45880f885f9dba056 (diff) |
drm/v3d: Move perfmon init completely into own unit
Now that the build time dependencies on various array sizes have been
removed, we can move the perfmon init completely into its own compilation
unit and remove the hardcoded defines.
This improves on the temporary fix quickly delivered in commit
9c3951ec27b9 ("drm/v3d: Fix perfmon build error/warning").
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
References: 9c3951ec27b9 ("drm/v3d: Fix perfmon build error/warning")
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-10-tursulin@igalia.com
Diffstat (limited to 'drivers/gpu/drm/v3d/v3d_performance_counters.h')
-rw-r--r-- | drivers/gpu/drm/v3d/v3d_performance_counters.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/gpu/drm/v3d/v3d_performance_counters.h b/drivers/gpu/drm/v3d/v3d_performance_counters.h index 131b2909522a..d919a2fc9449 100644 --- a/drivers/gpu/drm/v3d/v3d_performance_counters.h +++ b/drivers/gpu/drm/v3d/v3d_performance_counters.h @@ -19,11 +19,17 @@ struct v3d_perf_counter_desc { char description[256]; }; +struct v3d_perfmon_info { + /* + * Different revisions of V3D have different total number of + * performance counters. + */ + unsigned int max_counters; -#define V3D_V42_NUM_PERFCOUNTERS (87) -#define V3D_V71_NUM_PERFCOUNTERS (93) - -/* Maximum number of performance counters supported by any version of V3D */ -#define V3D_MAX_COUNTERS (93) + /* + * Array of counters valid for the platform. + */ + const struct v3d_perf_counter_desc *counters; +}; #endif |