[PATCH v1] tests/kms_flip: Assert with twice of frame time while waiting fro vblank

Mitul Golani mitulkumar.ajitkumar.golani at intel.com
Fri Oct 11 06:21:46 UTC 2024


Instead of hardcoding to 500us, wait for twice of mode frame time while
waiting for vblank. Motivation of this change is to remove hard coding
of 500us, which comes out to be more stringent and ambiguous vs changing
modeline.

Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani at intel.com>
---
 tests/kms_flip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index cbabbe74f..decffa961 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -921,7 +921,7 @@ static bool run_test_step(struct test_output *o, unsigned int *events)
 					    0, &reply));
 		end = gettime_us();
 		igt_debug("Vblank took %luus\n", end - start);
-		igt_assert(end - start < 500);
+		igt_assert(end - start < 2 * mode_frame_time(o));
 		if (reply.sequence != exp_seq) {
 			igt_debug("unexpected vblank seq %u, should be %u\n",
 				  reply.sequence, exp_seq);
-- 
2.46.0



More information about the igt-dev mailing list