diff options
author | Marek Olšák <[email protected]> | 2018-11-02 16:09:13 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-11-09 14:55:04 -0500 |
commit | d2b2364313c33cb27a97f1d6e257392cb4710935 (patch) | |
tree | 04b5b35389108b30c23f3326b9a2882fa476941f /src/gallium/winsys | |
parent | 4bec5025ac4baf616944f1eac64a50f1983de9b6 (diff) |
radeonsi: stop command submission with PIPE_CONTEXT_LOSE_CONTEXT_ON_RESET only
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 6 | ||||
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_cs.h | 1 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 3 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c index 5986810d4e9..5ec3b470a15 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c @@ -923,7 +923,8 @@ amdgpu_cs_create(struct radeon_winsys_ctx *rwctx, enum ring_type ring_type, void (*flush)(void *ctx, unsigned flags, struct pipe_fence_handle **fence), - void *flush_ctx) + void *flush_ctx, + bool stop_exec_on_failure) { struct amdgpu_ctx *ctx = (struct amdgpu_ctx*)rwctx; struct amdgpu_cs *cs; @@ -939,6 +940,7 @@ amdgpu_cs_create(struct radeon_winsys_ctx *rwctx, cs->flush_cs = flush; cs->flush_data = flush_ctx; cs->ring_type = ring_type; + cs->stop_exec_on_failure = stop_exec_on_failure; struct amdgpu_cs_fence_info fence_info; fence_info.handle = cs->ctx->user_fence_bo; @@ -1395,7 +1397,7 @@ void amdgpu_cs_submit_ib(void *job, int thread_index) if (acs->ring_type == RING_GFX) ws->gfx_bo_list_counter += cs->num_real_buffers; - if (acs->ctx->num_rejected_cs) { + if (acs->stop_exec_on_failure && acs->ctx->num_rejected_cs) { r = -ECANCELED; } else { struct drm_amdgpu_cs_chunk chunks[6]; diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.h b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.h index 9f5a4fd991a..5de770c89e7 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.h +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.h @@ -129,6 +129,7 @@ struct amdgpu_cs { /* Flush CS. */ void (*flush_cs)(void *ctx, unsigned flags, struct pipe_fence_handle **fence); void *flush_data; + bool stop_exec_on_failure; struct util_queue_fence flush_completed; struct pipe_fence_handle *next_fence; diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c index 798be78504c..490c246d6e0 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c @@ -150,7 +150,8 @@ radeon_drm_cs_create(struct radeon_winsys_ctx *ctx, enum ring_type ring_type, void (*flush)(void *ctx, unsigned flags, struct pipe_fence_handle **fence), - void *flush_ctx) + void *flush_ctx, + bool stop_exec_on_failure) { struct radeon_drm_winsys *ws = (struct radeon_drm_winsys*)ctx; struct radeon_drm_cs *cs; |