diff options
author | Marek Olšák <[email protected]> | 2019-05-08 20:13:46 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-05-16 13:15:36 -0400 |
commit | 6b3343e5d80abf162b45f0d7e977449588824706 (patch) | |
tree | a1ef9651b112fe4f7cd2b80efc869bd1a872dffb | |
parent | 78e35df52aa2f7d770f929a0866a0faa89c261a9 (diff) |
winsys/amdgpu: report a CS rejection as a reset only if there's no GPU reset
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c index 555150a7018..955edb3a670 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c @@ -352,12 +352,6 @@ amdgpu_ctx_query_reset_status(struct radeon_winsys_ctx *rwctx) uint32_t result, hangs; int r; - /* Return a failure due to a rejected command submission. */ - if (ctx->ws->num_total_rejected_cs > ctx->initial_num_total_rejected_cs) { - return ctx->num_rejected_cs ? PIPE_GUILTY_CONTEXT_RESET : - PIPE_INNOCENT_CONTEXT_RESET; - } - /* Return a failure due to a GPU hang. */ r = amdgpu_cs_query_reset_state(ctx->ctx, &result, &hangs); if (r) { @@ -374,6 +368,11 @@ amdgpu_ctx_query_reset_status(struct radeon_winsys_ctx *rwctx) return PIPE_UNKNOWN_CONTEXT_RESET; case AMDGPU_CTX_NO_RESET: default: + /* Return a failure due to a rejected command submission. */ + if (ctx->ws->num_total_rejected_cs > ctx->initial_num_total_rejected_cs) { + return ctx->num_rejected_cs ? PIPE_GUILTY_CONTEXT_RESET : + PIPE_INNOCENT_CONTEXT_RESET; + } return PIPE_NO_RESET; } } |