[PATCH i-g-t 4/4] tests/kms_flip: Dump the timestamps, counters, etc. with higher debug levels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
---
 tests/kms_flip.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 48e9062..e1b5856 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),
-- 
2.4.9

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux