[Intel-gfx] [PATCH i-g-t] tests/kms_mmap_write_crc: Add drmModeDirtyFB after dirtying fb
Lofstedt, Marta
marta.lofstedt at intel.com
Fri Aug 11 13:26:53 UTC 2017
Acked-by: Marta Lofstedt <marta.lofstedt at intel.com>
> -----Original Message-----
> From: Maarten Lankhorst [mailto:maarten.lankhorst at linux.intel.com]
> Sent: Thursday, August 10, 2017 3:42 PM
> To: intel-gfx at lists.freedesktop.org
> Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>; Lofstedt,
> Marta <marta.lofstedt at intel.com>
> Subject: [PATCH i-g-t] 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 at linux.intel.com>
> Cc: Marta Löfstedt <marta.lofstedt at intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101109
> ---
> tests/kms_mmap_write_crc.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tests/kms_mmap_write_crc.c b/tests/kms_mmap_write_crc.c
> index e5f089f6b78f..dd44ce97238a 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);
> --
> 2.11.0
More information about the Intel-gfx
mailing list