[igt-dev] [PATCH i-g-t 5/6] lib/kms: Skip igt test cases for disabled display pipes

Mohammed Khajapasha mohammed.khajapasha at intel.com
Wed Jun 17 18:03:53 UTC 2020


Skip igt test cases for disabled pipes.

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha at intel.com>
---
 lib/igt_kms.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 277d5c37..134b54dd 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2162,8 +2162,9 @@ void igt_display_require_output_on_pipe(igt_display_t *display, enum pipe pipe)
 {
 	igt_output_t *output;
 
-	igt_skip_on_f(pipe >= igt_display_get_n_pipes(display),
-		      "Pipe %s does not exist.\n", kmstest_pipe_name(pipe));
+	igt_skip_on_f(((pipe >= igt_display_get_n_pipes(display)) ||
+				!(display->pipes[pipe].enabled)),
+			"Pipe %s does not exist or not enabled.\n", kmstest_pipe_name(pipe));
 
 	for_each_valid_output_on_pipe(display, pipe, output)
 		return;
@@ -2518,7 +2519,8 @@ igt_output_t *igt_get_single_output_for_pipe(igt_display_t *display, enum pipe p
 	igt_output_t *chosen_outputs[display->n_pipes];
 
 	igt_assert(pipe != PIPE_NONE);
-	igt_require(pipe < display->n_pipes);
+	igt_require((pipe < display->n_pipes) &&
+			display->pipes[pipe].enabled);
 
 	__igt_pipe_populate_outputs(display, chosen_outputs);
 
-- 
2.24.1



More information about the igt-dev mailing list