radeonsi: do not recreate the aux context from the aux context
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 9 Apr 2021 16:13:56 +0000 (18:13 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 14 Apr 2021 07:00:00 +0000 (07:00 +0000)
This will cause a deadlock since si_get_reset_status is called
from flush, which is called with aux_context_lock taken.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10179>

src/gallium/drivers/radeonsi/si_pipe.c

index 18972a0..13f41b2 100644 (file)
@@ -355,7 +355,7 @@ static enum pipe_reset_status si_get_reset_status(struct pipe_context *ctx)
    bool needs_reset;
    enum pipe_reset_status status = sctx->ws->ctx_query_reset_status(sctx->ctx, &needs_reset);
 
-   if (status != PIPE_NO_RESET) {
+   if (status != PIPE_NO_RESET && !(sctx->context_flags & SI_CONTEXT_FLAG_AUX)) {
       /* Call the gallium frontend to set a no-op API dispatch. */
       if (sctx->device_reset_callback.reset) {
          sctx->device_reset_callback.reset(sctx->device_reset_callback.data, status);