From patchwork Tue Jul 19 13:56:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lionel Landwerlin X-Patchwork-Id: 9237519 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 DF85460574 for ; Tue, 19 Jul 2016 13:57:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF98826B4A for ; Tue, 19 Jul 2016 13:57:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4837272AA; Tue, 19 Jul 2016 13:57:17 +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]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B7D026B4A for ; Tue, 19 Jul 2016 13:57:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 345F86E223; Tue, 19 Jul 2016 13:57:14 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTP id 8E0D56E1B2 for ; Tue, 19 Jul 2016 13:57:11 +0000 (UTC) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP; 19 Jul 2016 06:56:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,389,1464678000"; d="scan'208";a="141878089" Received: from ruehl-mobl1.ger.corp.intel.com (HELO ivy.ger.corp.intel.com) ([10.252.62.158]) by fmsmga004.fm.intel.com with ESMTP; 19 Jul 2016 06:56:50 -0700 From: Lionel Landwerlin To: intel-gfx@lists.freedesktop.org Date: Tue, 19 Jul 2016 14:56:47 +0100 Message-Id: <1468936607-13400-1-git-send-email-lionel.g.landwerlin@intel.com> X-Mailer: git-send-email 2.8.1 Subject: [Intel-gfx] [PATCH i-g-t] tests: add some color management tests to BAT 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 We only enable pipe A tests and basic size fuzzing tests to minimize the amount of time spend. From experience color management issues tends to trigger failures on all pipes so only testing one seems reasonable. Signed-off-by: Lionel Landwerlin --- tests/kms_pipe_color.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/tests/kms_pipe_color.c b/tests/kms_pipe_color.c index 9f7ac7e..eea70b9 100644 --- a/tests/kms_pipe_color.c +++ b/tests/kms_pipe_color.c @@ -830,6 +830,13 @@ static void test_pipe_limited_range_ctm(data_t *data, } #endif +static const char * +test_prefix_for_pipe(enum pipe p) +{ + // Only make the first pipe part of the BAT. + return p == PIPE_A ? "basic-" : ""; +} + static void run_tests_for_pipe(data_t *data, enum pipe p) { @@ -879,7 +886,7 @@ run_tests_for_pipe(data_t *data, enum pipe p) data->color_depth = 8; delta = 1.0 / (1 << data->color_depth); - igt_subtest_f("ctm-red-to-blue-pipe%d", p) { + igt_subtest_f("%sctm-red-to-blue-pipe%d", test_prefix_for_pipe(p), p) { color_t blue_green_blue[] = { { 0.0, 0.0, 1.0 }, { 0.0, 1.0, 0.0 }, @@ -892,7 +899,7 @@ run_tests_for_pipe(data_t *data, enum pipe p) blue_green_blue, ctm)); } - igt_subtest_f("ctm-green-to-red-pipe%d", p) { + igt_subtest_f("%sctm-green-to-red-pipe%d", test_prefix_for_pipe(p), p) { color_t red_red_blue[] = { { 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0 }, @@ -905,7 +912,7 @@ run_tests_for_pipe(data_t *data, enum pipe p) red_red_blue, ctm)); } - igt_subtest_f("ctm-blue-to-red-pipe%d", p) { + igt_subtest_f("%sctm-blue-to-red-pipe%d", test_prefix_for_pipe(p), p) { color_t red_green_red[] = { { 1.0, 0.0, 0.0 }, { 0.0, 1.0, 0.0 }, @@ -922,7 +929,7 @@ run_tests_for_pipe(data_t *data, enum pipe p) * the it depends on the hardware we're dealing with, we can * either get clamped or rounded values and we also need to * account for odd number of items in the LUTs. */ - igt_subtest_f("ctm-0-25-pipe%d", p) { + igt_subtest_f("%sctm-0-25-pipe%d", test_prefix_for_pipe(p), p) { color_t expected_colors[] = { { 0.0, }, { 0.0, }, { 0.0, } }; @@ -943,7 +950,7 @@ run_tests_for_pipe(data_t *data, enum pipe p) igt_assert(success); } - igt_subtest_f("ctm-0-5-pipe%d", p) { + igt_subtest_f("%sctm-0-5-pipe%d", test_prefix_for_pipe(p), p) { color_t expected_colors[] = { { 0.0, }, { 0.0, }, { 0.0, } }; @@ -964,7 +971,7 @@ run_tests_for_pipe(data_t *data, enum pipe p) igt_assert(success); } - igt_subtest_f("ctm-0-75-pipe%d", p) { + igt_subtest_f("%sctm-0-75-pipe%d", test_prefix_for_pipe(p), p) { color_t expected_colors[] = { { 0.0, }, { 0.0, }, { 0.0, } }; @@ -985,7 +992,7 @@ run_tests_for_pipe(data_t *data, enum pipe p) igt_assert(success); } - igt_subtest_f("ctm-max-pipe%d", p) { + igt_subtest_f("%sctm-max-pipe%d", test_prefix_for_pipe(p), p) { color_t full_rgb[] = { { 1.0, 0.0, 0.0 }, { 0.0, 1.0, 0.0 }, @@ -1003,7 +1010,7 @@ run_tests_for_pipe(data_t *data, enum pipe p) full_rgb, ctm)); } - igt_subtest_f("ctm-negative-pipe%d", p) { + igt_subtest_f("%sctm-negative-pipe%d", test_prefix_for_pipe(p), p) { color_t all_black[] = { { 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0 }, @@ -1017,20 +1024,20 @@ run_tests_for_pipe(data_t *data, enum pipe p) } #if 0 - igt_subtest_f("ctm-limited-range-pipe%d", p) + igt_subtest_f("%sctm-limited-range-pipe%d", test_prefix_for_pipe(p), p) test_pipe_limited_range_ctm(data, primary); #endif - igt_subtest_f("degamma-pipe%d", p) + igt_subtest_f("%sdegamma-pipe%d", test_prefix_for_pipe(p), p) test_pipe_degamma(data, primary); - igt_subtest_f("gamma-pipe%d", p) + igt_subtest_f("%sgamma-pipe%d", test_prefix_for_pipe(p), p) test_pipe_gamma(data, primary); - igt_subtest_f("legacy-gamma-pipe%d", p) + igt_subtest_f("%slegacy-gamma-pipe%d", test_prefix_for_pipe(p), p) test_pipe_legacy_gamma(data, primary); - igt_subtest_f("legacy-gamma-reset-pipe%d", p) + igt_subtest_f("%slegacy-gamma-reset-pipe%d", test_prefix_for_pipe(p), p) test_pipe_legacy_gamma_reset(data, primary); igt_fixture { @@ -1172,10 +1179,10 @@ igt_main for (int pipe = 0; pipe < I915_MAX_PIPES; pipe++) run_tests_for_pipe(&data, pipe); - igt_subtest_f("invalid-lut-sizes") + igt_subtest_f("basic-invalid-lut-sizes") invalid_lut_sizes(&data); - igt_subtest_f("invalid-ctm-matrix-sizes") + igt_subtest_f("basic-invalid-ctm-matrix-sizes") invalid_ctm_matrix_sizes(&data); igt_fixture {