From mboxrd@z Thu Jan 1 00:00:00 1970 From: Imre Deak Subject: [PATCH 4/5] flip_test: add comment about the race between flip vs. vblank events Date: Mon, 22 Oct 2012 20:40:07 +0300 Message-ID: <1350927609-14649-4-git-send-email-imre.deak@intel.com> References: <1350927609-14649-1-git-send-email-imre.deak@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 409139E7A6 for ; Mon, 22 Oct 2012 10:40:35 -0700 (PDT) In-Reply-To: <1350927609-14649-1-git-send-email-imre.deak@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org Signed-off-by: Imre Deak --- tests/flip_test.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/flip_test.c b/tests/flip_test.c index b387bf5..7fed2f1 100644 --- a/tests/flip_test.c +++ b/tests/flip_test.c @@ -444,6 +444,11 @@ static unsigned int run_test_step(struct test_output *o) if (o->flags & TEST_VBLANK_ABSOLUTE) target_seq += o->vblank_state.last_seq; + /* + * It's possible that we don't have a pending flip here, in case both + * wf-vblank and flip were scheduled and the wf-vblank event was + * delivered earlier. The same applies to vblank events w.r.t flip. + */ do_flip = (o->flags & TEST_FLIP) && !(o->pending_events & EVENT_FLIP); do_vblank = (o->flags & TEST_VBLANK) && !(o->pending_events & EVENT_VBLANK); -- 1.7.9.5