From 8a2593bd3c1f56f03a925d86c3865479505ddb66 Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Thu, 22 Nov 2012 15:25:04 +0200 Subject: [PATCH] flip_test: skip check for last_received_ts for the first event The old way worked too, but just skipping the test for the first event is more logical/simpler thing to do. Signed-off-by: Imre Deak Signed-off-by: Daniel Vetter --- tests/flip_test.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/flip_test.c b/tests/flip_test.c index 3dfce8e2..e2af358e 100644 --- a/tests/flip_test.c +++ b/tests/flip_test.c @@ -362,6 +362,9 @@ static void check_state(struct test_output *o, struct event_state *es) exit(5); } + if (es->count == 0) + return; + if (!timercmp(&es->last_received_ts, &es->current_ts, <)) { fprintf(stderr, "%s ts before the %s was issued!\n", es->name, es->name); @@ -372,9 +375,6 @@ static void check_state(struct test_output *o, struct event_state *es) exit(6); } - if (es->count == 0) - return; - /* This bounding matches the one in DRM_IOCTL_WAIT_VBLANK. */ if (es->current_seq - (es->last_seq + es->seq_step) > 1UL << 23) { fprintf(stderr, "unexpected %s seq %u, should be >= %u\n", @@ -862,9 +862,6 @@ static void run_test_on_crtc(struct test_output *o, int crtc, int duration) if (o->flags & TEST_CHECK_TS) sleep(1); - gettimeofday(&o->flip_state.last_ts, NULL); - gettimeofday(&o->vblank_state.last_ts, NULL); - if (do_page_flip(o, o->fb_ids[1])) { fprintf(stderr, "failed to page flip: %s\n", strerror(errno)); exit(4);