From patchwork Mon Jun 26 13:59:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowki X-Patchwork-Id: 9809753 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 576E2603D7 for ; Mon, 26 Jun 2017 14:00:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5BD49285D9 for ; Mon, 26 Jun 2017 14:00:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A4A5285FC; Mon, 26 Jun 2017 14:00:32 +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 B7F57285EE for ; Mon, 26 Jun 2017 14:00:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EE55C6E248; Mon, 26 Jun 2017 14:00:30 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 11B016E257 for ; Mon, 26 Jun 2017 14:00:27 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jun 2017 07:00:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,395,1493708400"; d="scan'208";a="103742555" Received: from linux.intel.com ([10.54.29.200]) by orsmga002.jf.intel.com with ESMTP; 26 Jun 2017 07:00:26 -0700 Received: from workstation.fi.intel.com (workstation.fi.intel.com [10.237.68.144]) by linux.intel.com (Postfix) with ESMTP id 77548580351; Mon, 26 Jun 2017 07:00:25 -0700 (PDT) From: Paul Kocialkowski To: intel-gfx@lists.freedesktop.org Date: Mon, 26 Jun 2017 16:59:05 +0300 Message-Id: <20170626135906.32708-6-paul.kocialkowski@linux.intel.com> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170626135906.32708-1-paul.kocialkowski@linux.intel.com> References: <20170626135906.32708-1-paul.kocialkowski@linux.intel.com> Cc: Lyude Subject: [Intel-gfx] [PATCH i-g-t 6/7] tests/chamelium: Reduce the simple hotplug test toggle count for VGA 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 Since VGA hpd detection is done through RGB lines load detection and nowadays often goes through a bridge to some digital interface, HPD detection usually takes a while (up to a couple seconds). Thus, it is not as relevant to stress it as many as 15 times. This brings the toggle count down to 5 times, which makes the test run a lot faster without really changing the outcome much. Signed-off-by: Paul Kocialkowski --- tests/chamelium.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/chamelium.c b/tests/chamelium.c index 3ee57af6..01ae4cd7 100644 --- a/tests/chamelium.c +++ b/tests/chamelium.c @@ -46,6 +46,9 @@ typedef struct { #define HPD_STORM_PULSE_INTERVAL_DP 100 /* ms */ #define HPD_STORM_PULSE_INTERVAL_HDMI 200 /* ms */ +#define HPD_TOGGLE_COUNT_VGA 5 +#define HPD_TOGGLE_COUNT_DP_HDMI 15 + /* Pre-calculated CRCs for the pattern fb, for all the modes in the default * chamelium edid */ @@ -159,7 +162,7 @@ reset_state(data_t *data, struct chamelium_port *port) } static void -test_basic_hotplug(data_t *data, struct chamelium_port *port) +test_basic_hotplug(data_t *data, struct chamelium_port *port, int toggle_count) { struct udev_monitor *mon = igt_watch_hotplug(); int i; @@ -167,7 +170,7 @@ test_basic_hotplug(data_t *data, struct chamelium_port *port) reset_state(data, NULL); igt_hpd_storm_set_threshold(data->drm_fd, 0); - for (i = 0; i < 15; i++) { + for (i = 0; i < toggle_count; i++) { igt_flush_hotplugs(mon); /* Check if we get a sysfs hotplug event */ @@ -685,7 +688,8 @@ igt_main } connector_subtest("dp-hpd", DisplayPort) - test_basic_hotplug(&data, port); + test_basic_hotplug(&data, port, + HPD_TOGGLE_COUNT_DP_HDMI); connector_subtest("dp-edid-read", DisplayPort) { test_edid_read(&data, port, edid_id, @@ -741,7 +745,8 @@ igt_main } connector_subtest("hdmi-hpd", HDMIA) - test_basic_hotplug(&data, port); + test_basic_hotplug(&data, port, + HPD_TOGGLE_COUNT_DP_HDMI); connector_subtest("hdmi-edid-read", HDMIA) { test_edid_read(&data, port, edid_id, @@ -797,7 +802,7 @@ igt_main } connector_subtest("vga-hpd", VGA) - test_basic_hotplug(&data, port); + test_basic_hotplug(&data, port, HPD_TOGGLE_COUNT_VGA); connector_subtest("vga-edid-read", VGA) { test_edid_read(&data, port, edid_id,