summaryrefslogtreecommitdiff
path: root/tests/kms_mmap_write_crc.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-08-10 14:09:14 +0200
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-08-15 17:12:39 +0200
commiteda8cc9f5f61e84d72615e470030ff3c3271af71 (patch)
tree6cf83fde22551f7f732c22203c956099fd1a3a73 /tests/kms_mmap_write_crc.c
parent8d2ad9d4d4ba35e1ca8a4989347825fa8e8c0072 (diff)
tests/kms_mmap_write_crc: Add drmModeDirtyFB after dirtying fb
The test shows the need for coherency through the dma-buf sync ioctl's, but forgets to call dirtyfb, without this the FB Is never updated and we will fail anyway. Solve this by adding a drmModeDirtyFB, I've confirmed by adding -n that the test will still faill without prime_sync_end anyway, so the test is still useful. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Marta Löfstedt <marta.lofstedt@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101109 Tested-by: Chris Wilson <chris@chris-wilson.co.uk> #llc Acked-by: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> #llc
Diffstat (limited to 'tests/kms_mmap_write_crc.c')
-rw-r--r--tests/kms_mmap_write_crc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/kms_mmap_write_crc.c b/tests/kms_mmap_write_crc.c
index e5f089f6..dd44ce97 100644
--- a/tests/kms_mmap_write_crc.c
+++ b/tests/kms_mmap_write_crc.c
@@ -156,6 +156,8 @@ static void test(data_t *data)
if (ioctl_sync)
prime_sync_end(dma_buf_fd, true);
+ do_or_die(drmModeDirtyFB(data->drm_fd, fb->fb_id, NULL, 0));
+
/* check that the crc is as expected, which requires that caches got flushed */
igt_pipe_crc_collect_crc(data->pipe_crc, &crc);
igt_assert_crc_equal(&crc, &data->ref_crc);