intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH i-g-t 1/5] lib/igt_chamelium: Add support for HPD toggle scheduling
@ 2017-06-26  7:22 Paul Kocialkowski
  2017-06-26  7:22 ` [PATCH i-g-t 2/5] tests/chamelium: Use HPD toggle scheduling instead of async pulses Paul Kocialkowski
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Paul Kocialkowski @ 2017-06-26  7:22 UTC (permalink / raw)
  To: intel-gfx; +Cc: Lyude

This adds support for the newly-introduced ScheduleHpdToggle XMLRPC
method of the Chamelium's interface. It allows scheduling an HPD toggle,
for which the call will return immediately.

This is especially useful for testing HPD during suspend/resume.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
---
 lib/igt_chamelium.c | 22 ++++++++++++++++++++++
 lib/igt_chamelium.h |  3 +++
 2 files changed, 25 insertions(+)

diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
index 4a2af796..523cc853 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -447,6 +447,28 @@ void chamelium_fire_mixed_hpd_pulses(struct chamelium *chamelium,
 	xmlrpc_DECREF(pulse_widths);
 }
 
+/**
+ * chamelium_schedule_hpd_toggle:
+ * @chamelium: The Chamelium instance to use
+ * @port: The port to fire the HPD pulses on
+ * @delay_ms: Delay in milli-second before the toggle takes place
+ * @rising_edge: Whether the toggle should be a rising edge or a falling edge
+ *
+ * Instructs the chamelium to schedule an hpd toggle (either a rising edge or
+ * a falling edge, depending on @rising_edg) after @delay_ms have passed.
+ * This is useful for testing things such as hpd after a suspend/resume cycle.
+ */
+void chamelium_schedule_hpd_toggle(struct chamelium *chamelium,
+				   struct chamelium_port *port, int delay_ms,
+				   bool rising_edge)
+{
+	igt_debug("Scheduling HPD toggle on %s in %d ms\n", port->name,
+		  delay_ms);
+
+	xmlrpc_DECREF(chamelium_rpc(chamelium, NULL, "ScheduleHpdToggle",
+				    "(iii)", port->id, delay_ms, rising_edge));
+}
+
 static void async_rpc_handler(const char *server_url, const char *method_name,
 			      xmlrpc_value *param_array, void *user_data,
 			      xmlrpc_env *fault, xmlrpc_value *result)
diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
index 15f60246..408a4b85 100644
--- a/lib/igt_chamelium.h
+++ b/lib/igt_chamelium.h
@@ -61,6 +61,9 @@ void chamelium_fire_mixed_hpd_pulses(struct chamelium *chamelium,
 void chamelium_fire_hpd_pulses(struct chamelium *chamelium,
 			       struct chamelium_port *port,
 			       int width_msec, int count);
+void chamelium_schedule_hpd_toggle(struct chamelium *chamelium,
+				   struct chamelium_port *port, int delay_ms,
+				   bool rising_edge);
 void chamelium_async_hpd_pulse_start(struct chamelium *chamelium,
 				     struct chamelium_port *port,
 				     bool high, int delay_secs);
-- 
2.13.1

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-06-27  7:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH i-g-t 2/5] tests/chamelium: Use HPD toggle scheduling instead of async pulses Paul Kocialkowski
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

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).