summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-07-19 10:30:54 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-07-19 10:32:00 +0100
commitec194975e46821c5a6198d9486d3aa9be9a83aec (patch)
tree205a34ed0d7983d81071ccd72aa4f1c395468f67 /tests
parente7ed4ef77f9bbb5b93a1d57cb601c28dcb5786ad (diff)
igt/prime_vgem/fence-read: Insert a delay
Ensure that the child does need to sleep before the vgem is written. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r--tests/prime_vgem.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/prime_vgem.c b/tests/prime_vgem.c
index 5bd13cda..2effcfa7 100644
--- a/tests/prime_vgem.c
+++ b/tests/prime_vgem.c
@@ -58,7 +58,7 @@ static void test_read(int vgem, int i915)
gem_close(i915, handle);
}
-static void test_fence_read(int vgem, int i915)
+static void test_fence_read(int i915, int vgem)
{
struct vgem_bo scratch;
uint32_t handle;
@@ -86,6 +86,8 @@ static void test_fence_read(int vgem, int i915)
gem_close(i915, handle);
}
+ sleep(1);
+
ptr = vgem_mmap(vgem, &scratch, PROT_WRITE);
for (i = 0; i < 1024; i++)
ptr[1024*i] = i;