intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Dorota Czaplejewicz <dorota.czaplejewicz@collabora.co.uk>
To: Intel GFX discussion <intel-gfx@lists.freedesktop.org>
Subject: [PATCH i-g-t 2/2] igt/kms_flip.c: Fix timings check
Date: Wed, 30 Nov 2016 17:06:32 +0100	[thread overview]
Message-ID: <20161130170632.66a12673@collabora.co.uk> (raw)
In-Reply-To: <20161130170534.787fbd22@collabora.co.uk>

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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2016-11-30 16:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-30 16:05 [PATCH i-g-t 1/2] igt/kms_setmode.c: Tweak timings check constants Dorota Czaplejewicz
2016-11-30 16:06 ` Dorota Czaplejewicz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161130170632.66a12673@collabora.co.uk \
    --to=dorota.czaplejewicz@collabora.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).