From 8872f5eea47a1857435cb78e7ac8e732130a736d Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Thu, 29 Jan 2026 12:31:03 +0100 Subject: [PATCH] ethosu: Add debug option for forcing U85 generation Part-of: --- src/gallium/drivers/ethosu/ethosu_device.c | 1 + src/gallium/drivers/ethosu/ethosu_device.h | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/ethosu/ethosu_device.c b/src/gallium/drivers/ethosu/ethosu_device.c index 22d8b02ae90..5216aeb5a2e 100644 --- a/src/gallium/drivers/ethosu/ethosu_device.c +++ b/src/gallium/drivers/ethosu/ethosu_device.c @@ -20,6 +20,7 @@ static const struct debug_named_value ethosu_debug_options[] = { {"zero_bos", ETHOSU_DBG_ZERO, "Zero buffers for debugging"}, {"disable_nhcwb16", ETHOSU_DBG_DISABLE_NHCWB16, "Disable NHCWB16"}, {"disable_sram", ETHOSU_DBG_DISABLE_SRAM, "Disable SRAM"}, + {"force_u85", ETHOSU_DBG_FORCE_U85, "Force U85 behavior even on U65 hardware"}, DEBUG_NAMED_VALUE_END}; DEBUG_GET_ONCE_FLAGS_OPTION(ethosu_debug, "ETHOSU_DEBUG", ethosu_debug_options, 0) diff --git a/src/gallium/drivers/ethosu/ethosu_device.h b/src/gallium/drivers/ethosu/ethosu_device.h index fa08a8fe6a8..86b32cfda74 100644 --- a/src/gallium/drivers/ethosu/ethosu_device.h +++ b/src/gallium/drivers/ethosu/ethosu_device.h @@ -20,6 +20,7 @@ enum ethosu_dbg { ETHOSU_DBG_ZERO = BITFIELD_BIT(2), ETHOSU_DBG_DISABLE_NHCWB16 = BITFIELD_BIT(3), ETHOSU_DBG_DISABLE_SRAM = BITFIELD_BIT(4), + ETHOSU_DBG_FORCE_U85 = BITFIELD_BIT(5), }; extern int ethosu_debug; @@ -58,7 +59,10 @@ ethosu_screen(struct pipe_screen *p) static inline bool ethosu_is_u65(struct ethosu_screen *e) { - return DRM_ETHOSU_ARCH_MAJOR(e->info.id) == 1; + if (DBG_ENABLED(ETHOSU_DBG_FORCE_U85)) + return false; + else + return DRM_ETHOSU_ARCH_MAJOR(e->info.id) == 1; } struct ethosu_context {