From patchwork Tue Mar 14 17:41:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ville Syrjala X-Patchwork-Id: 9624085 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4F2C160244 for ; Tue, 14 Mar 2017 17:41:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 425ED20564 for ; Tue, 14 Mar 2017 17:41:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 36A4A28538; Tue, 14 Mar 2017 17:41:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C7BA520564 for ; Tue, 14 Mar 2017 17:41:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ED2466E785; Tue, 14 Mar 2017 17:41:47 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4E71C6E057 for ; Tue, 14 Mar 2017 17:41:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1489513306; x=1521049306; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=c50ofYuSQD92cZxad8cQ8bbyR9o3dhAfDDXUdX56fLE=; b=Snd/oHTyIxjebOrGK6jH3buGIpO4/Br9S2BkNdiBD4zAvLOv0hyHLm2E WfdyDUf42onECMDYZUJIQgCgKfn7eA==; Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Mar 2017 10:41:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.36,165,1486454400"; d="scan'208"; a="1108390336" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga001.jf.intel.com with SMTP; 14 Mar 2017 10:41:43 -0700 Received: by stinkbox (sSMTP sendmail emulation); Tue, 14 Mar 2017 19:41:33 +0200 From: ville.syrjala@linux.intel.com To: intel-gfx@lists.freedesktop.org Date: Tue, 14 Mar 2017 19:41:33 +0200 Message-Id: <20170314174133.22415-1-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.10.2 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t] tests/kms_cursor_legacy: make_busy() before get_vblank() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Ville Syrjälä VLV is a sloth and so doing anything extra between the first and last get_vblank() is likely to increase the chance of failing the test. Let's move the make_busy() stuff to happen before the first get_vblank() to reduce the amount of work done there. These tests are still failing quite often on my VLV, but that is mostly caused by igt_kms's tendency to still re-read all the connector properties and whatnot as part of the commit operation. I suspect that fixing that would eliminate most of the spurious failures. Signed-off-by: Ville Syrjälä --- tests/kms_cursor_legacy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c index c7083a070f27..b048f4acfcaf 100644 --- a/tests/kms_cursor_legacy.c +++ b/tests/kms_cursor_legacy.c @@ -613,13 +613,13 @@ static void basic_flip_cursor(igt_display_t *display, /* Bind the cursor first to warm up */ do_ioctl(display->drm_fd, DRM_IOCTL_MODE_CURSOR, &arg[0]); - /* Start with a synchronous query to align with the vblank */ - vblank_start = get_vblank(display->drm_fd, pipe, DRM_VBLANK_NEXTONMISS); - busy = NULL; if (flags & BASIC_BUSY) busy = make_fb_busy(display->drm_fd, &fb_info); + /* Start with a synchronous query to align with the vblank */ + vblank_start = get_vblank(display->drm_fd, pipe, DRM_VBLANK_NEXTONMISS); + switch (order) { case FLIP_BEFORE_CURSOR: switch (mode) {