Skip to contentSkip to conversation

Force joiner support in bigjoiner checks

PATCH Superseded Bhanuprakash Modem 1 participant 7 messages Jun 18, 2024 Library code

lore
Share & tools
lore
#0 lore raw

v6 cover Force joiner support in bigjoiner checks

As we recently introduced the option (through debugfs) to force the bigjoiner, needs to extend the support in bigjoiner checks to handle the force joiner.

Bhanuprakash Modem (6):
lib/igt_kms: Check validity of the selcted pipe/output combo tests/kms: Drop redundant check for pipe/output combo validity tests/chamelium: Use lib helper to check the pipe/output combo
validity
tests/intel/kms: Use lib helper to check the pipe/output combo
validity
tests/kms_dither: Use lib helper to check the pipe/output combo
validity
tests/kms_hdr: Use lib helper to check the pipe/output combo validity

 lib/igt_kms.c                          |  9 ++-
 tests/chamelium/kms_chamelium_helper.c | 12 +++-
 tests/chamelium/kms_chamelium_hpd.c    |  5 +-
 tests/intel/kms_pm_backlight.c         |  7 +-
 tests/intel/kms_psr.c                  | 17 +++--
 tests/kms_content_protection.c         |  3 -
 tests/kms_dither.c                     | 24 ++++---
 tests/kms_hdr.c                        | 90 +++++++++++++++-----------
 tests/kms_properties.c                 |  3 -
 tests/kms_vrr.c                        | 22 +++----
 10 files changed, 108 insertions(+), 84 deletions(-)
Signature · 1 line
2.43.2
#1 lore raw

PATCH v6 1/6 lib/igt_kms: Check validity of the selcted pipe/output combo

Add a check to identify the selcted pipe/output combination is valid or not.

---
 lib/igt_kms.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
lib/igt_kms.c +6 -3
index af63d13b1..2e6f44e3c 100644
@@ -6480,18 +6480,21 @@ bool intel_pipe_output_combo_valid(igt_display_t *display)
 	int combo = 0;
 	igt_output_t *output;
 
-	if (!is_intel_device(display->drm_fd))
-		return true;
-
 	for_each_connected_output(display, output) {
 		if (output->pending_pipe == PIPE_NONE)
 			continue;
 
+		if (!igt_pipe_connector_valid(output->pending_pipe, output))
+			return false;
+
 		combo++;
 	}
 
 	igt_assert_f(combo, "At least one pipe/output combo needed.\n");
 
+	if (!is_intel_device(display->drm_fd))
+		return true;
+
 	/*
 	 * Check the given pipe/output combo is valid for Bigjoiner.
 	 *
Signature · 1 line
2.43.2
#2 lore raw

PATCH v6 2/6 tests/kms: Drop redundant check for pipe/output combo validity

In reply to Bhanuprakash Modem

As intel_pipe_output_combo_valid() is taking care of pipe/output combo validity, drop other redundant checks.

---
 tests/kms_content_protection.c |  3 ---
 tests/kms_properties.c         |  3 ---
 tests/kms_vrr.c                | 22 ++++++++++------------
 3 files changed, 10 insertions(+), 18 deletions(-)
tests/kms_content_protection.c +0 -3
index 6858b22e2..e9a468eb0 100644
@@ -564,9 +564,6 @@ test_content_protection(enum igt_commit_style s, int content_type)
 
 	for_each_connected_output(display, output) {
 		for_each_pipe(display, pipe) {
-			if (!igt_pipe_connector_valid(pipe, output))
-				continue;
-
 			igt_display_reset(display);
 
 			igt_output_set_pipe(output, pipe);
tests/kms_properties.c +0 -3
index bd414f534..6f92b218e 100644
@@ -337,9 +337,6 @@ static void connector_properties(igt_display_t *display, bool atomic)
 		bool found = false;
 
 		for_each_pipe(display, pipe) {
-			if (!igt_pipe_connector_valid(pipe, output))
-				continue;
-
 			igt_display_reset(display);
 
 			igt_output_set_pipe(output, pipe);
tests/kms_vrr.c +10 -12
index 7f64d6806..5af220b5b 100644
@@ -794,22 +794,20 @@ run_vrr_test(data_t *data, test_t test, uint32_t flags)
 			continue;
 
 		for_each_pipe(&data->display, pipe) {
-			if (igt_pipe_connector_valid(pipe, output)) {
-				igt_output_set_pipe(output, pipe);
+			igt_output_set_pipe(output, pipe);
 
-				if (!intel_pipe_output_combo_valid(&data->display)) {
-					igt_output_set_pipe(output, PIPE_NONE);
-					continue;
-				}
+			if (!intel_pipe_output_combo_valid(&data->display)) {
+				igt_output_set_pipe(output, PIPE_NONE);
+				continue;
+			}
 
-				igt_dynamic_f("pipe-%s-%s",
-					      kmstest_pipe_name(pipe), output->name)
-					test(data, pipe, output, flags);
+			igt_dynamic_f("pipe-%s-%s",
+				      kmstest_pipe_name(pipe), output->name)
+				test(data, pipe, output, flags);
 
-				test_cleanup(data, pipe, output);
+			test_cleanup(data, pipe, output);
 
-				break;
-			}
+			break;
 		}
 	}
 }
Signature · 1 line
2.43.2
#3 lore raw

PATCH v6 3/6 tests/chamelium: Use lib helper to check the pipe/output combo validity

In reply to Bhanuprakash Modem

Use IGT lib helper intel_pipe_output_combo_valid() to make sure the selected pipe/output/mode combo is valid.

---
 tests/chamelium/kms_chamelium_helper.c | 12 +++++++++---
 tests/chamelium/kms_chamelium_hpd.c    |  5 ++---
 2 files changed, 11 insertions(+), 6 deletions(-)
tests/chamelium/kms_chamelium_helper.c +9 -3
index 197d29be9..26c5f87f1 100644
@@ -207,9 +207,15 @@ enum pipe chamelium_get_pipe_for_output(igt_display_t *display,
 	enum pipe pipe;
 
 	for_each_pipe(display, pipe) {
-		if (igt_pipe_connector_valid(pipe, output)) {
-			return pipe;
+		igt_output_set_pipe(output, pipe);
+
+		if (!intel_pipe_output_combo_valid(display)) {
+			igt_output_set_pipe(output, PIPE_NONE);
+			continue;
 		}
+
+		igt_output_set_pipe(output, PIPE_NONE);
+		return pipe;
 	}
 
 	igt_assert_f(false, "No pipe found for output %s\n",
@@ -344,4 +350,4 @@ bool chamelium_check_analog_bridge(chamelium_data_t *data,
 		return true;
 
 	return false;
-}
\ No newline at end of file
+}
tests/chamelium/kms_chamelium_hpd.c +2 -3
index 858c595cb..52e758087 100644
@@ -345,10 +345,9 @@ static void test_hotplug_for_each_pipe(chamelium_data_t *data,
 		output = chamelium_get_output_for_port(data, port);
 
 		/* If pipe is valid for output then set it */
-		if (igt_pipe_connector_valid(pipe, output)) {
-			igt_output_set_pipe(output, pipe);
+		igt_output_set_pipe(output, pipe);
+		if (intel_pipe_output_combo_valid(&data->display))
 			igt_display_commit2(&data->display, COMMIT_ATOMIC);
-		}
 
 		chamelium_unplug(data->chamelium, port);
 		chamelium_wait_for_connector_after_hotplug(
Signature · 1 line
2.43.2
#4 lore raw

PATCH v6 4/6 tests/intel/kms: Use lib helper to check the pipe/output combo validity

In reply to Bhanuprakash Modem

Use IGT lib helper intel_pipe_output_combo_valid() to make sure the selected pipe/output/mode combo is valid.

---
 tests/intel/kms_pm_backlight.c |  7 ++++---
 tests/intel/kms_psr.c          | 17 ++++++++++++-----
 2 files changed, 16 insertions(+), 8 deletions(-)
tests/intel/kms_pm_backlight.c +4 -3
index 2e691dab0..8672afa7a 100644
@@ -234,10 +234,11 @@ static void test_setup(igt_display_t display, igt_output_t *output)
 	igt_display_reset(&display);
 
 	for_each_pipe(&display, pipe) {
-		if (!igt_pipe_connector_valid(pipe, output))
-			continue;
-
 		igt_output_set_pipe(output, pipe);
+		if (!intel_pipe_output_combo_valid(&display)) {
+			igt_output_set_pipe(output, PIPE_NONE);
+			continue;
+		}
 		mode = igt_output_get_mode(output);
 
 		igt_create_pattern_fb(display.drm_fd,
tests/intel/kms_psr.c +12 -5
index c90612426..f3caa9ecc 100644
@@ -728,9 +728,14 @@ static enum pipe get_pipe_for_output(igt_display_t *display,
 	enum pipe pipe;
 
 	for_each_pipe(display, pipe) {
-		if (igt_pipe_connector_valid(pipe, output)) {
-			return pipe;
+		igt_output_set_pipe(output, pipe);
+
+		if (!intel_pipe_output_combo_valid(display)) {
+			igt_output_set_pipe(output, PIPE_NONE);
+			continue;
 		}
+
+		return pipe;
 	}
 
 	igt_assert_f(false, "No pipe found for output %s\n",
@@ -750,9 +755,6 @@ static void test_setup(data_t *data)
 			      "Can't test FBC with PSR\n");
 
 	pipe = get_pipe_for_output(&data->display, data->output);
-	igt_output_set_pipe(data->output, pipe);
-	igt_require_f(intel_pipe_output_combo_valid(&data->display),
-		      "output pipe combo not valid\n");
 	data->crtc_id = data->output->config.crtc->crtc_id;
 	connector = data->output->config.connector;
 
@@ -763,6 +765,11 @@ static void test_setup(data_t *data)
 
 		igt_output_override_mode(data->output, data->mode);
 
+		if (!intel_pipe_output_combo_valid(&data->display)) {
+			igt_info("Skipping mode, not compatible with selected pipe/output\n");
+			continue;
+		}
+
 		psr_enable_if_enabled(data);
 		setup_test_plane(data, data->test_plane_id);
 		if (psr_wait_entry_if_enabled(data)) {
Signature · 1 line
2.43.2
#5 lore raw

PATCH v6 5/6 tests/kms_dither: Use lib helper to check the pipe/output combo validity

In reply to Bhanuprakash Modem

Use IGT lib helper intel_pipe_output_combo_valid() to make sure the selected pipe/output/mode combo is valid.

V2: - Split the patch into multiple.

---
 tests/kms_dither.c | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)
tests/kms_dither.c +14 -10
index af7b7f05c..21b1210b4 100644
@@ -76,13 +76,10 @@ typedef struct {
 /* Prepare test data. */
 static void prepare_test(data_t *data, igt_output_t *output, enum pipe p)
 {
-	igt_display_t *display = &data->display;
 	igt_pipe_t *pipe = &data->display.pipes[p];
 
 	igt_assert(pipe);
 
-	igt_display_reset(display);
-
 	data->primary =
 		igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
 
@@ -205,6 +202,8 @@ run_dither_test(data_t *data, int fb_bpc, int fb_format, int output_bpc)
 	igt_output_t *output;
 	igt_display_t *display = &data->display;
 
+	igt_display_reset(display);
+
 	for_each_connected_output(display, output) {
 		enum pipe pipe;
 
@@ -215,15 +214,20 @@ run_dither_test(data_t *data, int fb_bpc, int fb_format, int output_bpc)
 			continue;
 
 		for_each_pipe(display, pipe) {
-			if (igt_pipe_connector_valid(pipe, output)) {
-				igt_dynamic_f("pipe-%s-%s",
-					      kmstest_pipe_name(pipe), output->name)
-					test_dithering(data, pipe, output, fb_bpc,
-							fb_format, output_bpc);
+			igt_output_set_pipe(output, pipe);
 
-				/* One pipe is enough */
-				break;
+			if (!intel_pipe_output_combo_valid(display)) {
+				igt_output_set_pipe(output, PIPE_NONE);
+				continue;
 			}
+
+			igt_dynamic_f("pipe-%s-%s",
+					      kmstest_pipe_name(pipe), output->name)
+				test_dithering(data, pipe, output, fb_bpc,
+							   fb_format, output_bpc);
+
+			/* One pipe is enough */
+			break;
 		}
 	}
 }
Signature · 1 line
2.43.2
#6 lore raw

PATCH v6 6/6 tests/kms_hdr: Use lib helper to check the pipe/output combo validity

In reply to Bhanuprakash Modem

Use IGT lib helper intel_pipe_output_combo_valid() to make sure the selected pipe/output/mode combo is valid.

---
 tests/kms_hdr.c | 90 ++++++++++++++++++++++++++++---------------------
 1 file changed, 51 insertions(+), 39 deletions(-)
tests/kms_hdr.c +51 -39
index 99b78f7ef..475463c21 100644
@@ -261,6 +261,8 @@ static void test_bpc_switch(data_t *data, uint32_t flags)
 	igt_display_t *display = &data->display;
 	igt_output_t *output;
 
+	igt_display_reset(display);
+
 	for_each_connected_output(display, output) {
 		enum pipe pipe;
 
@@ -271,26 +273,30 @@ static void test_bpc_switch(data_t *data, uint32_t flags)
 			continue;
 
 		for_each_pipe(display, pipe) {
-			if (igt_pipe_connector_valid(pipe, output)) {
-				prepare_test(data, output, pipe);
-
-				if (is_intel_device(data->fd) &&
-				    !igt_max_bpc_constraint(display, pipe, output, 10)) {
-					test_fini(data);
-					break;
-				}
-
-				data->mode = igt_output_get_mode(output);
-				data->w = data->mode->hdisplay;
-				data->h = data->mode->vdisplay;
+			igt_output_set_pipe(output, pipe);
+			if (intel_pipe_output_combo_valid(display)) {
+				igt_output_set_pipe(output, PIPE_NONE);
+				continue;
+			}
 
-				igt_dynamic_f("pipe-%s-%s",
-					      kmstest_pipe_name(pipe), output->name)
-					test_bpc_switch_on_output(data, pipe, output, flags);
+			prepare_test(data, output, pipe);
 
-				/* One pipe is enough */
+			if (is_intel_device(data->fd) &&
+			    !igt_max_bpc_constraint(display, pipe, output, 10)) {
+				test_fini(data);
 				break;
 			}
+
+			data->mode = igt_output_get_mode(output);
+			data->w = data->mode->hdisplay;
+			data->h = data->mode->vdisplay;
+
+			igt_dynamic_f("pipe-%s-%s",
+				      kmstest_pipe_name(pipe), output->name)
+				test_bpc_switch_on_output(data, pipe, output, flags);
+
+			/* One pipe is enough */
+			break;
 		}
 	}
 }
@@ -614,6 +620,8 @@ static void test_hdr(data_t *data, uint32_t flags)
 	igt_display_t *display = &data->display;
 	igt_output_t *output;
 
+	igt_display_reset(display);
+
 	for_each_connected_output(display, output) {
 		enum pipe pipe;
 
@@ -635,32 +643,36 @@ static void test_hdr(data_t *data, uint32_t flags)
 			continue;
 
 		for_each_pipe(display, pipe) {
-			if (igt_pipe_connector_valid(pipe, output)) {
-				prepare_test(data, output, pipe);
+			igt_output_set_pipe(output, pipe);
+			if (!intel_pipe_output_combo_valid(display)) {
+				igt_output_set_pipe(output, PIPE_NONE);
+				continue;
+			}
 
-				if (is_intel_device(data->fd) &&
-				    !igt_max_bpc_constraint(display, pipe, output, 10)) {
-					test_fini(data);
-					break;
-				}
-
-				data->mode = igt_output_get_mode(output);
-				data->w = data->mode->hdisplay;
-				data->h = data->mode->vdisplay;
-
-				igt_dynamic_f("pipe-%s-%s",
-					      kmstest_pipe_name(pipe), output->name) {
-					if (flags & (TEST_NONE | TEST_DPMS | TEST_SUSPEND | TEST_INVALID_HDR))
-						test_static_toggle(data, pipe, output, flags);
-					if (flags & TEST_SWAP)
-						test_static_swap(data, pipe, output);
-					if (flags & TEST_INVALID_METADATA_SIZES)
-						test_invalid_metadata_sizes(data, output);
-				}
-
-				/* One pipe is enough */
+			prepare_test(data, output, pipe);
+
+			if (is_intel_device(data->fd) &&
+			    !igt_max_bpc_constraint(display, pipe, output, 10)) {
+				test_fini(data);
 				break;
 			}
+
+			data->mode = igt_output_get_mode(output);
+			data->w = data->mode->hdisplay;
+			data->h = data->mode->vdisplay;
+
+			igt_dynamic_f("pipe-%s-%s",
+				      kmstest_pipe_name(pipe), output->name) {
+				if (flags & (TEST_NONE | TEST_DPMS | TEST_SUSPEND | TEST_INVALID_HDR))
+					test_static_toggle(data, pipe, output, flags);
+				if (flags & TEST_SWAP)
+					test_static_swap(data, pipe, output);
+				if (flags & TEST_INVALID_METADATA_SIZES)
+					test_invalid_metadata_sizes(data, output);
+			}
+
+			/* One pipe is enough */
+			break;
 		}
 	}
 }
Signature · 1 line
2.43.2