[Intel-gfx] [PATCH i-g-t 5/7] tests/chamelium: Use configurable DUT suspend/resume delay
Paul Kocialkowski
paul.kocialkowski at linux.intel.com
Mon Jun 26 13:59:04 UTC 2017
Now that the suspend/resume delay can be configured in the IGT
configuration (igtrc), use it in the chamelium suspend/resume tests.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski at linux.intel.com>
---
tests/chamelium.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/tests/chamelium.c b/tests/chamelium.c
index 15ed0f28..3ee57af6 100644
--- a/tests/chamelium.c
+++ b/tests/chamelium.c
@@ -42,7 +42,6 @@ typedef struct {
} data_t;
#define HOTPLUG_TIMEOUT 20 /* seconds */
-#define SUSPEND_RESUME_DELAY 20 /* seconds */
#define HPD_STORM_PULSE_INTERVAL_DP 100 /* ms */
#define HPD_STORM_PULSE_INTERVAL_HDMI 200 /* ms */
@@ -222,21 +221,22 @@ try_suspend_resume_hpd(data_t *data, struct chamelium_port *port,
enum igt_suspend_state state, enum igt_suspend_test test,
struct udev_monitor *mon, bool connected)
{
+ int delay = chamelium_get_suspend_resume_delay(data->chamelium);
int p;
- igt_set_autoresume_delay(SUSPEND_RESUME_DELAY);
+ igt_set_autoresume_delay(delay);
igt_flush_hotplugs(mon);
+ delay = delay * 1000 / 2;
+
if (port) {
- chamelium_schedule_hpd_toggle(data->chamelium, port,
- SUSPEND_RESUME_DELAY * 1000 / 2,
+ chamelium_schedule_hpd_toggle(data->chamelium, port, delay,
!connected);
} else {
for (p = 0; p < data->port_count; p++) {
port = data->ports[p];
chamelium_schedule_hpd_toggle(data->chamelium, port,
- SUSPEND_RESUME_DELAY * 1000 / 2,
- !connected);
+ delay, !connected);
}
port = NULL;
@@ -310,9 +310,12 @@ test_suspend_resume_edid_change(data_t *data, struct chamelium_port *port,
int alt_edid_id)
{
struct udev_monitor *mon = igt_watch_hotplug();
+ int delay = chamelium_get_suspend_resume_delay(data->chamelium);
reset_state(data, port);
+ igt_set_autoresume_delay(delay);
+
/* First plug in the port */
chamelium_port_set_edid(data->chamelium, port, edid_id);
chamelium_plug(data->chamelium, port);
--
2.13.1
More information about the Intel-gfx
mailing list