diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2017-01-05 14:13:34 +0100 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2017-01-05 14:21:48 +0100 |
commit | 63d6e48ced2ae31cb1a6bcd3ecac47bb0eeb0792 (patch) | |
tree | 6e8b81c103dfe2174419dd061d8102d5173e6d4d | |
parent | 9d22af79367ff0464ce55c8e73574103475977f4 (diff) |
kms_mmap_write_crc: 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>
-rw-r--r-- | tests/kms_mmap_write_crc.c | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/tests/kms_mmap_write_crc.c b/tests/kms_mmap_write_crc.c index fce0471d..eb8586d1 100644 --- a/tests/kms_mmap_write_crc.c +++ b/tests/kms_mmap_write_crc.c @@ -161,7 +161,7 @@ static void test(data_t *data) igt_assert_crc_equal(&crc, &data->ref_crc); } -static bool prepare_crtc(data_t *data) +static void prepare_crtc(data_t *data) { igt_display_t *display = &data->display; igt_output_t *output = data->output; @@ -169,13 +169,6 @@ static bool prepare_crtc(data_t *data) /* select the pipe we want to use */ igt_output_set_pipe(output, data->pipe); - igt_display_commit(display); - - if (!output->valid) { - igt_output_set_pipe(output, PIPE_ANY); - igt_display_commit(display); - return false; - } mode = igt_output_get_mode(output); @@ -197,8 +190,6 @@ static bool prepare_crtc(data_t *data) /* get reference crc for the white fb */ igt_pipe_crc_collect_crc(data->pipe_crc, &data->ref_crc); - - return true; } static void cleanup_crtc(data_t *data) @@ -224,20 +215,16 @@ static void run_test(data_t *data) igt_output_t *output; enum pipe pipe; - for_each_connected_output(display, output) { + for_each_pipe_with_valid_output(display, pipe, output) { data->output = output; - for_each_pipe(display, pipe) { - data->pipe = pipe; - - if (!prepare_crtc(data)) - continue; + data->pipe = pipe; - test(data); - cleanup_crtc(data); + prepare_crtc(data); + test(data); + cleanup_crtc(data); - /* once is enough */ - return; - } + /* once is enough */ + return; } igt_skip("no valid crtc/connector combinations found\n"); |