summaryrefslogtreecommitdiff
path: root/tests/kms_available_modes_crc.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-07-24 15:59:26 +0200
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-08-14 17:35:12 +0200
commit5d1c82954995b36943ed7f812bf9637ce3fbd47d (patch)
treee91cb173cc1d5ad01479869faeefc23fab376293 /tests/kms_available_modes_crc.c
parentdeead1d39368ac11a66f0d9def39f75d1db7e78b (diff)
tests: Replace calls to igt_pipe_crc_drain + get_single with igt_pipe_crc_get_current()
This is a more race free of accomplishing the same. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/kms_available_modes_crc.c')
-rw-r--r--tests/kms_available_modes_crc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index b70ef5d7..b67b4f83 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -101,8 +101,7 @@ static void generate_comparison_crc_list(data_t *data, igt_output_t *output)
igt_plane_set_fb(primary, &data->primary_fb);
igt_display_commit2(&data->display, data->commit);
- igt_pipe_crc_drain(data->pipe_crc);
- igt_pipe_crc_get_single(data->pipe_crc, &data->cursor_crc);
+ igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->cursor_crc);
igt_plane_set_fb(primary, NULL);
igt_display_commit2(&data->display, data->commit);
@@ -113,8 +112,7 @@ static void generate_comparison_crc_list(data_t *data, igt_output_t *output)
igt_plane_set_fb(primary, &data->primary_fb);
igt_display_commit2(&data->display, data->commit);
- igt_pipe_crc_drain(data->pipe_crc);
- igt_pipe_crc_get_single(data->pipe_crc, &data->fullscreen_crc);
+ igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->fullscreen_crc);
cairo_destroy(cr);
igt_remove_fb(data->gfx_fd, &data->primary_fb);
@@ -400,8 +398,7 @@ test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
igt_display_commit2(&data->display, data->commit);
if (do_crc) {
- igt_pipe_crc_drain(data->pipe_crc);
- igt_pipe_crc_get_single(data->pipe_crc, &current_crc);
+ igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &current_crc);
if (plane->type != DRM_PLANE_TYPE_CURSOR) {
if (!igt_check_crc_equal(&current_crc,