summaryrefslogtreecommitdiff
path: root/tests/kms_flip.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2019-10-30 19:54:01 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2019-10-31 23:35:16 +0200
commit43a68dfeec3463084be6a0503af976085da9be81 (patch)
treeb0a66f10c7cc3a5becc0bf6fc5dc188a7b164815 /tests/kms_flip.c
parentb21b6a7aaa0db2159f22ee4427804e5a16fe2261 (diff)
tests/kms_flip: Allow an extra half frame for vblank waits
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> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/kms_flip.c')
-rwxr-xr-xtests/kms_flip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index a18f7801..9ce83c53 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();