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

Lyude Paul lyude at redhat.com
Mon Jul 6 17:26:41 UTC 2020


Reviewed-by: Lyude Paul <lyude at redhat.com>

On Fri, 2020-07-03 at 10:33 +0530, Kunal Joshi wrote:
> From: Imre Deak <imre.deak at intel.com>
> 
> 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.
> 
> Signed-off-by: Imre Deak <imre.deak at intel.com>
> Tested-by: Kunal Joshi <kunal1.joshi at intel.com>
> ---
>  lib/igt_chamelium.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
> index 58e01ab7..e8ead97a 100644
> --- a/lib/igt_chamelium.c
> +++ b/lib/igt_chamelium.c
> @@ -2538,6 +2538,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++) {



More information about the igt-dev mailing list