From patchwork Mon May 16 13:38:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foss X-Patchwork-Id: 9103081 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D2D07BF29F for ; Mon, 16 May 2016 13:39:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F04ED202AE for ; Mon, 16 May 2016 13:39:12 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 234462025A for ; Mon, 16 May 2016 13:39:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7A9376E45B; Mon, 16 May 2016 13:39:11 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by gabe.freedesktop.org (Postfix) with ESMTPS id 111706E45B for ; Mon, 16 May 2016 13:38:51 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: robertfoss) with ESMTPSA id 0504426135F From: robert.foss@collabora.com To: daniel.vetter@ffwll.ch, daniel.stone@collabora.com, marius.c.vlad@intel.com, ville.syrjala@linux.intel.com, jani.nikula@intel.com, chris@chris-wilson.co.uk Date: Mon, 16 May 2016 09:38:31 -0400 Message-Id: <1463405912-1592-7-git-send-email-robert.foss@collabora.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1463405912-1592-1-git-send-email-robert.foss@collabora.com> References: <1463405912-1592-1-git-send-email-robert.foss@collabora.com> Cc: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH i-g-t v5 6/7] igt_kms: Change igt_wait_for_vblank to use helper function. 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: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Robert Foss Change igt_wait_for_vblank() to use kmstest_get_vbl_flag() helper function. Signed-off-by: Robert Foss --- lib/igt_kms.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 5ef73c8..bc022c8 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -2488,11 +2488,13 @@ void igt_crtc_set_background(igt_pipe_t *pipe, uint64_t background) void igt_wait_for_vblank(int drm_fd, enum pipe pipe) { drmVBlank wait_vbl; + uint32_t pipe_id_flag; memset(&wait_vbl, 0, sizeof(wait_vbl)); + pipe_id_flag = kmstest_get_vbl_flag(pipe); - wait_vbl.request.type = pipe << DRM_VBLANK_HIGH_CRTC_SHIFT | - DRM_VBLANK_RELATIVE; + wait_vbl.request.type = DRM_VBLANK_RELATIVE; + wait_vbl.request.type |= pipe_id_flag; wait_vbl.request.sequence = 1; igt_assert(drmWaitVBlank(drm_fd, &wait_vbl) == 0);