From patchwork Mon Nov 14 09:59:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 9426991 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 4BBC260471 for ; Mon, 14 Nov 2016 10:01:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 403E128719 for ; Mon, 14 Nov 2016 10:01:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 351D32870A; Mon, 14 Nov 2016 10:01:22 +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.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED 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 D7737286DB for ; Mon, 14 Nov 2016 10:01:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 246166E394; Mon, 14 Nov 2016 10:00:18 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by gabe.freedesktop.org (Postfix) with ESMTPS id 95BD26E3D4; Mon, 14 Nov 2016 10:00:10 +0000 (UTC) Received: by mail-pf0-f194.google.com with SMTP id c4so3385771pfb.3; Mon, 14 Nov 2016 02:00:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ossYTzZIkN40dvACUGmZo/9daqg3M5bwW2r3fctl/kU=; b=e1Fru+KZEo9ttoaV/azh+Ez9slBLCmqKz+XMaJlex6iIJq+z4pO5E3ieQ5XZcbQ761 5eJlZIuh561n195lS2vPc1cTeXaNbHG9hueaH0bbAVN3Fs5PtEZl7FHXchLRa4Qp2XcZ vMjs6Jj3f2sRIU/48rH9Urh+NRcA1OwG6VK7JkD2OA95T8r6h+Me3TQ0T329sg0pzT5v C2G8POhFwx+zOlNZBAalRpuevw8T0H07YfvJeA3Re0AHx0Mq0a9ZW+hdyXeckb/3uAJu sFuVg/rbVLRR4jX7XQ1YCMb4Wg5DM4U/tALBqL9UW32HJCVjl/l3ZKGfz3JFm9pdU4iz BTYw== X-Gm-Message-State: ABUngvdL0l+gMW6xh68AF2FJpru0du5lRGKQ9OOWRBTnNl/fRcrkpHcvT+xgEBdXqJTuag== X-Received: by 10.99.36.65 with SMTP id k62mr27688605pgk.88.1479117609989; Mon, 14 Nov 2016 02:00:09 -0800 (PST) Received: from jade.nodan1.kt.home.ne.jp (202-72-64-164.koalanet.ne.jp. [202.72.64.164]) by smtp.gmail.com with ESMTPSA id p125sm14320235pfg.33.2016.11.14.02.00.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Nov 2016 02:00:08 -0800 (PST) From: Gustavo Padovan To: intel-gfx@lists.freedesktop.org Date: Mon, 14 Nov 2016 18:59:26 +0900 Message-Id: <1479117566-17709-15-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1479117566-17709-1-git-send-email-gustavo@padovan.org> References: <1479117566-17709-1-git-send-email-gustavo@padovan.org> Cc: Gustavo Padovan , dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH 12/12] tests/kms_atomic_transition: set out_fence for all crtcs 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-Virus-Scanned: ClamAV using ClamSMTP From: Gustavo Padovan Signed-off-by: Gustavo Padovan --- tests/kms_atomic_transition.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c index 54fc9da..3022e04 100644 --- a/tests/kms_atomic_transition.c +++ b/tests/kms_atomic_transition.c @@ -486,7 +486,7 @@ static void collect_crcs_mask(igt_pipe_crc_t **pipe_crcs, unsigned mask, igt_crc } } -static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblocking) +static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblocking, bool fencing) { struct igt_fb fbs[2]; int i, j; @@ -495,6 +495,7 @@ static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblock igt_output_t *output; unsigned width = 0, height = 0; bool skip_test = false; + int out_fence[I915_MAX_PIPES]; for_each_connected_output(display, output) { drmModeModeInfo *mode = igt_output_get_mode(output); @@ -532,6 +533,11 @@ static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblock igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay); } else igt_plane_set_fb(plane, NULL); + + if(fencing) + igt_pipe_set_out_fence_ptr(&display->pipes[i], + &out_fence[i]); + } /* @@ -619,7 +625,7 @@ cleanup: } -static void run_modeset_transition(igt_display_t *display, int requested_outputs, bool nonblocking) +static void run_modeset_transition(igt_display_t *display, int requested_outputs, bool nonblocking, bool fencing) { igt_output_t *outputs[I915_MAX_PIPES] = {}; int num_outputs = 0; @@ -647,7 +653,7 @@ static void run_modeset_transition(igt_display_t *display, int requested_outputs "Should have at least %i outputs, found %i\n", requested_outputs, num_outputs); - run_modeset_tests(display, requested_outputs, nonblocking); + run_modeset_tests(display, requested_outputs, nonblocking, fencing); } igt_main @@ -706,10 +712,16 @@ igt_main for (i = 1; i <= I915_MAX_PIPES; i++) { igt_subtest_f("%ix-modeset-transitions", i) - run_modeset_transition(&display, i, false); + run_modeset_transition(&display, i, false, false); igt_subtest_f("%ix-modeset-transitions-nonblocking", i) - run_modeset_transition(&display, i, true); + run_modeset_transition(&display, i, true, false); + + igt_subtest_f("%ix-modeset-transitions-fencing", i) + run_modeset_transition(&display, i, false, true); + + igt_subtest_f("%ix-modeset-transitions-nonblocking-fencing", i) + run_modeset_transition(&display, i, true, true); } igt_fixture {