[igt-dev] [PATCH i-g-t 2/2] tests/kms_plane: Restrict the test execution to two pipes

venkata.sai.patnana at intel.com venkata.sai.patnana at intel.com
Tue Mar 23 10:53:06 UTC 2021


From: Patnana Venkata Sai <venkata.sai.patnana at intel.com>

v2: Moved to igt tests to dynamic (petri)

Cc: Uma Shankar <uma.shankar at intel.com>
Cc: Juha-Pekka Heikkilä <juha-pekka.heikkila at intel.com>
Cc: Modem Bhanuprakash <bhanuprakash.modem at intel.com>
Cc: Karthik B S <karthik.b.s at intel.com>
Cc: Petri Latvala <petri.latvala at intel.com>
Signed-off-by: Patnana Venkata Sai <venkata.sai.patnana at intel.com>
---
 tests/kms_plane.c | 77 ++++++++++++++++++++++++++---------------------
 1 file changed, 42 insertions(+), 35 deletions(-)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index c87983a4e5..6d6a780c2b 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -1028,61 +1028,71 @@ test_pixel_formats(data_t *data, enum pipe pipe)
 }
 
 static void
-run_tests_for_pipe_plane(data_t *data, enum pipe pipe)
+run_tests_for_pipe_plane(data_t *data)
 {
+	enum pipe pipe;
+	int pipe_count=2;
 	igt_fixture {
 		igt_require_pipe(&data->display, pipe);
 		igt_require(data->display.pipes[pipe].n_planes > 0);
 	}
 
 	igt_describe("verify the pixel formats for given plane and pipe");
-	igt_subtest_f("pixel-format-pipe-%s-planes",
-		      kmstest_pipe_name(pipe))
-		test_pixel_formats(data, pipe);
+	igt_subtest_with_dynamic_f("pixel-format-pipe-planes")
+		for_each_pipe_clamped(&data->display, pipe, pipe_count)
+			igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe))
+				test_pixel_formats(data, pipe);
 
 	igt_describe("verify the pixel formats for given plane and pipe with source clamping");
-	igt_subtest_f("pixel-format-pipe-%s-planes-source-clamping",
-		      kmstest_pipe_name(pipe)) {
-		data->crop = 4;
-		test_pixel_formats(data, pipe);
-	}
+	igt_subtest_with_dynamic_f("pixel-format-pipe-planes-source-clamping")
+		for_each_pipe_clamped(&data->display, pipe, pipe_count)
+			igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe)) {
+				data->crop = 4;
+				test_pixel_formats(data, pipe);
+				}
 
 	data->crop = 0;
 	igt_describe("verify plane position using two planes to create a fully covered screen");
-	igt_subtest_f("plane-position-covered-pipe-%s-planes",
-		      kmstest_pipe_name(pipe))
-		test_plane_position(data, pipe, 0);
+	igt_subtest_with_dynamic_f("plane-position-covered-pipe-planes")
+		for_each_pipe_clamped(&data->display, pipe, pipe_count)
+			igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe))
+				test_plane_position(data, pipe, 0);
 
 	igt_describe("verify plane position using two planes to create a partially covered screen");
-	igt_subtest_f("plane-position-hole-pipe-%s-planes",
-		      kmstest_pipe_name(pipe))
-		test_plane_position(data, pipe,
-				    TEST_POSITION_PARTIALLY_COVERED);
+	igt_subtest_with_dynamic_f("plane-position-hole-pipe-planes")
+		for_each_pipe_clamped(&data->display, pipe, pipe_count)
+			igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe))
+				test_plane_position(data, pipe,
+				TEST_POSITION_PARTIALLY_COVERED);
 
 	igt_describe("verify plane position using two planes to create a partially covered screen and"
 		       "check for DPMS");
-	igt_subtest_f("plane-position-hole-dpms-pipe-%s-planes",
-		      kmstest_pipe_name(pipe))
-		test_plane_position(data, pipe,
-				    TEST_POSITION_PARTIALLY_COVERED |
-				    TEST_DPMS);
+	igt_subtest_with_dynamic_f("plane-position-hole-dpms-pipe-planes")
+		for_each_pipe_clamped(&data->display, pipe, pipe_count)
+			igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe))
+				test_plane_position(data, pipe,
+				TEST_POSITION_PARTIALLY_COVERED | TEST_DPMS);
 
 	igt_describe("verify plane panning at top-left position using primary plane");
-	igt_subtest_f("plane-panning-top-left-pipe-%s-planes",
-		      kmstest_pipe_name(pipe))
-		test_plane_panning(data, pipe, TEST_PANNING_TOP_LEFT);
+	igt_subtest_with_dynamic_f("plane-panning-top-left-pipe-planes")
+		for_each_pipe_clamped(&data->display, pipe, pipe_count)
+			igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe))
+				test_plane_panning(data, pipe, TEST_PANNING_TOP_LEFT);
 
 	igt_describe("verify plane panning at bottom-right position using primary plane");
-	igt_subtest_f("plane-panning-bottom-right-pipe-%s-planes",
-		      kmstest_pipe_name(pipe))
-		test_plane_panning(data, pipe, TEST_PANNING_BOTTOM_RIGHT);
+	igt_subtest_with_dynamic_f("plane-panning-bottom-right-pipe-planes")
+		for_each_pipe_clamped(&data->display, pipe, pipe_count)
+			igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe))
+				test_plane_panning(data, pipe, TEST_PANNING_BOTTOM_RIGHT);
 
 	igt_describe("verify plane panning at bottom-right position using primary plane and executes system"
 		       "suspend cycles");
-	igt_subtest_f("plane-panning-bottom-right-suspend-pipe-%s-planes",
-		      kmstest_pipe_name(pipe))
-		test_plane_panning(data, pipe, TEST_PANNING_BOTTOM_RIGHT |
-					       TEST_SUSPEND_RESUME);
+	igt_subtest_with_dynamic_f("plane-panning-bottom-right-suspend-pipe-planes")
+		for_each_pipe_clamped(&data->display, pipe, pipe_count)
+			igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe))
+				test_plane_panning(data, pipe,
+				TEST_PANNING_BOTTOM_RIGHT |
+				TEST_SUSPEND_RESUME);
 }
 
 static int opt_handler(int opt, int opt_index, void *_data)
@@ -1110,8 +1120,6 @@ static data_t data;
 
 igt_main_args("", long_opts, help_str, opt_handler, &data)
 {
-	enum pipe pipe;
-
 	igt_fixture {
 		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
 
@@ -1121,8 +1129,7 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
 		igt_display_require(&data.display, data.drm_fd);
 	}
 
-	for_each_pipe_static(pipe)
-		run_tests_for_pipe_plane(&data, pipe);
+	run_tests_for_pipe_plane(&data);
 
 	igt_fixture {
 		igt_display_fini(&data.display);
-- 
2.25.1



More information about the igt-dev mailing list