diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2022-07-26 12:13:12 +0200 |
---|---|---|
committer | Karolina Drobnik <karolina.drobnik@intel.com> | 2022-08-03 10:16:31 +0200 |
commit | 18931d27318204664c8484444814852deb30c18f (patch) | |
tree | 09e2f178c43a1a3f5e32300424be09f05ff97f6c | |
parent | c8f6aaf32d8308543678fd7ac47ae5e7b05a5a20 (diff) |
tests/gem_exec_fence: Coordinate sleep with the start of the request
Wait until we know the request is running on the GPU before sleeping
and giving a chance for other fences to run ahead.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Karolina Drobnik <karolina.drobnik@intel.com>
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
-rw-r--r-- | tests/i915/gem_exec_fence.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/i915/gem_exec_fence.c b/tests/i915/gem_exec_fence.c index 260aa82c0..7ff7614da 100644 --- a/tests/i915/gem_exec_fence.c +++ b/tests/i915/gem_exec_fence.c @@ -324,7 +324,9 @@ static void test_fence_await(int fd, const intel_ctx_t *ctx, .ahnd = ahnd, .ctx = ctx, .engine = e->flags, - .flags = IGT_SPIN_FENCE_OUT | spin_hang(flags)); + .flags = IGT_SPIN_FENCE_OUT | + IGT_SPIN_POLL_RUN | + spin_hang(flags)); igt_assert(spin->out_fence != -1); i = 0; @@ -347,6 +349,7 @@ static void test_fence_await(int fd, const intel_ctx_t *ctx, i++; } + igt_spin_busywait_until_started(spin); /* Long, but not too long to anger preemption disable checks */ usleep(50 * 1000); /* 50 ms, typical preempt reset is 150+ms */ |