summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlsak, Marek <Marek.Olsak@amd.com>2020-09-30 12:19:05 -0400
committerMarge Bot <eric+marge@anholt.net>2020-10-01 00:06:29 +0000
commit5e8791a0bf00384cbd7e3a7231bddbc48bd550a8 (patch)
tree0c0b9318b8d1c8ee80fcdef757d0131c3e5c8bdf
parent90e42f87ac56f1a3466151afd998cd8a4cd2f071 (diff)
radeonsi: Fix dead lock with aux_context_lock in si_screen_clear_buffer.
After disable SDMA on Arcturus(gfx9), dead lock with aux_context_lock is detected since si_screen_clear_buffer is called recursively before release lock. The call trace is: si_clear_render_target->si_compute_clear_render_target-> si_launch_grid_internal->si_launch_grid->si_emit_cache_flush-> si_prim_discard_signal_next_compute_ib_start->u_suballocator_alloc-> si_resource_create->si_buffer_create->si_alloc_resource-> si_screen_clear_buffer->simple_mtx_lock-> si_sdma_clear_buffer->si_pipe_clear_buffer-> si_clear_buffer->si_compute_do_clear_or_copy-> si_launch_grid_internal->si_launch_grid->si_emit_cache_flush-> si_prim_discard_signal_next_compute_ib_start->u_suballocator_alloc-> si_resource_create->si_buffer_create->si_alloc_resource-> si_screen_clear_buffer->simple_mtx_lock Fixes: 07a49bf5976 "radeonsi: disable SDMA on gfx9" Signed-off-by: James Zhu <James.Zhu@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6941>
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index a8e67c32855..ab476013873 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -601,6 +601,8 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, unsign
si_initialize_prim_discard_tunables(sscreen, is_aux_context,
&sctx->prim_discard_vertex_count_threshold,
&sctx->index_ring_size_per_ib);
+ } else {
+ sctx->prim_discard_vertex_count_threshold = UINT_MAX;
}
/* Initialize SDMA functions. */