From patchwork Thu Nov 22 13:25:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Imre Deak X-Patchwork-Id: 1783801 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 25796DF230 for ; Thu, 22 Nov 2012 13:28:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0991BE5CD2 for ; Thu, 22 Nov 2012 05:28:12 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 62E47E5ED7 for ; Thu, 22 Nov 2012 05:25:12 -0800 (PST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 22 Nov 2012 05:25:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.83,300,1352102400"; d="scan'208";a="221085845" Received: from ideak-desk.fi.intel.com (HELO localhost) ([10.237.72.159]) by azsmga001.ch.intel.com with ESMTP; 22 Nov 2012 05:25:11 -0800 From: Imre Deak To: intel-gfx@lists.freedesktop.org Date: Thu, 22 Nov 2012 15:25:04 +0200 Message-Id: <1353590706-1366-3-git-send-email-imre.deak@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1353590706-1366-1-git-send-email-imre.deak@intel.com> References: <1353590706-1366-1-git-send-email-imre.deak@intel.com> Subject: [Intel-gfx] [i-g-t PATCH 2/4] flip_test: skip check for last_received_ts for the first event X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org 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 --- 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 3dfce8e..e2af358 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);