Re: [PATCH RESEND v2 31/32] drm/vkms: Allow to hot-add connectors

Luca Ceresoli
2025-12-19T20:47:50Z

On Wed Oct 29, 2025 at 3:37 PM CET, Louis Chauvet wrote:
> In order to allow creating dynamic connector, add the required
> infrastructure in vkms_connector.
>
> Co-developed-by: José Expósito <jose.exposito89@gmail.com>
> Signed-off-by: José Expósito <jose.exposito89@gmail.com>
> [Louis Chauvet: use drm_atomic_helper_connector_reset instead of
> drm_mode_config_reset because connector is not yet registered]
> Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>

> --- a/drivers/gpu/drm/vkms/vkms_connector.h
> +++ b/drivers/gpu/drm/vkms/vkms_connector.h
> @@ -34,4 +34,36 @@ struct vkms_connector *vkms_connector_init_static(struct vkms_device *vkmsdev,
> */
> void vkms_trigger_connector_hotplug(struct vkms_device *vkmsdev);
>
> +/**
> + * vkms_connector_hot_add() - Create a connector after the device is created
> + * @vkmsdev: Device to hot-add the connector to
> + * @connector_cfg: Connector's configuration
> + *
> + * Returns:
> + * The connector or an error on failure.

"A pointer to the newly created connector or a PTR_ERR on failure."

> + */
> +struct vkms_connector *vkms_connector_hot_add(struct vkms_device *vkmsdev,
> + struct vkms_config_connector *connector_cfg);
> +
> +/**
> + * vkms_connector_hot_remove() - Remove a connector after a device is created

Missing kdoc for @vkmsdev:

@vkmsdev: Device to containing the connector to be removed

> + * @connector: The connector to hot-remove
> + */
> +void vkms_connector_hot_remove(struct vkms_device *vkmsdev,
> + struct vkms_connector *connector);

With these changes:

Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering