[PATCH i-g-t] tests/intel/kms_joiner: switch modeset from uj to bj and vice-versa

Santhosh Reddy Guddati santhosh.reddy.guddati at intel.com
Fri Sep 27 12:19:23 UTC 2024


Add a subtest to validate switching from ultra joiner to big joiner
and vice-versa.

v2: Add new subtests for switching without force joiner (Karthik)

Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
---
 tests/intel/kms_joiner.c | 53 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/tests/intel/kms_joiner.c b/tests/intel/kms_joiner.c
index 508e82ce3..aefa3b44d 100644
--- a/tests/intel/kms_joiner.c
+++ b/tests/intel/kms_joiner.c
@@ -71,6 +71,12 @@
  * SUBTEST: invalid-modeset-force-ultra-joiner
  * Description: Verify if the modeset on the other pipes are rejected when
  *              the pipe A is active with force ultra joiner modeset.
+ *
+ * SUBTEST: switch-modeset-force-ultra-joiner
+ * Description: Verify modeset switch between force joiner and force ultra joiner.
+ *
+ * SUBTEST: switch-modeset-ultra-joiner
+ * Description: Verify modeset switch between ultra joiner and big joiner.
  */
 IGT_TEST_DESCRIPTION("Test joiner / force joiner");
 
@@ -507,6 +513,53 @@ igt_main
 				test_ultra_joiner(&data, false, false, false);
 	}
 
+	igt_describe("Verify modeset switch between force joiner and force ultra joiner");
+	igt_subtest_with_dynamic("switch-modeset-force-ultra-joiner") {
+		igt_require_f(force_joiner_supported,
+			     "force joiner not supported on this platform or none of the connected output supports it\n");
+		igt_require_f(data.ultra_joiner_output_count > 0 &&
+				data.big_joiner_output_count > 0,
+				"No ultra joiner or big joiner output found\n");
+		igt_require_f(data.n_pipes > 1,
+					  "Minimum 2 pipes required\n");
+
+		igt_dynamic_f("force_ultra_joiner_to_big_joiner") {
+			enable_force_joiner_on_all_non_ultra_joiner_outputs(&data);
+			test_ultra_joiner(&data, false, false, true);
+			enable_force_joiner_on_all_non_big_joiner_outputs(&data);
+			test_single_joiner(&data, data.big_joiner_output_count, true);
+			igt_reset_connectors();
+		}
+
+		igt_dynamic_f("force_big_joiner_to_ultra_joiner") {
+			enable_force_joiner_on_all_non_big_joiner_outputs(&data);
+			test_single_joiner(&data, data.big_joiner_output_count, true);
+			enable_force_joiner_on_all_non_ultra_joiner_outputs(&data);
+			test_ultra_joiner(&data, false, false, true);
+			igt_reset_connectors();
+		}
+	}
+
+	igt_describe("Verify modeset switch between ultra joiner and big joiner");
+	igt_subtest_with_dynamic("switch-modeset-ultra-joiner")
+	{
+		igt_require_f(data.ultra_joiner_output_count > 0 &&
+					data.big_joiner_output_count > 0,
+					"No ultra joiner or big joiner output found\n");
+		igt_require_f(data.n_pipes > 1,
+					  "Minimum 2 pipes required\n");
+
+		igt_dynamic_f("ultra_joiner_to_big_joiner") {
+			test_ultra_joiner(&data, false, false, false);
+			test_single_joiner(&data, data.big_joiner_output_count, false);
+		}
+
+		igt_dynamic_f("big_joiner_to_ultra_joiner") {
+			test_single_joiner(&data, data.big_joiner_output_count, false);
+			test_ultra_joiner(&data, false, false, false);
+		}
+	}
+
 	igt_describe("Verify if the modeset on the adjoining pipe is rejected "
 		     "when the pipe is active with a big joiner modeset");
 	igt_subtest_with_dynamic("invalid-modeset-big-joiner") {
-- 
2.34.1



More information about the igt-dev mailing list