[Intel-gfx] [PATCH i-g-t 2/5] tests/chamelium: Use HPD toggle scheduling instead of async pulses
Paul Kocialkowski
paul.kocialkowski at linux.intel.com
Mon Jun 26 07:22:16 UTC 2017
This switches over to HPD toggle scheduling instead of starting pulses
with an asynchronous call, suspending and dealing with the result at
resume.
The XMLRPC library does not guarantee that the call will be made before
caring for its outcome and this is in fact what was happening:
the call was being delayed until resume time, as can be seen from the
Chamelium's logs. The quite generous timeout for HPD event detection
would then catch the toggle, that was sent after resume.
Thus, HPD toggle during suspend was not properly tested before and this
changes fixes that.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski at linux.intel.com>
---
tests/chamelium.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/tests/chamelium.c b/tests/chamelium.c
index 3cf9f3b5..c7114987 100644
--- a/tests/chamelium.c
+++ b/tests/chamelium.c
@@ -226,25 +226,24 @@ try_suspend_resume_hpd(data_t *data, struct chamelium_port *port,
igt_flush_hotplugs(mon);
if (port) {
- chamelium_async_hpd_pulse_start(data->chamelium, port,
- connected,
- SUSPEND_RESUME_DELAY / 2);
+ chamelium_schedule_hpd_toggle(data->chamelium, port,
+ SUSPEND_RESUME_DELAY * 1000 / 2,
+ !connected);
} else {
for (p = 0; p < data->port_count; p++) {
port = data->ports[p];
if (chamelium_port_get_type(port) == DRM_MODE_CONNECTOR_VGA)
continue;
- chamelium_async_hpd_pulse_start(data->chamelium, port,
- connected,
- SUSPEND_RESUME_DELAY / 2);
+ chamelium_schedule_hpd_toggle(data->chamelium, port,
+ SUSPEND_RESUME_DELAY * 1000 / 2,
+ !connected);
}
port = NULL;
}
igt_system_suspend_autoresume(state, test);
- chamelium_async_hpd_pulse_finish(data->chamelium);
igt_assert(igt_hotplug_detected(mon, HOTPLUG_TIMEOUT));
if (port) {
--
2.13.1
More information about the Intel-gfx
mailing list