intel-gfx.lists.freedesktop.org archive mirror
 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 2/5] tests/chamelium: Use HPD toggle scheduling instead of async pulses
Date: Mon, 26 Jun 2017 10:22:16 +0300	[thread overview]
Message-ID: <20170626072219.2470-2-paul.kocialkowski@linux.intel.com> (raw)
In-Reply-To: <20170626072219.2470-1-paul.kocialkowski@linux.intel.com>

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@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

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

  reply	other threads:[~2017-06-26  7:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-26  7:22 [PATCH i-g-t 1/5] lib/igt_chamelium: Add support for HPD toggle scheduling Paul Kocialkowski
2017-06-26  7:22 ` Paul Kocialkowski [this message]
2017-06-26  7:22 ` [PATCH i-g-t 3/5] lib/igt_chamelium: Get rid of async hpd pulse functions Paul Kocialkowski
2017-06-26  7:22 ` [PATCH i-g-t 4/5] tests/chamelium: Test HPD toggle after suspend and hibernate for VGA Paul Kocialkowski
2017-06-26  7:22 ` [PATCH i-g-t 5/5] tests/chamelium: Also test VGA for common suspend and hibernate tests Paul Kocialkowski
2017-06-26 21:07 ` [PATCH i-g-t 1/5] lib/igt_chamelium: Add support for HPD toggle scheduling Lyude Paul
2017-06-27  7:25   ` Paul Kocialkowski

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=20170626072219.2470-2-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).