diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2017-01-05 14:10:49 +0100 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2017-01-05 14:21:48 +0100 |
commit | 9688fdb47e0206792553225be2ac8ae63fe6a854 (patch) | |
tree | 765accbc1f074eb2a28268a3ed4df21080412c1d /tests/kms_chv_cursor_fail.c | |
parent | 5bef56d52b0e226a54318960044a4dd877e3b6aa (diff) |
kms_chv_cursor_fail: Stop looking at output->valid.
Use the proper iterator macros to prevent ever having an invalid config.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'tests/kms_chv_cursor_fail.c')
-rw-r--r-- | tests/kms_chv_cursor_fail.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/tests/kms_chv_cursor_fail.c b/tests/kms_chv_cursor_fail.c index 8f878cbf..0158580c 100644 --- a/tests/kms_chv_cursor_fail.c +++ b/tests/kms_chv_cursor_fail.c @@ -226,7 +226,7 @@ static void test_edges(data_t *data, unsigned int edges) } } -static bool prepare_crtc(data_t *data) +static void prepare_crtc(data_t *data) { drmModeModeInfo *mode; igt_display_t *display = &data->display; @@ -235,13 +235,6 @@ static bool prepare_crtc(data_t *data) /* select the pipe we want to use */ igt_output_set_pipe(data->output, data->pipe); cursor_disable(data); - igt_display_commit(display); - - if (!data->output->valid) { - igt_output_set_pipe(data->output, PIPE_ANY); - igt_display_commit(display); - return false; - } mode = igt_output_get_mode(data->output); igt_create_pattern_fb(data->drm_fd, mode->hdisplay, mode->vdisplay, @@ -272,8 +265,6 @@ static bool prepare_crtc(data_t *data) igt_pipe_crc_collect_crc(data->pipe_crc, &data->ref_crc); igt_pipe_crc_collect_crc(data->pipe_crc, &data->ref_crc); igt_pipe_crc_collect_crc(data->pipe_crc, &data->ref_crc); - - return true; } static void cleanup_crtc(data_t *data) @@ -300,9 +291,8 @@ static void test_crtc(data_t *data, unsigned int edges) create_cursor_fb(data, data->curw, data->curh); - for_each_connected_output(display, data->output) { - if (!prepare_crtc(data)) - continue; + for_each_valid_output_on_pipe(display, data->pipe, data->output) { + prepare_crtc(data); valid_tests++; |