[igt-dev] [PATCH] chamelium: Get connector After plug to get EDID

Lyude Paul lyude at redhat.com
Fri Oct 21 21:07:47 UTC 2022


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

On Wed, 2022-10-19 at 13:42 -0400, Mark Yacoub wrote:
> [Why]
> MST connectors can change connector IDs between plugs. Getting the EDID
> prop requires a valid connector ID.
> 
> [How]
> Get Connector AFTER a plug, just before it's being used.
> 
> Fixes: kms_chamelium at dp-edid-read
> 
> Signed-off-by: Mark Yacoub <markyacoub at chromium.org>
> ---
>  tests/chamelium/kms_chamelium.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/chamelium/kms_chamelium.c b/tests/chamelium/kms_chamelium.c
> index 870edb91..99cc23a1 100644
> --- a/tests/chamelium/kms_chamelium.c
> +++ b/tests/chamelium/kms_chamelium.c
> @@ -447,8 +447,7 @@ static void
>  igt_custom_edid_type_read(data_t *data, struct chamelium_port *port, enum igt_custom_edid_type edid)
>  {
>  	drmModePropertyBlobPtr edid_blob = NULL;
> -	drmModeConnector *connector = chamelium_port_get_connector(
> -	    data->chamelium, port, false);
> +	drmModeConnector *connector;
>  	size_t raw_edid_size;
>  	const struct edid *raw_edid;
>  	uint64_t edid_blob_id;
> @@ -464,6 +463,7 @@ igt_custom_edid_type_read(data_t *data, struct chamelium_port *port, enum igt_cu
>  
>  	igt_skip_on(check_analog_bridge(data, port));
>  
> +	connector = chamelium_port_get_connector(data->chamelium, port, true);
>  	igt_assert(kmstest_get_property(data->drm_fd, connector->connector_id,
>  					DRM_MODE_OBJECT_CONNECTOR, "EDID", NULL,
>  					&edid_blob_id, NULL));

-- 
Cheers,
 Lyude Paul (she/her)
 Software Engineer at Red Hat



More information about the igt-dev mailing list