[i-g-t 22/51] tests/kms_plane: Add support for Bigjoiner

Bhanuprakash Modem bhanuprakash.modem at intel.com
Thu Aug 11 16:42:26 UTC 2022


Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
 tests/kms_plane.c | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 3cf3cfd3..466cf8a1 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -56,6 +56,7 @@ typedef struct {
 typedef struct {
 	int drm_fd;
 	igt_display_t display;
+	igt_output_t *output;
 	igt_pipe_crc_t *pipe_crc;
 	const color_t *colors;
 	int num_colors;
@@ -273,12 +274,9 @@ static void
 test_plane_position(data_t *data, enum pipe pipe)
 {
 	int n_planes = data->display.pipes[pipe].n_planes;
-	igt_output_t *output;
+	igt_output_t *output = data->output;
 	igt_crc_t reference_crc;
 
-	output = igt_get_single_output_for_pipe(&data->display, pipe);
-	igt_require(output);
-
 	test_init(data, pipe);
 	test_grab_crc(data, output, pipe, &green, data->flags, &reference_crc);
 
@@ -380,12 +378,9 @@ test_plane_panning_with_output(data_t *data,
 static void
 test_plane_panning(data_t *data, enum pipe pipe)
 {
-	igt_output_t *output;
+	igt_output_t *output = data->output;
 	igt_crc_t ref_crc;
 
-	output = igt_get_single_output_for_pipe(&data->display, pipe);
-	igt_require(output);
-
 	test_init(data, pipe);
 
 	if (data->flags & TEST_PANNING_TOP_LEFT)
@@ -1050,7 +1045,7 @@ test_pixel_formats(data_t *data, enum pipe pipe)
 	igt_plane_t *primary;
 	drmModeModeInfo *mode;
 	bool result;
-	igt_output_t *output;
+	igt_output_t *output = data->output;
 	igt_plane_t *plane;
 
 	if (data->extended) {
@@ -1063,9 +1058,6 @@ test_pixel_formats(data_t *data, enum pipe pipe)
 
 	test_init(data, pipe);
 
-	output = igt_get_single_output_for_pipe(&data->display, pipe);
-	igt_require(output);
-
 	mode = igt_output_get_mode(output);
 
 	igt_create_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
@@ -1108,7 +1100,14 @@ static void run_test(data_t *data, void (*test)(data_t *, enum pipe))
 	enum pipe pipe;
 	int count = 0;
 
-	for_each_pipe(&data->display, pipe) {
+	for_each_pipe_with_single_output(&data->display, pipe, data->output) {
+		igt_display_reset(&data->display);
+
+		igt_output_set_pipe(data->output, pipe);
+		if (!igt_test_constraint(&data->display))
+			continue;
+
+		igt_output_set_pipe(data->output, PIPE_NONE);
 		igt_dynamic_f("pipe-%s-planes", kmstest_pipe_name(pipe))
 			test(data, pipe);
 
-- 
2.35.1



More information about the Intel-gfx-trybot mailing list