radeonsi: rename stop_exec_on_failure -> allow_context_lost

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17968>
This commit is contained in:
Marek Olšák
2022-08-09 13:06:37 -04:00
committed by Marge Bot
parent 43703d8265
commit 445b897907
5 changed files with 7 additions and 8 deletions
+1 -2
View File
@@ -475,7 +475,6 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, unsign
struct si_context *sctx = CALLOC_STRUCT(si_context);
struct radeon_winsys *ws = sscreen->ws;
int shader, i;
bool stop_exec_on_failure = (flags & PIPE_CONTEXT_LOSE_CONTEXT_ON_RESET) != 0;
enum radeon_ctx_priority priority;
if (!sctx) {
@@ -537,7 +536,7 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, unsign
}
ws->cs_create(&sctx->gfx_cs, sctx->ctx, sctx->has_graphics ? AMD_IP_GFX : AMD_IP_COMPUTE,
(void *)si_flush_gfx_cs, sctx, stop_exec_on_failure);
(void *)si_flush_gfx_cs, sctx, flags & PIPE_CONTEXT_LOSE_CONTEXT_ON_RESET);
/* Initialize private allocators. */
u_suballocator_init(&sctx->allocator_zeroed_memory, &sctx->b, 128 * 1024, 0,
+1 -1
View File
@@ -531,7 +531,7 @@ struct radeon_winsys {
struct radeon_winsys_ctx *ctx, enum amd_ip_type amd_ip_type,
void (*flush)(void *ctx, unsigned flags,
struct pipe_fence_handle **fence),
void *flush_ctx, bool stop_exec_on_failure);
void *flush_ctx, bool allow_context_lost);
/**
* Set or change the CS preamble, which is a sequence of packets that is executed before
+3 -3
View File
@@ -959,7 +959,7 @@ amdgpu_cs_create(struct radeon_cmdbuf *rcs,
void (*flush)(void *ctx, unsigned flags,
struct pipe_fence_handle **fence),
void *flush_ctx,
bool stop_exec_on_failure)
bool allow_context_lost)
{
struct amdgpu_ctx *ctx = (struct amdgpu_ctx*)rwctx;
struct amdgpu_cs *cs;
@@ -976,7 +976,7 @@ amdgpu_cs_create(struct radeon_cmdbuf *rcs,
cs->flush_cs = flush;
cs->flush_data = flush_ctx;
cs->ip_type = ip_type;
cs->stop_exec_on_failure = stop_exec_on_failure;
cs->allow_context_lost = allow_context_lost;
cs->noop = ctx->ws->noop_cs;
cs->has_chaining = ctx->ws->info.gfx_level >= GFX7 &&
(ip_type == AMD_IP_GFX || ip_type == AMD_IP_COMPUTE);
@@ -1489,7 +1489,7 @@ static void amdgpu_cs_submit_ib(void *job, void *gdata, int thread_index)
bool noop = false;
if (acs->stop_exec_on_failure && acs->ctx->num_rejected_cs) {
if (acs->allow_context_lost && acs->ctx->num_rejected_cs) {
r = -ECANCELED;
} else {
struct drm_amdgpu_cs_chunk chunks[7];
+1 -1
View File
@@ -154,7 +154,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;
bool allow_context_lost;
bool noop;
bool has_chaining;
@@ -177,7 +177,7 @@ radeon_drm_cs_create(struct radeon_cmdbuf *rcs,
void (*flush)(void *ctx, unsigned flags,
struct pipe_fence_handle **fence),
void *flush_ctx,
bool stop_exec_on_failure)
bool allow_context_lost)
{
struct radeon_drm_winsys *ws = ((struct radeon_ctx*)ctx)->ws;
struct radeon_drm_cs *cs;