diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-02-25 21:43:01 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-03-01 13:25:07 +0000 |
commit | aed69b56d4c63a19594440be6679307b2781ae2c (patch) | |
tree | c378ad1952669e651c11a89e1e2136a70db06fb7 /tests/prime_mmap_coherency.c | |
parent | 925e5e1caef9b56bd53df457735514b644c7a399 (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/prime_mmap_coherency.c')
-rw-r--r-- | tests/prime_mmap_coherency.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/prime_mmap_coherency.c b/tests/prime_mmap_coherency.c index a9a2664a..180d8a4d 100644 --- a/tests/prime_mmap_coherency.c +++ b/tests/prime_mmap_coherency.c @@ -97,7 +97,7 @@ static void test_read_flush(bool expect_stale_cache) * until we try to read them again in step #4. This behavior could be fixed * by flush CPU read right before accessing the CPU pointer */ if (!expect_stale_cache) - prime_sync_start(dma_buf_fd); + prime_sync_start(dma_buf_fd, false); for (i = 0; i < (width * height) / 4; i++) if (ptr_cpu[i] != 0x11111111) { @@ -149,7 +149,7 @@ static void test_write_flush(bool expect_stale_cache) /* This is the main point of this test: !llc hw requires a cache write * flush right here (explained in step #4). */ if (!expect_stale_cache) - prime_sync_start(dma_buf_fd); + prime_sync_start(dma_buf_fd, true); memset(ptr_cpu, 0x11, width * height); |