@@ -736,6 +736,19 @@ static unsigned int run_test_step(struct test_output *o)
if (o->flags & TEST_FB_BAD_TILING)
new_fb_id = o->fb_ids[o->current_fb_id];
+ if (o->vblank_state.count > 0) {
+ drmVBlank vbl;
+
+ memset(&vbl, 0, sizeof(vbl));
+ vbl.request.type = kmstest_get_vbl_flag(o->pipe);
+ vbl.request.type |= DRM_VBLANK_RELATIVE;
+
+ do_or_die(drmWaitVBlank(drm_fd, &vbl));
+ if (vbl.reply.sequence != o->vblank_state.last_seq)
+ igt_warn("vblank drift since last iteration! expected %x found %x\n",
+ o->vblank_state.last_seq, vbl.reply.sequence);
+ }
+
if (do_vblank && (o->flags & TEST_EINVAL) && o->vblank_state.count > 0)
igt_assert(do_wait_for_vblank(o, o->pipe, target_seq, &vbl_reply)
== -EINVAL);
During the kms_flip test we repeat the test over a short period of time, and the setup of each iteration should not itself be inducing a vblank miss. Warn if we do encounter any missed vblanks during the event setup. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- tests/kms_flip.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)