Commit 50f9d1f7 authored by Ville Syrjälä's avatar Ville Syrjälä

tests/kms_flip: Validate the vbl sequence numbers

Make sure we haven't already passed the seq numbers we're
requesting when doing the ts calibration.
Suggested-by: Chris Wilson's avatarChris Wilson <>
Signed-off-by: Ville Syrjälä's avatarVille Syrjälä <>
Reviewed-by: Chris Wilson's avatarChris Wilson <>
parent e347d24a
......@@ -1118,8 +1118,17 @@ static void calibrate_ts(struct test_output *o, int crtc_idx)
wait.request.sequence = last_seq;
for (n = 0; n < CALIBRATE_TS_STEPS; n++) {
drmVBlank check = {};
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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment