From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> Let's make sure the ts vs. seq difference between the current and last events match. Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> --- tests/kms_flip.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index f685c945feb1..72899d9a7157 100644 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -693,6 +693,13 @@ static void check_state(const struct test_output *o, const struct event_state *e timersub(&es->current_ts, &es->last_ts, &diff); usec_diff = diff.tv_sec * USEC_PER_SEC + diff.tv_usec; + usec_interflip = (es->current_seq - es->last_seq) * frame_time(o); + igt_assert_f(fabs((usec_diff - usec_interflip) / + usec_interflip) <= 0.005, + "inconsistent %s ts/seq: last %ld.%06ld/%u, current %ld.%06ld/%u\n", + es->name, es->last_ts.tv_sec, es->last_ts.tv_usec, es->last_seq, + es->current_ts.tv_sec, es->current_ts.tv_usec, es->current_seq); + usec_interflip = o->seq_step * frame_time(o); igt_assert_f(fabs((usec_diff - usec_interflip) / usec_interflip) <= 0.005, -- 2.7.4 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx