From patchwork Thu May 7 18:56:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 6360581 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 5DB22BEEE5 for ; Thu, 7 May 2015 18:57:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9AF9D203B1 for ; Thu, 7 May 2015 18:57:32 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B656A20392 for ; Thu, 7 May 2015 18:57:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1294D72141; Thu, 7 May 2015 11:57:31 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qg0-f42.google.com (mail-qg0-f42.google.com [209.85.192.42]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A0D67213D for ; Thu, 7 May 2015 11:57:30 -0700 (PDT) Received: by qgdy78 with SMTP id y78so25750104qgd.0 for ; Thu, 07 May 2015 11:57:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gPU98M/JbHa801Tbs7t6+fnmXqvnapbD7cBPRm3iPmc=; b=k4kkIa9EZX6yGspF58GRUiwV5ZRy7uaYRMQO++EVGAzLKTJLIE+tCFnwgkKqpZHR2p aCLX7sNgOdB28LF4+2TbRGnahOas48qC7MKc80rcyJl3xImwSrAapoDtzO0mmSsRt4Ja m+JUUKfsfI81wUf3fAbmpY0cN0HsuiU4YqzhakHs53EzHamJU6RX8gBaRaznEg/UiMK1 icILlAbnamrwRNXj/RtWRcZTYxr4XwBwkw+rvkgLECkCfsU0G54WBQ7djfQH360v86L8 q9FmtU+X5HjNXlRi7krqUwNSyI8VZIIt31vHkpg18WeV3AfILNDhEI3N9YjQ5Zl2/BBG qf8w== X-Received: by 10.140.30.245 with SMTP id d108mr17609qgd.93.1431025049649; Thu, 07 May 2015 11:57:29 -0700 (PDT) Received: from localhost.localdomain ([187.121.142.45]) by mx.google.com with ESMTPSA id a8sm1955331qkh.43.2015.05.07.11.57.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 May 2015 11:57:28 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Thu, 7 May 2015 15:56:31 -0300 Message-Id: <1431024996-2267-4-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1431024996-2267-1-git-send-email-przanoni@gmail.com> References: <1431024996-2267-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH igt 3/8] tests/kms_fbc_crc: unify flip handling 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=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_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: Paulo Zanoni Just a small simplification to make the code a little easier to understand, and to help us when we further split drawing vs flipping later. Signed-off-by: Paulo Zanoni --- tests/kms_fbc_crc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/kms_fbc_crc.c b/tests/kms_fbc_crc.c index af4c370..20510ff 100644 --- a/tests/kms_fbc_crc.c +++ b/tests/kms_fbc_crc.c @@ -216,19 +216,18 @@ static void test_crc(data_t *data, enum test_mode mode) igt_assert(fbc_enabled(data)); - if (mode >= TEST_PAGE_FLIP_AND_MMAP_CPU) { + if (mode == TEST_PAGE_FLIP || mode >= TEST_PAGE_FLIP_AND_MMAP_CPU) { handle = data->fb[1].gem_handle; igt_assert(drmModePageFlip(data->drm_fd, crtc_id, data->fb[1].fb_id, 0, NULL) == 0); - igt_assert(wait_for_fbc_enabled(data)); + if (mode != TEST_PAGE_FLIP) + igt_assert(wait_for_fbc_enabled(data)); } switch (mode) { void *ptr; case TEST_PAGE_FLIP: - igt_assert(drmModePageFlip(data->drm_fd, crtc_id, - data->fb[1].fb_id, 0, NULL) == 0); break; case TEST_MMAP_CPU: case TEST_PAGE_FLIP_AND_MMAP_CPU: