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@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10179>
This commit is contained in:
parent
5c3931fbc5
commit
6938aa7534
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue