From 884e65d6f2141658ab4ff88143a98ef0e610cc16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 8 Jan 2025 14:05:38 -0500 Subject: [PATCH] radeonsi: add a workaround for hanging compute queues on gfx9 APUs Fixes: 58b512ddd6e - radeonsi: execute clears at resource allocation using compute instead of gfx Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12310 --- src/gallium/drivers/radeonsi/si_pipe.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) --- a/src/gallium/drivers/radeonsi/si_pipe.c 2025-01-22 23:36:40.117734405 -0700 +++ b/src/gallium/drivers/radeonsi/si_pipe.c 2025-01-22 23:36:33.804734716 -0700 @@ -1483,9 +1483,14 @@ /* Create the auxiliary context. This must be done last. */ for (unsigned i = 0; i < ARRAY_SIZE(sscreen->aux_contexts); i++) { (void)mtx_init(&sscreen->aux_contexts[i].lock, mtx_plain | mtx_recursive); + /* Compute queues hang on gfx9 APUs, see: + * https://gitlab.freedesktop.org/mesa/mesa/-/issues/12310 + */ + bool is_gfx9_apu = sscreen->info.gfx_level == GFX9 && !sscreen->info.has_dedicated_vram; bool compute = !sscreen->info.has_graphics || - &sscreen->aux_contexts[i] == &sscreen->aux_context.compute_resource_init || + (&sscreen->aux_contexts[i] == &sscreen->aux_context.compute_resource_init && + !is_gfx9_apu) || &sscreen->aux_contexts[i] == &sscreen->aux_context.shader_upload; sscreen->aux_contexts[i].ctx = si_create_context(&sscreen->b, -- 2.43.0