diff options
author | Paul Kocialkowki <paul.kocialkowski@linux.intel.com> | 2017-06-27 13:53:06 +0300 |
---|---|---|
committer | Lyude <lyude@redhat.com> | 2017-06-27 17:13:36 -0400 |
commit | fa8b6ee5e5547e2d757ad4f7da33ec46cab0703c (patch) | |
tree | aa6efcc3f4ba58e3db400e9246e937543c55be12 /tests/chamelium.c | |
parent | d1b08a89edeab5df3c1ca10cb74a5b527fee84d3 (diff) |
chamelium: Add support for HPD toggle scheduling instead of async pulses
This adds support for the newly-introduced ScheduleHpdToggle XMLRPC
method of the Chamelium's interface and makes use of it 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.
This is especially useful for testing HPD during suspend/resume.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'tests/chamelium.c')
-rw-r--r-- | tests/chamelium.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/chamelium.c b/tests/chamelium.c index f1addb0f..04e7e379 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) { |