[Intel-gfx] [PATCH i-g-t 6/6] tests/kms_flip: Check that the last vs. current seq/ts are consistent
ville.syrjala at linux.intel.com
ville.syrjala at linux.intel.com
Tue Jun 21 17:25:32 UTC 2016
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Let's make sure the ts vs. seq difference between the current and last
events match.
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
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
More information about the Intel-gfx
mailing list