Mesa (master): radeonsi: only recreate the aux_context when soft recovery failed

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 14 07:12:50 UTC 2021


Module: Mesa
Branch: master
Commit: 6938aa7534ae805b18fcdd66374b3586ad21bce9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6938aa7534ae805b18fcdd66374b3586ad21bce9

Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date:   Fri Apr  9 18:15:23 2021 +0200

radeonsi: only recreate the aux_context when soft recovery failed

When a GPU hang is detected in the kernel, it can uses 2 different
mechanism to recovery: a soft recovery or a hard reset.

Soft recovery doesn't lose the vram content so contexts are still
valid. In this case we don't need to recreate the aux context.

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

---

 src/gallium/drivers/radeonsi/si_pipe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 13f41b2d630..6c141d94b57 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -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 && !(sctx->context_flags & SI_CONTEXT_FLAG_AUX)) {
+   if (status != PIPE_NO_RESET && needs_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);



More information about the mesa-commit mailing list