From c401f46516e8d5ed8db775e74d993b91935998b0 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Mon, 16 Jan 2017 11:32:49 +0100 Subject: kms_pipe_b_c_ivb: Use for_each_pipe_with_valid_output. This will cause multiple calls to igt_output_set_pipe, but that's harmless. This function should be used since not all outputs may be used on pipe B and C. Signed-off-by: Maarten Lankhorst --- tests/kms_pipe_b_c_ivb.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'tests/kms_pipe_b_c_ivb.c') diff --git a/tests/kms_pipe_b_c_ivb.c b/tests/kms_pipe_b_c_ivb.c index bd727f0b..89005383 100644 --- a/tests/kms_pipe_b_c_ivb.c +++ b/tests/kms_pipe_b_c_ivb.c @@ -119,21 +119,22 @@ find_outputs(data_t *data, igt_output_t **output1, igt_output_t **output2) { int count = 0; igt_output_t *output; + enum pipe pipe; *output1 = NULL; *output2 = NULL; - for_each_connected_output(&data->display, output) { - if (!(*output1)) + for_each_pipe_with_valid_output(&data->display, pipe, output) { + if (pipe == PIPE_B && !*output1 && output != *output2) *output1 = output; - else if (!(*output2)) + + if (pipe == PIPE_C && output != *output1 && !*output2) *output2 = output; igt_output_set_pipe(output, PIPE_ANY); - count++; } - igt_skip_on_f(count < 2, "Not enough connected outputs\n"); + igt_skip_on_f(!*output1 || !*output2, "Not enough connected outputs\n"); } static void -- cgit v1.2.3