From patchwork Fri Apr 22 15:16:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 8912601 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 26DED9F372 for ; Fri, 22 Apr 2016 15:16:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 56B3F20212 for ; Fri, 22 Apr 2016 15:16:25 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7AF2C2026F for ; Fri, 22 Apr 2016 15:16:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8CA176E334; Fri, 22 Apr 2016 15:16:21 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 11BC36E334 for ; Fri, 22 Apr 2016 15:16:20 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 22 Apr 2016 08:16:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,517,1455004800"; d="scan'208";a="790232510" Received: from tursulin-linux.isw.intel.com ([10.102.226.196]) by orsmga003.jf.intel.com with ESMTP; 22 Apr 2016 08:16:19 -0700 From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org Date: Fri, 22 Apr 2016 16:16:16 +0100 Message-Id: <1461338176-17711-2-git-send-email-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461338176-17711-1-git-send-email-tvrtko.ursulin@linux.intel.com> References: <1461338176-17711-1-git-send-email-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [PATCH i-g-t 2/2] kms_flip: Run basic tests only on one pipe 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.2 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: Tvrtko Ursulin It brings enough value for the basic test set to check one connector with one pipe only, rather every connector with all possible pipes. Signed-off-by: Tvrtko Ursulin --- tests/kms_flip.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index 1e7336e1ba95..992c59b53fb9 100644 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -1283,7 +1283,7 @@ static void free_test_output(struct test_output *o) } } -static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs, +static bool run_test_on_crtc_set(struct test_output *o, int *crtc_idxs, int crtc_count, int duration_ms) { char test_name[128]; @@ -1296,7 +1296,7 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs, case 1: connector_find_preferred_mode(o->_connector[0], crtc_idxs[0], o); if (!o->mode_valid) - return; + return false; snprintf(test_name, sizeof(test_name), "%s on pipe %s, connector %s-%d", igt_subtest_name(), @@ -1307,7 +1307,7 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs, case 2: connector_find_compatible_mode(crtc_idxs[0], crtc_idxs[1], o); if (!o->mode_valid) - return; + return false; snprintf(test_name, sizeof(test_name), "%s on pipe %s:%s, connector %s-%d:%s-%d", igt_subtest_name(), @@ -1422,6 +1422,8 @@ out: last_connector = NULL; free_test_output(o); + + return true; } static int run_test(int duration, int flags) @@ -1454,6 +1456,9 @@ static int run_test(int duration, int flags) modes++; free_test_output(&o); + + if ((flags & TEST_BASIC) && modes > 0) + break; } } @@ -1462,6 +1467,7 @@ static int run_test(int duration, int flags) duration = max(500, duration); /* Find any connected displays */ + modes = 0; for (i = 0; i < resources->count_connectors; i++) { for (n = 0; n < resources->count_crtcs; n++) { int crtc_idx; @@ -1476,7 +1482,11 @@ static int run_test(int duration, int flags) o.depth = 24; crtc_idx = n; - run_test_on_crtc_set(&o, &crtc_idx, 1, duration); + if (run_test_on_crtc_set(&o, &crtc_idx, 1, duration)) + modes++; + + if ((flags & TEST_BASIC) && modes > 0) + break; } }