From patchwork Wed Aug 23 15:21:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowki X-Patchwork-Id: 9917603 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 54A7560327 for ; Wed, 23 Aug 2017 15:21:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 475732870B for ; Wed, 23 Aug 2017 15:21:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C4732898A; Wed, 23 Aug 2017 15:21:23 +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 E95B52870B for ; Wed, 23 Aug 2017 15:21:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3FF216E5B8; Wed, 23 Aug 2017 15:21:22 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 970F86E5B8 for ; Wed, 23 Aug 2017 15:21:20 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Aug 2017 08:21:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.41,417,1498546800"; d="scan'208"; a="1006872590" Received: from linux.intel.com ([10.54.29.200]) by orsmga003.jf.intel.com with ESMTP; 23 Aug 2017 08:21:19 -0700 Received: from workstation.fi.intel.com (workstation.fi.intel.com [10.237.68.31]) by linux.intel.com (Postfix) with ESMTP id 2F9615803AB; Wed, 23 Aug 2017 08:21:17 -0700 (PDT) From: Paul Kocialkowski To: intel-gfx@lists.freedesktop.org Date: Wed, 23 Aug 2017 18:21:13 +0300 Message-Id: <20170823152114.16559-2-paul.kocialkowski@linux.intel.com> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20170823152114.16559-1-paul.kocialkowski@linux.intel.com> References: <20170823152114.16559-1-paul.kocialkowski@linux.intel.com> Subject: [Intel-gfx] [PATCH i-g-t 2/3] tests/chamelium: Introduce fast CRC tests, with a single mode 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 This introduces a fast fashion of testing display CRC, that only tests a single mode (the highest resolution). It drastically reduces the run time of the test, which is necessary for the fast-feedback test list. Signed-off-by: Paul Kocialkowski --- tests/chamelium.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/tests/chamelium.c b/tests/chamelium.c index 0339c635..00ae484b 100644 --- a/tests/chamelium.c +++ b/tests/chamelium.c @@ -497,7 +497,8 @@ disable_output(data_t *data, } static void -test_display_crc(data_t *data, struct chamelium_port *port, int count) +test_display_crc(data_t *data, struct chamelium_port *port, int count, + bool fast) { igt_display_t display; igt_output_t *output; @@ -509,6 +510,7 @@ test_display_crc(data_t *data, struct chamelium_port *port, int count) drmModeModeInfo *mode; drmModeConnector *connector; int fb_id, i, j, captured_frame_count; + int count_modes; reset_state(data, port); @@ -517,7 +519,9 @@ test_display_crc(data_t *data, struct chamelium_port *port, int count) primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY); igt_assert(primary); - for (i = 0; i < connector->count_modes; i++) { + count_modes = fast ? 1 : connector->count_modes; + + for (i = 0; i < count_modes; i++) { mode = &connector->modes[i]; fb_id = igt_create_color_pattern_fb(data->drm_fd, mode->hdisplay, @@ -818,10 +822,13 @@ igt_main edid_id, alt_edid_id); connector_subtest("dp-crc-single", DisplayPort) - test_display_crc(&data, port, 1); + test_display_crc(&data, port, 1, false); + + connector_subtest("dp-crc-fast", DisplayPort) + test_display_crc(&data, port, 1, true); connector_subtest("dp-crc-multiple", DisplayPort) - test_display_crc(&data, port, 3); + test_display_crc(&data, port, 3, false); connector_subtest("dp-frame-dump", DisplayPort) test_display_frame_dump(&data, port); @@ -879,10 +886,13 @@ igt_main edid_id, alt_edid_id); connector_subtest("hdmi-crc-single", HDMIA) - test_display_crc(&data, port, 1); + test_display_crc(&data, port, 1, false); + + connector_subtest("hdmi-crc-fast", HDMIA) + test_display_crc(&data, port, 1, true); connector_subtest("hdmi-crc-multiple", HDMIA) - test_display_crc(&data, port, 3); + test_display_crc(&data, port, 3, false); connector_subtest("hdmi-frame-dump", HDMIA) test_display_frame_dump(&data, port);