From: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Lyude <lyude@redhat.com>
Subject: [PATCH i-g-t 1/5] lib/igt_chamelium: Add support for HPD toggle scheduling
Date: Mon, 26 Jun 2017 10:22:15 +0300 [thread overview]
Message-ID: <20170626072219.2470-1-paul.kocialkowski@linux.intel.com> (raw)
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
next reply other threads:[~2017-06-26 7:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-26 7:22 Paul Kocialkowski [this message]
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
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-1-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).