From patchwork Thu Mar 23 12:48:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Kahola X-Patchwork-Id: 9640983 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 551AC601E9 for ; Thu, 23 Mar 2017 12:47:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49AE326E16 for ; Thu, 23 Mar 2017 12:47:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3EC1B26E49; Thu, 23 Mar 2017 12:47:27 +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 D1D2026E16 for ; Thu, 23 Mar 2017 12:47:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7FCFE6EA11; Thu, 23 Mar 2017 12:47:26 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7CDFA6EA01 for ; Thu, 23 Mar 2017 12:47:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490273243; x=1521809243; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=Z8N4G1e731gwn9kk2ld075C93qwY10y95XIy51J33xo=; b=o6F0jKu6mAAeWdKlCvTNm5VWM6z5jo1uA68c1q8ROqXdfD1vN+SnagJT pnj8Nyyuak47ZOtUip1RUcH78KGOpw==; Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Mar 2017 05:47:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,209,1486454400"; d="scan'208";a="239514291" Received: from sorvi.fi.intel.com ([10.237.72.182]) by fmsmga004.fm.intel.com with ESMTP; 23 Mar 2017 05:47:22 -0700 From: Mika Kahola To: intel-gfx@lists.freedesktop.org Date: Thu, 23 Mar 2017 14:48:27 +0200 Message-Id: <1490273311-9794-5-git-send-email-mika.kahola@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490273311-9794-1-git-send-email-mika.kahola@intel.com> References: <1490273311-9794-1-git-send-email-mika.kahola@intel.com> Subject: [Intel-gfx] [PATCH i-g-t v4 3/7] tests/kms_atomic_transition: Add TEST_ONLY flag 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 Add TEST_ONLY flag to test atomic transition display commits without actual real-life commit. v2: use flag to force atomic commit with TEST_ONLY flag v3: Rebase Signed-off-by: Mika Kahola --- tests/kms_atomic_transition.c | 72 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 59 insertions(+), 13 deletions(-) diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c index 70bff20..466280e 100644 --- a/tests/kms_atomic_transition.c +++ b/tests/kms_atomic_transition.c @@ -397,7 +397,8 @@ static void atomic_commit(igt_display_t *display, enum pipe pipe, unsigned int f */ static void run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output, - enum transition_type type, bool nonblocking, bool fencing) + enum transition_type type, bool nonblocking, bool fencing, + bool force_test_atomic) { struct igt_fb fb, argb_fb, sprite_fb; drmModeModeInfo *mode, override_mode; @@ -408,6 +409,8 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output unsigned flags = DRM_MODE_PAGE_FLIP_EVENT; int ret; + display->force_test_atomic = force_test_atomic; + if (fencing) prepare_fencing(display, pipe); @@ -782,12 +785,15 @@ cleanup: } -static void run_modeset_transition(igt_display_t *display, int requested_outputs, bool nonblocking, bool fencing) +static void run_modeset_transition(igt_display_t *display, int requested_outputs, + bool nonblocking, bool fencing, bool force_test_atomic) { igt_output_t *outputs[I915_MAX_PIPES] = {}; int num_outputs = 0; enum pipe pipe; + display->force_test_atomic = force_test_atomic; + for_each_pipe(display, pipe) { igt_output_t *output; @@ -845,44 +851,84 @@ igt_main igt_subtest("plane-all-transition") for_each_pipe_with_valid_output(&display, pipe, output) - run_transition_test(&display, pipe, output, TRANSITION_PLANES, false, false); + run_transition_test(&display, pipe, output, TRANSITION_PLANES, false, false, false); + + igt_subtest("plane-all-transition-with-test") + for_each_pipe_with_valid_output(&display, pipe, output) + run_transition_test(&display, pipe, output, TRANSITION_PLANES, false, false, true); igt_subtest("plane-all-transition-fencing") for_each_pipe_with_valid_output(&display, pipe, output) - run_transition_test(&display, pipe, output, TRANSITION_PLANES, false, true); + run_transition_test(&display, pipe, output, TRANSITION_PLANES, false, true, false); + + igt_subtest("plane-all-transition-fencing-with-test") + for_each_pipe_with_valid_output(&display, pipe, output) + run_transition_test(&display, pipe, output, TRANSITION_PLANES, false, true, true); igt_subtest("plane-all-transition-nonblocking") for_each_pipe_with_valid_output(&display, pipe, output) - run_transition_test(&display, pipe, output, TRANSITION_PLANES, true, false); + run_transition_test(&display, pipe, output, TRANSITION_PLANES, true, false, false); + + igt_subtest("plane-all-transition-nonblocking-with-test") + for_each_pipe_with_valid_output(&display, pipe, output) + run_transition_test(&display, pipe, output, TRANSITION_PLANES, true, false, true); igt_subtest("plane-all-transition-nonblocking-fencing") for_each_pipe_with_valid_output(&display, pipe, output) - run_transition_test(&display, pipe, output, TRANSITION_PLANES, true, true); + run_transition_test(&display, pipe, output, TRANSITION_PLANES, true, true, false); + + igt_subtest("plane-all-transition-nonblocking-fencing-with-test") + for_each_pipe_with_valid_output(&display, pipe, output) + run_transition_test(&display, pipe, output, TRANSITION_PLANES, true, true, true); igt_subtest("plane-all-modeset-transition") for_each_pipe_with_valid_output(&display, pipe, output) - run_transition_test(&display, pipe, output, TRANSITION_MODESET, false, false); + run_transition_test(&display, pipe, output, TRANSITION_MODESET, false, false, false); + + igt_subtest("plane-all-modeset-transition-with-test") + for_each_pipe_with_valid_output(&display, pipe, output) + run_transition_test(&display, pipe, output, TRANSITION_MODESET, false, false, true); igt_subtest("plane-all-modeset-transition-fencing") for_each_pipe_with_valid_output(&display, pipe, output) - run_transition_test(&display, pipe, output, TRANSITION_MODESET, false, true); + run_transition_test(&display, pipe, output, TRANSITION_MODESET, false, true, false); + + igt_subtest("plane-all-modeset-transition-fencing-with-test") + for_each_pipe_with_valid_output(&display, pipe, output) + run_transition_test(&display, pipe, output, TRANSITION_MODESET, false, true, true); igt_subtest("plane-toggle-modeset-transition") for_each_pipe_with_valid_output(&display, pipe, output) - run_transition_test(&display, pipe, output, TRANSITION_MODESET_DISABLE, false, false); + run_transition_test(&display, pipe, output, TRANSITION_MODESET_DISABLE, false, false, false); + + igt_subtest("plane-toggle-modeset-transition-with-test") + for_each_pipe_with_valid_output(&display, pipe, output) + run_transition_test(&display, pipe, output, TRANSITION_MODESET_DISABLE, false, false, true); for (i = 1; i <= I915_MAX_PIPES; i++) { igt_subtest_f("%ix-modeset-transitions", i) - run_modeset_transition(&display, i, false, false); + run_modeset_transition(&display, i, false, false, false); + + igt_subtest_f("%ix-modeset-transitions-with-test", i) + run_modeset_transition(&display, i, false, false, true); igt_subtest_f("%ix-modeset-transitions-nonblocking", i) - run_modeset_transition(&display, i, true, false); + run_modeset_transition(&display, i, true, false, false); + + igt_subtest_f("%ix-modeset-transitions-nonblocking-with-test", i) + run_modeset_transition(&display, i, true, false, true); igt_subtest_f("%ix-modeset-transitions-fencing", i) - run_modeset_transition(&display, i, false, true); + run_modeset_transition(&display, i, false, true, false); + + igt_subtest_f("%ix-modeset-transitions-fencing-with-test", i) + run_modeset_transition(&display, i, false, true, true); igt_subtest_f("%ix-modeset-transitions-nonblocking-fencing", i) - run_modeset_transition(&display, i, true, true); + run_modeset_transition(&display, i, true, true, false); + + igt_subtest_f("%ix-modeset-transitions-nonblocking-fencing-with-test", i) + run_modeset_transition(&display, i, true, true, true); } igt_fixture {