summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2020-07-07 16:18:14 +0300
committerImre Deak <imre.deak@intel.com>2020-07-08 13:01:29 +0300
commit6988eebf78e9ce9746b8c2b7d21cb4174d6623a9 (patch)
tree0142193bd645edfc0cc2d4ad2f89e28a41937f26 /lib
parent48ad53e29fd49ec685f07242e6021b29e1d9a5d2 (diff)
lib/igt_chamelium: Wait for connectors after replugging them at exit
Making sure all the plugged chamelium ports are connected at exit So the FB console restore modeset doesn't happen on a disconnected output, resulting in link training failures. Cc: Kunal Joshi <kunal1.joshi@intel.com> Cc: Lyude Paul <lyude@redhat.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Tested-by: Kunal Joshi <kunal1.joshi@intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Kunal Joshi <kunal1.joshi@intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_chamelium.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
index 90a2d04bb..d9fab902d 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -2541,6 +2541,11 @@ void chamelium_deinit(struct chamelium *chamelium)
for (i = 0; i < chamelium->port_count; i++)
chamelium_plug(chamelium, &chamelium->ports[i]);
+ igt_assert(chamelium->drm_fd != -1);
+ for (i = 0; i < chamelium->port_count; i++)
+ wait_for_connected_state(chamelium->drm_fd,
+ &chamelium->ports[i].connector_id, 1);
+
/* Destroy any EDIDs we created to make sure we don't leak them */
igt_list_for_each_entry_safe(pos, tmp, &chamelium->edids, link) {
for (i = 0; i < CHAMELIUM_MAX_PORTS; i++) {