From 32eed6906ed17e79bf39e4b956400d1b68dd274a Mon Sep 17 00:00:00 2001 From: Dorota Czaplejewicz Date: Wed, 30 Nov 2016 17:06:32 +0100 Subject: 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. --- tests/kms_flip.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tests/kms_flip.c') 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, -- cgit v1.2.3