dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] Pass down hot plug CONNECTOR ID to user-space
@ 2025-11-03 17:45 Marius Vlad
  2025-11-03 17:45 ` [PATCH v4 1/3] drm: Introduce a new connector status Marius Vlad
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Marius Vlad @ 2025-11-03 17:45 UTC (permalink / raw)
  To: dri-devel
  Cc: dmitry.baryshkov, tzimmermann, simona.vetter, jani.nikula,
	ian.forbes, louis.chauvet, daniel.stone

Patch series addresses a shortcoming where we're sending a hot plug event
without passing the actual CONNECTOR that caused it. This takes into
consideration both the polling path and the HPD (Hot Plug Detect) path.

v4:

- removed the "This patch" bit - Dmitry
- added a short note when the flag is set and cleared - Dmitry
- address double dead-locking detected - kbot: https://lore.kernel.org/dri-devel/202509251410.fdfbcac3-lkp@intel.com/
- virtual connectors do not seem have any kind of hotplug - added
  polling in vkms - as noted by Ian

v3: Address comments from Dmitry

- guard connector status write with mode_config.mutex
- avoid setting up the connector status and immediately unset it. Do the
  unset in drm_kms_helper_hotplug_event/drm_kms_helper_connector_hotplug_event
- v3 is at https://lore.kernel.org/dri-devel/20250923083636.4749-1-marius.vlad@collabora.com/

v2: Address comments from Daniel

- split patch into 2, one that introduces a bool to track connector
  connection status change and a patch that uses that to be able to send
  hot plug events with the proper CONNECTOR ID to udev and further pass
  that down to user-space
- nuke out mutex when iterating connector list
- fix typo
- v2 is at https://lore.kernel.org/dri-devel/20250729165708.9947-1-marius.vlad@collabora.com/


Marius Vlad (3):
  drm: Introduce a new connector status
  drm: Propagate connector status change
  drm/vkms: Add polling for HPD

 drivers/gpu/drm/drm_connector.c    |  1 +
 drivers/gpu/drm/drm_probe_helper.c | 39 ++++++++++++++++++++++++++----
 drivers/gpu/drm/drm_sysfs.c        |  1 +
 drivers/gpu/drm/vkms/vkms_drv.c    |  4 +++
 include/drm/drm_connector.h        |  3 +++
 5 files changed, 43 insertions(+), 5 deletions(-)

-- 
2.47.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v4 1/3] drm: Introduce a new connector status
  2025-11-03 17:45 [PATCH v4 0/3] Pass down hot plug CONNECTOR ID to user-space Marius Vlad
@ 2025-11-03 17:45 ` Marius Vlad
  2025-11-03 17:45 ` [PATCH v4 2/3] drm: Propagate connector status change Marius Vlad
  2025-11-03 17:45 ` [PATCH v4 3/3] drm/vkms: Add polling for HPD Marius Vlad
  2 siblings, 0 replies; 7+ messages in thread
From: Marius Vlad @ 2025-11-03 17:45 UTC (permalink / raw)
  To: dri-devel
  Cc: dmitry.baryshkov, tzimmermann, simona.vetter, jani.nikula,
	ian.forbes, louis.chauvet, daniel.stone

Introduce a new boolean variable used to track connector's
connect/disconnect status and it is being used on both polling and the
HPD (Hot Plug Detect) paths.

A subsequent change would make use of this connector status to propagate
per-connector udev hotplug events.

The connector status is set in the drm_connector_funcs.fill_modes and
cleared out when firing out KMS uevents.

Allows user-space to receive the connector's ID, rather than having a
generic hot-plug event for all connectors, or in the HPD path, just the
first one found with a connection status change.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
---
 drivers/gpu/drm/drm_connector.c    |  1 +
 drivers/gpu/drm/drm_probe_helper.c | 17 +++++++++++++++++
 drivers/gpu/drm/drm_sysfs.c        |  1 +
 include/drm/drm_connector.h        |  3 +++
 4 files changed, 22 insertions(+)

diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 272d6254ea47..3c6628ee3096 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -274,6 +274,7 @@ static int drm_connector_init_only(struct drm_device *dev,
 
 	/* provide ddc symlink in sysfs */
 	connector->ddc = ddc;
+	connector->status_changed = false;
 
 	INIT_LIST_HEAD(&connector->head);
 	INIT_LIST_HEAD(&connector->global_connector_list_entry);
diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index 09b12c30df69..f0474368e98d 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -629,6 +629,8 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
 			mod_delayed_work(system_wq,
 					 &dev->mode_config.output_poll_work,
 					 0);
+
+		connector->status_changed = true;
 	}
 
 	/*
@@ -732,6 +734,17 @@ EXPORT_SYMBOL(drm_helper_probe_single_connector_modes);
  */
 void drm_kms_helper_hotplug_event(struct drm_device *dev)
 {
+	struct drm_connector *connector;
+	struct drm_connector_list_iter conn_iter;
+
+	mutex_lock(&dev->mode_config.mutex);
+	drm_connector_list_iter_begin(dev, &conn_iter);
+	drm_for_each_connector_iter(connector, &conn_iter) {
+		connector->status_changed = false;
+	}
+	drm_connector_list_iter_end(&conn_iter);
+	mutex_unlock(&dev->mode_config.mutex);
+
 	drm_sysfs_hotplug_event(dev);
 	drm_client_dev_hotplug(dev);
 }
@@ -748,6 +761,10 @@ void drm_kms_helper_connector_hotplug_event(struct drm_connector *connector)
 {
 	struct drm_device *dev = connector->dev;
 
+	mutex_lock(&dev->mode_config.mutex);
+	connector->status_changed = false;
+	mutex_unlock(&dev->mode_config.mutex);
+
 	drm_sysfs_connector_hotplug_event(connector);
 	drm_client_dev_hotplug(dev);
 }
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index b01ffa4d6509..bd9161490116 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -199,6 +199,7 @@ static ssize_t status_store(struct device *device,
 		return ret;
 
 	old_force = connector->force;
+	connector->status_changed = true;
 
 	if (sysfs_streq(buf, "detect"))
 		connector->force = 0;
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 8f34f4b8183d..e4310df3d55c 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -2146,6 +2146,9 @@ struct drm_connector {
 	/** @force: a DRM_FORCE_<foo> state for forced mode sets */
 	enum drm_connector_force force;
 
+	/** @status_changed: if the old status doesn't match current connection status */
+	bool status_changed;
+
 	/**
 	 * @edid_override: Override EDID set via debugfs.
 	 *
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v4 2/3] drm: Propagate connector status change
  2025-11-03 17:45 [PATCH v4 0/3] Pass down hot plug CONNECTOR ID to user-space Marius Vlad
  2025-11-03 17:45 ` [PATCH v4 1/3] drm: Introduce a new connector status Marius Vlad
@ 2025-11-03 17:45 ` Marius Vlad
  2025-11-03 17:45 ` [PATCH v4 3/3] drm/vkms: Add polling for HPD Marius Vlad
  2 siblings, 0 replies; 7+ messages in thread
From: Marius Vlad @ 2025-11-03 17:45 UTC (permalink / raw)
  To: dri-devel
  Cc: dmitry.baryshkov, tzimmermann, simona.vetter, jani.nikula,
	ian.forbes, louis.chauvet, daniel.stone

On the HPD (Hot Plug Detect) path this change makes use of the connector
status to notify all connectors, rather than just first one found that
suffered a status change.

Similarly on the polling side, this also takes into consideration
sending per-connector udev hotplug events.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
---
 drivers/gpu/drm/drm_probe_helper.c | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index f0474368e98d..63960f589b6b 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -861,8 +861,14 @@ static void output_poll_execute(struct work_struct *work)
 	mutex_unlock(&dev->mode_config.mutex);
 
 out:
-	if (changed)
-		drm_kms_helper_hotplug_event(dev);
+	if (changed) {
+		drm_connector_list_iter_begin(dev, &conn_iter);
+		drm_for_each_connector_iter(connector, &conn_iter) {
+			if (connector->status_changed)
+				drm_kms_helper_connector_hotplug_event(connector);
+		}
+		drm_connector_list_iter_end(&conn_iter);
+	}
 
 	if (repoll)
 		schedule_delayed_work(delayed_work, DRM_OUTPUT_POLL_PERIOD);
@@ -1124,10 +1130,16 @@ bool drm_helper_hpd_irq_event(struct drm_device *dev)
 	drm_connector_list_iter_end(&conn_iter);
 	mutex_unlock(&dev->mode_config.mutex);
 
-	if (changed == 1)
+	if (changed == 1) {
 		drm_kms_helper_connector_hotplug_event(first_changed_connector);
-	else if (changed > 0)
-		drm_kms_helper_hotplug_event(dev);
+	} else if (changed > 0) {
+		drm_connector_list_iter_begin(dev, &conn_iter);
+		drm_for_each_connector_iter(connector, &conn_iter) {
+			if (connector->status_changed)
+				drm_kms_helper_connector_hotplug_event(connector);
+		}
+		drm_connector_list_iter_end(&conn_iter);
+	}
 
 	if (first_changed_connector)
 		drm_connector_put(first_changed_connector);
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v4 3/3] drm/vkms: Add polling for HPD
  2025-11-03 17:45 [PATCH v4 0/3] Pass down hot plug CONNECTOR ID to user-space Marius Vlad
  2025-11-03 17:45 ` [PATCH v4 1/3] drm: Introduce a new connector status Marius Vlad
  2025-11-03 17:45 ` [PATCH v4 2/3] drm: Propagate connector status change Marius Vlad
@ 2025-11-03 17:45 ` Marius Vlad
  2025-11-04 10:21   ` Louis Chauvet
  2 siblings, 1 reply; 7+ messages in thread
From: Marius Vlad @ 2025-11-03 17:45 UTC (permalink / raw)
  To: dri-devel
  Cc: dmitry.baryshkov, tzimmermann, simona.vetter, jani.nikula,
	ian.forbes, louis.chauvet, daniel.stone

vkms is missing any kind of HPD (polling/irq), so add polling to handle
hotplug events.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
---
 drivers/gpu/drm/vkms/vkms_drv.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c
index e8472d9b6e3b..ec815c42ef04 100644
--- a/drivers/gpu/drm/vkms/vkms_drv.c
+++ b/drivers/gpu/drm/vkms/vkms_drv.c
@@ -198,6 +198,9 @@ static int vkms_create(struct vkms_config *config)
 	if (ret)
 		goto out_devres;
 
+	/* init kms poll for handling hpd */
+	drm_kms_helper_poll_init(&vkms_device->drm);
+
 	drm_client_setup(&vkms_device->drm, NULL);
 
 	return 0;
@@ -240,6 +243,7 @@ static void vkms_destroy(struct vkms_config *config)
 
 	fdev = config->dev->faux_dev;
 
+	drm_kms_helper_poll_fini(&config->dev->drm);
 	drm_dev_unregister(&config->dev->drm);
 	drm_atomic_helper_shutdown(&config->dev->drm);
 	devres_release_group(&fdev->dev, NULL);
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v4 3/3] drm/vkms: Add polling for HPD
  2025-11-03 17:45 ` [PATCH v4 3/3] drm/vkms: Add polling for HPD Marius Vlad
@ 2025-11-04 10:21   ` Louis Chauvet
  2025-11-04 14:19     ` Marius Vlad
  0 siblings, 1 reply; 7+ messages in thread
From: Louis Chauvet @ 2025-11-04 10:21 UTC (permalink / raw)
  To: Marius Vlad, dri-devel
  Cc: dmitry.baryshkov, tzimmermann, simona.vetter, jani.nikula,
	ian.forbes, daniel.stone



Le 03/11/2025 à 18:45, Marius Vlad a écrit :
> vkms is missing any kind of HPD (polling/irq), so add polling to handle
> hotplug events.

Hi,

I am a bit surprised by this addition, we currently have hotplug/unplug 
in VKMS using configFS, and it seems to work. The current "irq" system 
is writing in configFS the status and call drm_kms_helper_hotplug_event 
after the status is updated [1].

I think the polling will not work, I read in the 
drm_kms_helper_poll_init documentation that the connector is not polled 
if some connector flags are not set [2]/[3].

If the polling works, I don't think it will be enough for the current 
VKMS implementation. Currently setting status using configFS will do 
everything synchronously:
- Set the connector status (next call to connector->detect will have the 
new value)
- Call drm_kms_helper_hotplug_event

With your implementation, I think you expect something to update 
connector->status_changed in between, using polling if I understood 
correctly, which will probably happen after the call to 
drm_kms_helper_hotplug_event.

[1]:https://gitlab.freedesktop.org/drm/misc/kernel/-/blob/drm-misc-next/drivers/gpu/drm/vkms/vkms_connector.c?ref_type=heads#L91-96
[2]:https://elixir.bootlin.com/linux/v6.17.7/source/drivers/gpu/drm/drm_probe_helper.c#L917-L918
[3]:https://elixir.bootlin.com/linux/v6.17.7/source/drivers/gpu/drm/drm_probe_helper.c#L793

> Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
> ---
>   drivers/gpu/drm/vkms/vkms_drv.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c
> index e8472d9b6e3b..ec815c42ef04 100644
> --- a/drivers/gpu/drm/vkms/vkms_drv.c
> +++ b/drivers/gpu/drm/vkms/vkms_drv.c
> @@ -198,6 +198,9 @@ static int vkms_create(struct vkms_config *config)
>   	if (ret)
>   		goto out_devres;
>   
> +	/* init kms poll for handling hpd */
> +	drm_kms_helper_poll_init(&vkms_device->drm);
> +
>   	drm_client_setup(&vkms_device->drm, NULL);
>   
>   	return 0;
> @@ -240,6 +243,7 @@ static void vkms_destroy(struct vkms_config *config)
>   
>   	fdev = config->dev->faux_dev;
>   
> +	drm_kms_helper_poll_fini(&config->dev->drm);
>   	drm_dev_unregister(&config->dev->drm);
>   	drm_atomic_helper_shutdown(&config->dev->drm);
>   	devres_release_group(&fdev->dev, NULL);

-- 
--
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v4 3/3] drm/vkms: Add polling for HPD
  2025-11-04 10:21   ` Louis Chauvet
@ 2025-11-04 14:19     ` Marius Vlad
  2025-11-06  9:02       ` Louis Chauvet
  0 siblings, 1 reply; 7+ messages in thread
From: Marius Vlad @ 2025-11-04 14:19 UTC (permalink / raw)
  To: Louis Chauvet
  Cc: dri-devel, dmitry.baryshkov, tzimmermann, simona.vetter,
	jani.nikula, ian.forbes, daniel.stone

[-- Attachment #1: Type: text/plain, Size: 3376 bytes --]

On Tue, Nov 04, 2025 at 11:21:28AM +0100, Louis Chauvet wrote:
> 
> 
> Le 03/11/2025 à 18:45, Marius Vlad a écrit :
> > vkms is missing any kind of HPD (polling/irq), so add polling to handle
> > hotplug events.
> 
> Hi,
Hi Louis, thanks for the quick reply!
> 
> I am a bit surprised by this addition, we currently have hotplug/unplug in
> VKMS using configFS, and it seems to work. The current "irq" system is
> writing in configFS the status and call drm_kms_helper_hotplug_event after
> the status is updated [1].
The situation is that the VKMS connectors/card are also being exposed
through sysfs similar to real devices. That's where we trigger/simulate
a connector hot-plug without physically unplugging cables. Wasn't aware
that VKMS had something similar to that with ConfigFS, so that needs
adjusting.
> 
> I think the polling will not work, I read in the drm_kms_helper_poll_init
> documentation that the connector is not polled if some connector flags are
> not set [2]/[3].
In this case the loop will be no-op, but prior to the loop
`changed` is set to `changed = dev->mode_config.delayed_event` [1] so
the code at [2] will do run.
> 
> If the polling works, I don't think it will be enough for the current VKMS
> implementation. Currently setting status using configFS will do everything
> synchronously:
> - Set the connector status (next call to connector->detect will have the new
> value)
> - Call drm_kms_helper_hotplug_event
> 
> With your implementation, I think you expect something to update
> connector->status_changed in between, using polling if I understood
> correctly, which will probably happen after the call to
> drm_kms_helper_hotplug_event.
Right, that's another path for VKMS.

[1] https://elixir.bootlin.com/linux/v6.17.7/source/drivers/gpu/drm/drm_probe_helper.c#L769
[2] https://elixir.bootlin.com/linux/v6.17.7/source/drivers/gpu/drm/drm_probe_helper.c#L846

> 
> [1]:https://gitlab.freedesktop.org/drm/misc/kernel/-/blob/drm-misc-next/drivers/gpu/drm/vkms/vkms_connector.c?ref_type=heads#L91-96
> [2]:https://elixir.bootlin.com/linux/v6.17.7/source/drivers/gpu/drm/drm_probe_helper.c#L917-L918
> [3]:https://elixir.bootlin.com/linux/v6.17.7/source/drivers/gpu/drm/drm_probe_helper.c#L793
> 
> > Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
> > ---
> >   drivers/gpu/drm/vkms/vkms_drv.c | 4 ++++
> >   1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c
> > index e8472d9b6e3b..ec815c42ef04 100644
> > --- a/drivers/gpu/drm/vkms/vkms_drv.c
> > +++ b/drivers/gpu/drm/vkms/vkms_drv.c
> > @@ -198,6 +198,9 @@ static int vkms_create(struct vkms_config *config)
> >   	if (ret)
> >   		goto out_devres;
> > +	/* init kms poll for handling hpd */
> > +	drm_kms_helper_poll_init(&vkms_device->drm);
> > +
> >   	drm_client_setup(&vkms_device->drm, NULL);
> >   	return 0;
> > @@ -240,6 +243,7 @@ static void vkms_destroy(struct vkms_config *config)
> >   	fdev = config->dev->faux_dev;
> > +	drm_kms_helper_poll_fini(&config->dev->drm);
> >   	drm_dev_unregister(&config->dev->drm);
> >   	drm_atomic_helper_shutdown(&config->dev->drm);
> >   	devres_release_group(&fdev->dev, NULL);
> 
> -- 
> --
> Louis Chauvet, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v4 3/3] drm/vkms: Add polling for HPD
  2025-11-04 14:19     ` Marius Vlad
@ 2025-11-06  9:02       ` Louis Chauvet
  0 siblings, 0 replies; 7+ messages in thread
From: Louis Chauvet @ 2025-11-06  9:02 UTC (permalink / raw)
  To: Marius Vlad
  Cc: dri-devel, dmitry.baryshkov, tzimmermann, simona.vetter,
	jani.nikula, ian.forbes, daniel.stone



Le 04/11/2025 à 15:19, Marius Vlad a écrit :
> On Tue, Nov 04, 2025 at 11:21:28AM +0100, Louis Chauvet wrote:
>>
>>
>> Le 03/11/2025 à 18:45, Marius Vlad a écrit :
>>> vkms is missing any kind of HPD (polling/irq), so add polling to handle
>>> hotplug events.
>>
>> Hi,
> Hi Louis, thanks for the quick reply!
>>
>> I am a bit surprised by this addition, we currently have hotplug/unplug in
>> VKMS using configFS, and it seems to work. The current "irq" system is
>> writing in configFS the status and call drm_kms_helper_hotplug_event after
>> the status is updated [1].
> The situation is that the VKMS connectors/card are also being exposed
> through sysfs similar to real devices. That's where we trigger/simulate
> a connector hot-plug without physically unplugging cables. Wasn't aware
> that VKMS had something similar to that with ConfigFS, so that needs
> adjusting.

Yes, that very recent, I am not surprised that you missed it.

>> I think the polling will not work, I read in the drm_kms_helper_poll_init
>> documentation that the connector is not polled if some connector flags are
>> not set [2]/[3].
> In this case the loop will be no-op, but prior to the loop
> `changed` is set to `changed = dev->mode_config.delayed_event` [1] so
> the code at [2] will do run.

Ho, make sense, thanks for the explanation!

>>
>> If the polling works, I don't think it will be enough for the current VKMS
>> implementation. Currently setting status using configFS will do everything
>> synchronously:
>> - Set the connector status (next call to connector->detect will have the new
>> value)
>> - Call drm_kms_helper_hotplug_event
>>
>> With your implementation, I think you expect something to update
>> connector->status_changed in between, using polling if I understood
>> correctly, which will probably happen after the call to
>> drm_kms_helper_hotplug_event.
> Right, that's another path for VKMS.

Let me know if you have any question about the current implementation, I 
can help if needed.

> [1] https://elixir.bootlin.com/linux/v6.17.7/source/drivers/gpu/drm/drm_probe_helper.c#L769
> [2] https://elixir.bootlin.com/linux/v6.17.7/source/drivers/gpu/drm/drm_probe_helper.c#L846
> 
>>
>> [1]:https://gitlab.freedesktop.org/drm/misc/kernel/-/blob/drm-misc-next/drivers/gpu/drm/vkms/vkms_connector.c?ref_type=heads#L91-96
>> [2]:https://elixir.bootlin.com/linux/v6.17.7/source/drivers/gpu/drm/drm_probe_helper.c#L917-L918
>> [3]:https://elixir.bootlin.com/linux/v6.17.7/source/drivers/gpu/drm/drm_probe_helper.c#L793
>>
>>> Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
>>> ---
>>>    drivers/gpu/drm/vkms/vkms_drv.c | 4 ++++
>>>    1 file changed, 4 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c
>>> index e8472d9b6e3b..ec815c42ef04 100644
>>> --- a/drivers/gpu/drm/vkms/vkms_drv.c
>>> +++ b/drivers/gpu/drm/vkms/vkms_drv.c
>>> @@ -198,6 +198,9 @@ static int vkms_create(struct vkms_config *config)
>>>    	if (ret)
>>>    		goto out_devres;
>>> +	/* init kms poll for handling hpd */
>>> +	drm_kms_helper_poll_init(&vkms_device->drm);
>>> +
>>>    	drm_client_setup(&vkms_device->drm, NULL);
>>>    	return 0;
>>> @@ -240,6 +243,7 @@ static void vkms_destroy(struct vkms_config *config)
>>>    	fdev = config->dev->faux_dev;
>>> +	drm_kms_helper_poll_fini(&config->dev->drm);
>>>    	drm_dev_unregister(&config->dev->drm);
>>>    	drm_atomic_helper_shutdown(&config->dev->drm);
>>>    	devres_release_group(&fdev->dev, NULL);
>>
>> -- 
>> --
>> Louis Chauvet, Bootlin
>> Embedded Linux and Kernel engineering
>> https://bootlin.com
>>

-- 
--
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-11-06  9:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-03 17:45 [PATCH v4 0/3] Pass down hot plug CONNECTOR ID to user-space Marius Vlad
2025-11-03 17:45 ` [PATCH v4 1/3] drm: Introduce a new connector status Marius Vlad
2025-11-03 17:45 ` [PATCH v4 2/3] drm: Propagate connector status change Marius Vlad
2025-11-03 17:45 ` [PATCH v4 3/3] drm/vkms: Add polling for HPD Marius Vlad
2025-11-04 10:21   ` Louis Chauvet
2025-11-04 14:19     ` Marius Vlad
2025-11-06  9:02       ` Louis Chauvet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox