summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Kocialkowki <paul.kocialkowski@linux.intel.com>2017-06-27 13:53:08 +0300
committerLyude <lyude@redhat.com>2017-06-27 17:16:36 -0400
commit7d714b2e7221c44ffb2c538173fc249bfa7a3ac7 (patch)
treeda005637ea9f2e85ec250463bb2c5f3f5b406740 /tests
parent2b15b2df35d7be1c5a36bd77c580d07efcd8deea (diff)
tests/chamelium: Reduce the simple hotplug test toggle count for VGA
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> Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/chamelium.c15
1 files 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,