diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-06-20 23:19:18 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-06-21 07:51:34 +0100 |
commit | 5b558c58a5d72710e1ace61c35f022fc8e3146de (patch) | |
tree | a5169940bbf2ca59d0404a25bd551b6713e269ba /tests/prime_vgem.c | |
parent | a153f95393515c11a76f87145d91e2fa4f1ff568 (diff) |
igt/prime_vgem: Speed up implicit fence failure
Close the batch before asserting so that we don't have to wait for a
hang after a failure.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/prime_vgem.c')
-rw-r--r-- | tests/prime_vgem.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/prime_vgem.c b/tests/prime_vgem.c index 86e25256..6bdd5670 100644 --- a/tests/prime_vgem.c +++ b/tests/prime_vgem.c @@ -153,6 +153,7 @@ static void work(int i915, int dmabuf, unsigned ring, uint32_t flags) struct drm_i915_gem_relocation_entry store[1024+1]; struct drm_i915_gem_execbuffer2 execbuf; unsigned size = ALIGN(ARRAY_SIZE(store)*16 + 4, 4096); + bool read_busy, write_busy; uint32_t *batch, *bbe; int i, count; @@ -228,12 +229,14 @@ static void work(int i915, int dmabuf, unsigned ring, uint32_t flags) gem_close(i915, obj[BATCH].handle); gem_close(i915, obj[SCRATCH].handle); - igt_assert(prime_busy(dmabuf, true)); - igt_assert(prime_busy(dmabuf, false)); + write_busy = prime_busy(dmabuf, false); + read_busy = prime_busy(dmabuf, true); *bbe = MI_BATCH_BUFFER_END; __sync_synchronize(); munmap(batch, size); + + igt_assert(read_busy && write_busy); } static void test_busy(int i915, int vgem, unsigned ring, uint32_t flags) |