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

Petri Latvala petri.latvala at intel.com
Thu Oct 20 09:09:46 UTC 2022


On Wed, Oct 19, 2022 at 01:42:17PM -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>

Reviewed-by: Petri Latvala <petri.latvala at intel.com>

> ---
>  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));
> -- 
> 2.38.0.413.g74048e4d9e-goog
> 


More information about the igt-dev mailing list