[igt-dev] [PATCH i-g-t v3] tests/kms_flip: improve logging when timing out

Simon Ser simon.ser at intel.com
Mon Jun 24 08:28:22 UTC 2019


Signed-off-by: Simon Ser <simon.ser at intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105363
---

Changes from v2 to v3: always log the vblank duration (Arek)

 tests/kms_flip.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 2a158d97bbec..0a8d1c55a7aa 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -686,14 +686,16 @@ static unsigned int run_test_step(struct test_output *o)
 	    !(o->pending_events & EVENT_VBLANK) && o->flip_state.count > 0) {
 		struct vblank_reply reply;
 		unsigned int exp_seq;
-		unsigned long start;
+		unsigned long start, end;

 		exp_seq = o->flip_state.current_seq;
 		start = gettime_us();
 		do_or_die(__wait_for_vblank(TEST_VBLANK_ABSOLUTE |
 					    TEST_VBLANK_BLOCK, o->pipe, exp_seq,
 					    0, &reply));
-		igt_assert(gettime_us() - start < 500);
+		end = gettime_us();
+		igt_debug("Vblank took %luus\n", end - start);
+		igt_assert(end - start < 500);
 		igt_assert_eq(reply.sequence, exp_seq);
 		igt_assert(timercmp(&reply.ts, &o->flip_state.last_ts, ==));
 	}
--
2.22.0



More information about the igt-dev mailing list