All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v3] tests/kms_flip: Skip test only for invalid combination
@ 2022-06-22  7:47 Jeevan B
  0 siblings, 0 replies; only message in thread
From: Jeevan B @ 2022-06-22  7:47 UTC (permalink / raw)
  To: igt-dev

currently the entire test is skipping. adding this fix to skip test
only for invalid cases and run on other valid display combination.

v2: add RUN_PAIR check to avoid crash on single display.
v3: add flag to check for valid display combination.(Karthik)

Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
 tests/kms_flip.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index c5b5741a..12641a93 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -932,7 +932,7 @@ static bool mode_compatible(const drmModeModeInfo *a, const drmModeModeInfo *b)
 	return true;
 }
 
-static void get_compatible_modes(drmModeModeInfo *a, drmModeModeInfo *b,
+static bool get_compatible_modes(drmModeModeInfo *a, drmModeModeInfo *b,
 				 drmModeConnector *c1, drmModeConnector *c2)
 {
 	int n, m;
@@ -946,14 +946,13 @@ static void get_compatible_modes(drmModeModeInfo *a, drmModeModeInfo *b,
 			for (m = 0; m < c2->count_modes; m++) {
 				*b = c2->modes[m];
 				if (mode_compatible(a, b))
-					return;
+					return true;
 			}
 		}
-
-		igt_skip("Compatible mode not found.\n");
+		return false;
 	}
 
-	return;
+	return false;
 }
 
 static void connector_find_compatible_mode(int crtc_idx0, int crtc_idx1,
-- 
2.36.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-22  7:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-22  7:47 [igt-dev] [PATCH i-g-t v3] tests/kms_flip: Skip test only for invalid combination Jeevan B

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.