public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_flip: Allow an extra half frame for vblank waits
@ 2019-10-30 18:01 Ville Syrjala
  2019-10-30 18:08 ` Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ville Syrjala @ 2019-10-30 18:01 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@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@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

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-31 20:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-30 18:01 [igt-dev] [PATCH i-g-t] tests/kms_flip: Allow an extra half frame for vblank waits Ville Syrjala
2019-10-30 18:08 ` Chris Wilson
2019-10-30 18:43 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-10-31 20:54 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox