All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Lyude <lyude@redhat.com>
Subject: [PATCH i-g-t v2 4/7] tests/chamelium: Reduce the simple hotplug test toggle count for VGA
Date: Tue, 27 Jun 2017 13:53:08 +0300	[thread overview]
Message-ID: <20170627105311.28975-4-paul.kocialkowski@linux.intel.com> (raw)
In-Reply-To: <20170627105311.28975-1-paul.kocialkowski@linux.intel.com>

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 <paul.kocialkowski@linux.intel.com>
---
 tests/chamelium.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/tests/chamelium.c b/tests/chamelium.c
index 835c3282..b412c6a7 100644
--- a/tests/chamelium.c
+++ b/tests/chamelium.c
@@ -47,6 +47,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
  */
@@ -158,7 +161,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;
@@ -166,7 +169,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 */
@@ -680,7 +683,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,
@@ -736,7 +740,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,
@@ -792,7 +797,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,
-- 
2.13.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-06-27 10:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27 10:53 [PATCH i-g-t v2 1/7] lib/igt_aux: Use provided autoresume delay for rtc wake Paul Kocialkowski
2017-06-27 10:53 ` [PATCH i-g-t v2 2/7] chamelium: Add support for HPD toggle scheduling instead of async pulses Paul Kocialkowski
2017-06-27 10:53 ` [PATCH i-g-t v2 3/7] tests/chamelium: Add VGA HPD toggle tests after suspend and hibernate Paul Kocialkowski
2017-06-27 10:53 ` Paul Kocialkowski [this message]
2017-06-27 10:53 ` [PATCH i-g-t v2 5/7] tests/chamelium: Update connector state without reprobe when possible Paul Kocialkowski
2017-06-27 21:26   ` Lyude Paul
2017-06-28  7:47     ` Paul Kocialkowski
2017-06-27 10:53 ` [PATCH i-g-t v2 6/7] tests/chamelium: Disconnect connectors without extra reset Paul Kocialkowski
2017-06-27 21:21   ` Lyude Paul
2017-06-28  7:49     ` Paul Kocialkowski
2017-06-27 10:53 ` [PATCH i-g-t v2 7/7] Make igtrc configuration common, with configurable suspend/resume delay Paul Kocialkowski
2017-06-27 21:11   ` Lyude Paul
2017-06-28  7:27     ` Paul Kocialkowski
2017-06-27 21:25 ` [PATCH i-g-t v2 1/7] lib/igt_aux: Use provided autoresume delay for rtc wake Lyude Paul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170627105311.28975-4-paul.kocialkowski@linux.intel.com \
    --to=paul.kocialkowski@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lyude@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.