summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/kms_flip.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 48e90620..e1b58561 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -129,6 +129,28 @@ struct event_state {
int seq_step;
};
+static void dump_event_state(const struct event_state *es)
+{
+ igt_debug("name = %s\n"
+ "last_ts = %lu.%lu usec\n"
+ "last_received_ts = %lu.%lu usec\n"
+ "last_seq = %u\n"
+ "current_ts = %lu.%lu usec\n"
+ "current_received_ts = %lu.%lu usec\n"
+ "current_seq = %u\n"
+ "count = %u\n"
+ "seq_step = %d\n",
+ es->name,
+ es->last_ts.tv_sec, es->last_ts.tv_usec,
+ es->last_received_ts.tv_sec, es->last_received_ts.tv_usec,
+ es->last_seq,
+ es->current_ts.tv_sec, es->current_ts.tv_usec,
+ es->current_received_ts.tv_sec, es->current_received_ts.tv_usec,
+ es->current_seq,
+ es->count,
+ es->seq_step);
+}
+
struct test_output {
int mode_valid;
drmModeModeInfo kmode[4];
@@ -616,6 +638,8 @@ static void check_state(struct test_output *o, struct event_state *es)
struct timeval diff;
double usec_interflip;
+ dump_event_state(es);
+
timersub(&es->current_ts, &es->current_received_ts, &diff);
if (!analog_tv_connector(o)) {
igt_assert_f(diff.tv_sec < 0 || (diff.tv_sec == 0 && diff.tv_usec <= 2000),