[PATCH i-g-t 2/2] igt/kms_flip.c: Fix timings check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 289335a..53b0b10 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,
-- 
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux