[igt-dev] [PATCH i-g-t] tests/kms_plane_multiple: Run only on the first valid output

Arkadiusz Hiler arkadiusz.hiler at intel.com
Tue Apr 9 13:48:00 UTC 2019


There is no real need for testing on each output, as they do not affect
CRC coming out from the pipe. Let's use first viable one.

Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Cc: Martin Peres <martin.peres at linux.intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
---
 tests/kms_plane_multiple.c | 26 +++++---------------------
 1 file changed, 5 insertions(+), 21 deletions(-)

diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
index bfaeeded..d2d02a5f 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -302,41 +302,25 @@ static void
 test_plane_position(data_t *data, enum pipe pipe, uint64_t tiling)
 {
 	igt_output_t *output;
-	int connected_outs;
 	int n_planes = data->display.pipes[pipe].n_planes;
 
+	output = igt_get_single_output_for_pipe(&data->display, pipe);
+	igt_require(output);
+
 	if (!opt.user_seed)
 		opt.seed = time(NULL);
 
 	srand(opt.seed);
 
-	connected_outs = 0;
-	for_each_valid_output_on_pipe(&data->display, pipe, output) {
-		test_plane_position_with_output(data, pipe,
-						output,
-						n_planes,
-						tiling);
-		connected_outs++;
-	}
-
-	igt_skip_on(connected_outs == 0);
-
+	test_plane_position_with_output(data, pipe, output,
+					n_planes, tiling);
 }
 
 static void
 run_tests_for_pipe(data_t *data, enum pipe pipe)
 {
-	igt_output_t *output;
-
 	igt_fixture {
-		int valid_tests = 0;
-
 		igt_skip_on(pipe >= data->display.n_pipes);
-
-		for_each_valid_output_on_pipe(&data->display, pipe, output)
-			valid_tests++;
-
-		igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
 		igt_require(data->display.pipes[pipe].n_planes > 0);
 	}
 
-- 
2.20.1



More information about the igt-dev mailing list