[igt-dev] [PATCH i-g-t 3/3] lib/igt_chamelium: Wait for connectors after replugging them at exit

Imre Deak imre.deak at intel.com
Tue Jul 7 13:18:14 UTC 2020


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 at intel.com>
Cc: Lyude Paul <lyude at redhat.com>
Signed-off-by: Imre Deak <imre.deak at intel.com>
Tested-by: Kunal Joshi <kunal1.joshi at intel.com>
Reviewed-by: Lyude Paul <lyude at redhat.com>
---
 lib/igt_chamelium.c | 5 +++++
 1 file changed, 5 insertions(+)

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++) {
-- 
2.23.1



More information about the igt-dev mailing list