[PATCH v3 3/6] drm/connector: use drm_sysfs_connector_hotplug_event

Pekka Paalanen ppaalanen at gmail.com
Wed Oct 27 13:15:14 UTC 2021


On Fri, 15 Oct 2021 16:33:43 +0000
Simon Ser <contact at emersion.fr> wrote:

> In drm_connector_register, use drm_sysfs_connector_hotplug_event
> instead of drm_sysfs_hotplug_event, because the hotplug event
> only updates a single connector.
> 
> Signed-off-by: Simon Ser <contact at emersion.fr>
> ---
>  drivers/gpu/drm/drm_connector.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index ec3973e8963c..a50c82bc2b2f 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -547,7 +547,7 @@ int drm_connector_register(struct drm_connector *connector)
>  	connector->registration_state = DRM_CONNECTOR_REGISTERED;
>  
>  	/* Let userspace know we have a new connector */
> -	drm_sysfs_hotplug_event(connector->dev);
> +	drm_sysfs_connector_hotplug_event(connector);
>  
>  	if (connector->privacy_screen)
>  		drm_privacy_screen_register_notifier(connector->privacy_screen,

Hi Simon,

this might not work for Weston if I understand this right. Kernel is
adding a new connector, which means userspace does not recognise the
connector id in the uevent. Weston as it is right now would ignore the
event rather than add the connector.

The missing piece is for Weston to revert to the old fashioned "recheck
everything" behaviour when hotplug uevent carries anything
unrecognised. Grep for drm_backend_update_conn_props if you want to see
for yourself.

However, I wouldn't NAK this patch just for Weston, but I wonder if
other software would ignore events because of this as well.

A whole another question is, would anyone notice. I guess this can only
be an issue with MST.

All the other changes in this series look fine to me, so them I can give
Acked-by: Pekka Paalanen <pekka.paalanen at collabora.com>


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20211027/cb6c3eb6/attachment-0001.sig>


More information about the dri-devel mailing list