summaryrefslogtreecommitdiff
path: root/tests/kms_pipe_b_c_ivb.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-01-16 11:32:49 +0100
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-01-16 11:33:29 +0100
commitc401f46516e8d5ed8db775e74d993b91935998b0 (patch)
treecaaebcdfb067536ca16598b83380f9eaf61a66a5 /tests/kms_pipe_b_c_ivb.c
parentc460b41dc1c76092e09a5381797d626f3dd8bd44 (diff)
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 <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'tests/kms_pipe_b_c_ivb.c')
-rw-r--r--tests/kms_pipe_b_c_ivb.c11
1 files changed, 6 insertions, 5 deletions
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