summaryrefslogtreecommitdiff
path: root/tests/gem_concurrent_all.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-02-25 21:43:01 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2016-03-01 13:25:07 +0000
commitaed69b56d4c63a19594440be6679307b2781ae2c (patch)
treec378ad1952669e651c11a89e1e2136a70db06fb7 /tests/gem_concurrent_all.c
parent925e5e1caef9b56bd53df457735514b644c7a399 (diff)
lib: Add read/write direction support for dmabuf synchronisation
Allow read-only synchronisation on dmabuf mmaps, useful to allow concurrent read-read testing between the CPU and GPU. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_concurrent_all.c')
-rw-r--r--tests/gem_concurrent_all.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/gem_concurrent_all.c b/tests/gem_concurrent_all.c
index f62901c9..8718f169 100644
--- a/tests/gem_concurrent_all.c
+++ b/tests/gem_concurrent_all.c
@@ -365,10 +365,10 @@ dmabuf_set_bo(struct buffers *b, drm_intel_bo *bo, uint32_t val)
uint32_t *v;
int size;
- prime_sync_start(dmabuf->fd);
+ prime_sync_start(dmabuf->fd, true);
for (v = dmabuf->map, size = b->size; size--; v++)
*v = val;
- prime_sync_end(dmabuf->fd);
+ prime_sync_end(dmabuf->fd, true);
}
static void
@@ -378,10 +378,10 @@ dmabuf_cmp_bo(struct buffers *b, drm_intel_bo *bo, uint32_t val)
uint32_t *v;
int size;
- prime_sync_start(dmabuf->fd);
+ prime_sync_start(dmabuf->fd, false);
for (v = dmabuf->map, size = b->size; size--; v++)
igt_assert_eq_u32(*v, val);
- prime_sync_end(dmabuf->fd);
+ prime_sync_end(dmabuf->fd, false);
}
static void