From 36cd1972035d9acf1c9ddb5ba144f04f3f7bfb6a Mon Sep 17 00:00:00 2001 From: Christoph Pillmayer Date: Fri, 20 Mar 2026 14:44:14 +0100 Subject: [PATCH] pan/perf: Make sure category indices match --- src/panfrost/perf/pan_perf.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/panfrost/perf/pan_perf.c b/src/panfrost/perf/pan_perf.c index a6010c88cb8..ddf0f627623 100644 --- a/src/panfrost/perf/pan_perf.c +++ b/src/panfrost/perf/pan_perf.c @@ -22,6 +22,11 @@ pan_perf_counter_read_raw(const struct pan_perf *perf, enum pan_perf_counter_categories category, uint8_t block_index, uint32_t counter_index) { + STATIC_ASSERT((int)PAN_KMOD_PERF_CAT_FRONTEND == (int)PAN_PERF_COUNTER_CAT_FRONTEND); + STATIC_ASSERT((int)PAN_KMOD_PERF_CAT_TILER == (int)PAN_PERF_COUNTER_CAT_TILER); + STATIC_ASSERT((int)PAN_KMOD_PERF_CAT_MEMSYS == (int)PAN_PERF_COUNTER_CAT_MEMSYS); + STATIC_ASSERT((int)PAN_KMOD_PERF_CAT_SHADER == (int)PAN_PERF_COUNTER_CAT_SHADER); + assert(perf->session->data != NULL); const uint32_t val_offset = perf->mem_layout.category[category].offset +