summaryrefslogtreecommitdiff
path: root/tests/kms_flip.c
diff options
context:
space:
mode:
authorDorota Czaplejewicz <dorota.czaplejewicz@collabora.co.uk>2016-11-30 17:06:32 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-12-06 12:34:45 +0000
commit32eed6906ed17e79bf39e4b956400d1b68dd274a (patch)
tree4ba6c1a363db5bb7fc482fa5471b02d0d346b0de /tests/kms_flip.c
parent66ce6285500b4e2fb0031270f7680e6d32ff750c (diff)
igt/kms_flip.c: Fix timings check
Adjust the description and constants in the timing check to match each other. Relax the timing constraint to prevent false positives in vblank interval checking.
Diffstat (limited to 'tests/kms_flip.c')
-rw-r--r--tests/kms_flip.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index f744b3d2..76b1cc2b 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1206,9 +1206,12 @@ static void calibrate_ts(struct test_output *o, int crtc_idx)
stddev = igt_stats_get_std_deviation(&stats);
igt_info("Expected frametime: %.0fus; measured %.1fus +- %.3fus accuracy %.2f%%\n",
- expected, mean, stddev, 100 * 6 * stddev / mean);
- igt_assert(6 * stddev / mean < 0.005); /* 99% accuracy within 0.5% */
-
+ expected, mean, stddev, 100 * 3 * stddev / mean);
+ /* 99.7% samples within 0.5% of the mean */
+ igt_assert(3 * stddev / mean < 0.005);
+ /* 84% samples within 0.5% of the expected value.
+ * See comments in check_timings() in kms_setmode.c
+ */
if (fabs(mean - expected) > 2*stddev) {
igt_warn("vblank interval differs from modeline! expected %.1fus, measured %1.fus +- %.3fus, difference %.1fus (%.1f sigma)\n",
expected, mean, stddev,