summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2016-10-10 22:24:27 +0200
committerMarek Olšák <marek.olsak@amd.com>2016-10-12 18:29:40 +0200
commitd7e74b52bbd41ce3699cb3f75320e0592c1d6a29 (patch)
treeb49abd548967583c4375d4ae65fc06cbf411cbe6
parente4bbab90224116b53a178612aafa83318d4eaf46 (diff)
downloadexternal_mesa3d-d7e74b52bbd41ce3699cb3f75320e0592c1d6a29.zip
external_mesa3d-d7e74b52bbd41ce3699cb3f75320e0592c1d6a29.tar.gz
external_mesa3d-d7e74b52bbd41ce3699cb3f75320e0592c1d6a29.tar.bz2
winsys/amdgpu: fix infinite loop w/ RADEON_NOOP=1 caused by unsubmitted fences
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
-rw-r--r--src/gallium/winsys/amdgpu/drm/amdgpu_cs.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
index c0e810c..2b86827 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)