On Mon, 2017-06-26 at 17:07 -0400, Lyude Paul wrote: > This all looks great! I'm happy to see us finally getting rid of the > very hacky workaround I had to make async hotplugging work (to be fair, > it was only partly broken ;). Thanks for dealing with chameleond > upstream too, I couldn't stand how ugly the code in that thing is... Sure, my pleasure :) > Anyway, this whole patchset looks good. The only thing I ask is that > you condense the patches a bit, mainly: > > 1-3 can all be one patch for adding real async HPD > 4-5 can be another single patch for enabling VGA tests Okay then, I will prepare v2 that way (and rebased on top of current master). Thanks for the review! > On Mon, 2017-06-26 at 10:22 +0300, Paul Kocialkowski wrote: > > 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@xxxxxxxxxxxxxxx> > > --- > > 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); -- Paul Kocialkowski <paul.kocialkowski@xxxxxxxxxxxxxxx> Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx