[PATCH i-g-t 1/5] lib/igt_kms: Check validity of the selcted pipe/output combo
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Mon Apr 8 06:12:17 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>
---
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 2a518eb8d..8eb3b877c 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -6347,18 +6347,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