From 0812e945e139688ec75677b21db93ebec0323677 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Thu, 26 Jun 2025 08:36:50 +0200 Subject: [PATCH] pan/mod: Add a pan_mod_get_handler() implementation when PAN_ARCH is defined This allows us to call pan_mod_get_handler() from static inline functions defined in headers that are included from per-gen and gen-agnostic source files. Signed-off-by: Boris Brezillon Reviewed-by: Lars-Ivar Hesselberg Simonsen Reviewed-by: Eric R. Smith Acked-by: Daniel Stone Part-of: --- src/panfrost/lib/pan_mod.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/panfrost/lib/pan_mod.h b/src/panfrost/lib/pan_mod.h index c64ec1b0b04..7b5f85a2be4 100644 --- a/src/panfrost/lib/pan_mod.h +++ b/src/panfrost/lib/pan_mod.h @@ -47,6 +47,13 @@ struct pan_mod_handler { #ifdef PAN_ARCH const struct pan_mod_handler *GENX(pan_mod_get_handler)(uint64_t modifier); + +static inline const struct pan_mod_handler * +pan_mod_get_handler(unsigned arch, uint64_t modifier) +{ + assert(arch == PAN_ARCH); + return GENX(pan_mod_get_handler)(modifier); +} #else const struct pan_mod_handler *pan_mod_get_handler_v4(uint64_t modifier); const struct pan_mod_handler *pan_mod_get_handler_v5(uint64_t modifier);