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

Santhosh Reddy Guddati santhosh.reddy.guddati at intel.com
Tue Oct 1 07:34:48 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)
v3: start with uj to bj switch, if not available switch to force mode

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..7c7436b9a 100644
--- a/tests/intel/kms_joiner.c
+++ b/tests/intel/kms_joiner.c
@@ -71,6 +71,9 @@
  * 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-big-joiner-ultra-joiner
+ * Description: Verify modeset switch between ultra joiner and big joiner.
  */
 IGT_TEST_DESCRIPTION("Test joiner / force joiner");
 
@@ -507,6 +510,56 @@ igt_main
 				test_ultra_joiner(&data, false, false, false);
 	}
 
+	igt_describe("Verify modeset switch between joiner and ultra joiner");
+	igt_subtest_with_dynamic("switch-modeset-big-joiner-ultra-joiner") {
+		igt_require_f(data.n_pipes > 1,
+			      "Minimum 2 pipes required\n");
+
+		igt_dynamic_f("ultra_joiner_to_big_joiner") {
+			if (data.ultra_joiner_output_count > 0) {
+				test_ultra_joiner(&data, false, false, false);
+			} else {
+				igt_require_f(force_joiner_supported &&
+						  data.non_ultra_joiner_output_count > 0,
+					      "Force joiner not supported on this platform or none of the connected output supports it\n");
+				enable_force_joiner_on_all_non_ultra_joiner_outputs(&data);
+				test_ultra_joiner(&data, false, false, true);
+			}
+			if (data.big_joiner_output_count > 0) {
+				test_single_joiner(&data, data.big_joiner_output_count, false);
+			} else {
+				igt_require_f(force_joiner_supported &&
+							  data.non_big_joiner_output_count > 0,
+							  "Force joiner not supported on this platform or none of the connected outputs support it\n");
+					enable_force_joiner_on_all_non_big_joiner_outputs(&data);
+					test_single_joiner(&data, data.non_big_joiner_output_count, true);
+			}
+			igt_reset_connectors();
+		}
+
+		igt_dynamic_f("big_joiner_to_ultra_joiner") {
+			if (data.big_joiner_output_count > 0) {
+				test_single_joiner(&data, data.big_joiner_output_count, false);
+			} else {
+				igt_require_f(force_joiner_supported &&
+						  data.non_big_joiner_output_count > 0,
+					      "Force joiner not supported on this platform or none of the connected output supports it\n");
+					enable_force_joiner_on_all_non_big_joiner_outputs(&data);
+					test_single_joiner(&data, data.non_big_joiner_output_count, true);
+			}
+			if (data.ultra_joiner_output_count > 0) {
+				test_ultra_joiner(&data, false, false, false);
+			} else {
+				igt_require_f(force_joiner_supported &&
+						  data.non_ultra_joiner_output_count > 0,
+					      "Force joiner not supported on this platform or none of the connected output supports it\n");
+					enable_force_joiner_on_all_non_ultra_joiner_outputs(&data);
+					test_ultra_joiner(&data, false, false, true);
+			}
+			igt_reset_connectors();
+		}
+	}
+
 	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