[i-g-t V6 1/6] lib/igt_kms: Check validity of the selcted pipe/output combo

Bhanuprakash Modem bhanuprakash.modem at intel.com
Tue Jun 18 06:24:00 UTC 2024


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

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
Reviewed-by: Jeevan B <jeevan.b at intel.com>
---
 lib/igt_kms.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index af63d13b1..2e6f44e3c 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -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.
 	 *
-- 
2.43.2



More information about the igt-dev mailing list