From d7e74b52bbd41ce3699cb3f75320e0592c1d6a29 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Mon, 10 Oct 2016 22:24:27 +0200 Subject: winsys/amdgpu: fix infinite loop w/ RADEON_NOOP=1 caused by unsubmitted fences MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Nicolai Hähnle --- src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/gallium/winsys') diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c index c0e810c31c1..2b86827ff53 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c @@ -37,6 +37,8 @@ #include "amd/common/sid.h" +DEBUG_GET_ONCE_BOOL_OPTION(noop, "RADEON_NOOP", false) + /* FENCES */ static struct pipe_fence_handle * @@ -143,6 +145,9 @@ amdgpu_cs_get_next_fence(struct radeon_winsys_cs *rcs) struct amdgpu_cs *cs = amdgpu_cs(rcs); struct pipe_fence_handle *fence = NULL; + if (debug_get_option_noop()) + return NULL; + if (cs->next_fence) { amdgpu_fence_reference(&fence, cs->next_fence); return fence; @@ -1069,8 +1074,6 @@ void amdgpu_cs_sync_flush(struct radeon_winsys_cs *rcs) util_queue_job_wait(&cs->flush_completed); } -DEBUG_GET_ONCE_BOOL_OPTION(noop, "RADEON_NOOP", false) - static int amdgpu_cs_flush(struct radeon_winsys_cs *rcs, unsigned flags, struct pipe_fence_handle **fence) -- cgit v1.2.3