[igt-dev] [PATCH i-g-t] tests/kms_flip: Allow an extra half frame for vblank waits

Ville Syrjala ville.syrjala at linux.intel.com
Wed Oct 30 18:01:44 UTC 2019


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

The vblank tests try to make sure a relative vblank wait of
2 counts completes in ~1-2 frames (depends on how far along the
first frame we are when initiating the wait). The actual
limits we check are 0.9 to 2.1 frames to account for inaccuracies
in the reported dotclock. Unfortunately it seems we either
have even more inaccurate dotclocks or scheduling latencies
and whatnot are pushing that out quite a bit further. So let's
extend the end limit to ~2.6 frames to cut down on the noise a bit.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111609
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 tests/kms_flip.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index a18f7801dad1..9ce83c53d578 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -739,10 +739,12 @@ static unsigned int run_test_step(struct test_output *o)
 		end = gettime_us();
 		/*
 		 * we waited for two vblanks, so verify that
-		 * we were blocked for ~1-2 frames.
+		 * we were blocked for ~1-2 frames. And due
+		 * to scheduling latencies we give it an extra
+		 * half a frame or so.
 		 */
 		igt_assert_f(end - start > 0.9 * actual_frame_time(o) &&
-			     end - start < 2.1 * actual_frame_time(o),
+			     end - start < 2.6 * actual_frame_time(o),
 			     "wait for two vblanks took %lu usec (frame time %f usec)\n",
 			     end - start, mode_frame_time(o));
 		join_vblank_wait_thread();
-- 
2.23.0



More information about the igt-dev mailing list