From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 4/5] tests/kms_flip: Validate the vbl sequence numbers
Date: Thu, 7 Mar 2019 23:39:25 +0200 [thread overview]
Message-ID: <20190307213926.18051-4-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20190307213926.18051-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Make sure we haven't already passed the seq numbers we're
requesting when doing the ts calibration.
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
tests/kms_flip.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index cde8b739ea83..997957542329 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1118,8 +1118,17 @@ static void calibrate_ts(struct test_output *o, int crtc_idx)
wait.request.type |= DRM_VBLANK_ABSOLUTE | DRM_VBLANK_EVENT;
wait.request.sequence = last_seq;
for (n = 0; n < CALIBRATE_TS_STEPS; n++) {
+ drmVBlank check = {};
+
++wait.request.sequence;
do_or_die(drmWaitVBlank(drm_fd, &wait));
+
+ /* Double check that haven't already missed the vblank */
+ check.request.type = kmstest_get_vbl_flag(crtc_idx);
+ check.request.type |= DRM_VBLANK_RELATIVE;
+ do_or_die(drmWaitVBlank(drm_fd, &check));
+
+ igt_assert(!igt_vblank_after(check.reply.sequence, wait.request.sequence));
}
igt_stats_init_with_size(&stats, CALIBRATE_TS_STEPS);
--
2.19.2
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-03-07 21:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-07 21:39 [igt-dev] [PATCH i-g-t 1/5] lib/debugfs: Fix wraparound handling for crc frame counter check Ville Syrjala
2019-03-07 21:39 ` [igt-dev] [PATCH i-g-t 2/5] tests/kms_setmode: Request the initial vbl count with RELATIVE instead of ABSOLUTE Ville Syrjala
2019-03-07 21:48 ` Chris Wilson
2019-03-08 16:45 ` Ville Syrjälä
2019-03-08 16:49 ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
2019-03-07 21:39 ` [igt-dev] [PATCH i-g-t 3/5] tests/kms_flip: " Ville Syrjala
2019-03-07 21:49 ` Chris Wilson
2019-03-08 16:50 ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
2019-03-08 17:14 ` Chris Wilson
2019-03-07 21:39 ` Ville Syrjala [this message]
2019-03-07 21:39 ` [igt-dev] [PATCH i-g-t 5/5] tests/kms_setmode: Validate the vbl sequence numbers Ville Syrjala
2019-03-07 21:51 ` Chris Wilson
2019-03-08 17:14 ` Chris Wilson
2019-03-07 22:03 ` [igt-dev] [PATCH i-g-t 1/5] lib/debugfs: Fix wraparound handling for crc frame counter check Chris Wilson
2019-03-07 23:43 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/5] " Patchwork
2019-03-08 2:27 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-03-09 1:15 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/5] lib/debugfs: Fix wraparound handling for crc frame counter check (rev3) Patchwork
2019-03-09 8:28 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
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=20190307213926.18051-4-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@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