Skip to contentSkip to conversation

drm/bridge_connector: use drm_kms_helper_connector_hotplug_event()

PATCH In review Simon Ser 3 participants 5 messages Jun 20, 2023

Subsystems (2)
lore
Share & tools
lore

Simon Ser

author
#0 lore raw

PATCH 1/1 drm/bridge_connector: use drm_kms_helper_connector_hotplug_event()

This adds more information to the hotplug uevent and lets user-space know that it's about a particular connector only.

Cc Dmitry Baryshkov <[email protected]>
Cc Paul Cercueil <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Sam Ravnborg <[email protected]>
---
 drivers/gpu/drm/drm_bridge_connector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_bridge_connector.c +1 -1
index 19ae4a177ac3..fc6f16e14f36 100644
@@ -125,7 +125,7 @@ static void drm_bridge_connector_hpd_cb(void *cb_data,
 
 	drm_bridge_connector_hpd_notify(connector, status);
 
-	drm_kms_helper_hotplug_event(dev);
+	drm_kms_helper_connector_hotplug_event(connector);
 }
 
 static void drm_bridge_connector_enable_hpd(struct drm_connector *connector)
Signature · 1 line
2.41.0
Reviewed-by on v1 1/1
#1 lore raw

Hi Simon,

Thank you for the patch.

Quoted 8 lines · Simon Ser

This adds more information to the hotplug uevent and lets user-space know that it's about a particular connector only.

Cc Dmitry Baryshkov <[email protected]>
Cc Paul Cercueil <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Sam Ravnborg <[email protected]>
Quoted 17 lines
---
 drivers/gpu/drm/drm_bridge_connector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_bridge_connector.c +1 -1
index 19ae4a177ac3..fc6f16e14f36 100644
@@ -125,7 +125,7 @@ static void drm_bridge_connector_hpd_cb(void *cb_data,
 
 	drm_bridge_connector_hpd_notify(connector, status);
 
-	drm_kms_helper_hotplug_event(dev);
+	drm_kms_helper_connector_hotplug_event(connector);
 }
 
 static void drm_bridge_connector_enable_hpd(struct drm_connector *connector)
Signature · 3 lines
Regards,

Laurent Pinchart
Reviewed-by on v1 1/1
#2 lore raw
In reply to Simon Ser

Hi Simon,

Quoted 2 lines · Simon Ser

This adds more information to the hotplug uevent and lets user-space know that it's about a particular connector only.

Will this change have impact on user space?
They will start to see CONNECTOR=n where they did not occur before. Asking as I have not really worked with the hotplug stuff.

The code change looks fine - no comment there.
And if there are no user space worries then:

Sam

Quoted 26 lines
Cc Dmitry Baryshkov <[email protected]>
Cc Paul Cercueil <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Sam Ravnborg <[email protected]>
---
 drivers/gpu/drm/drm_bridge_connector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_bridge_connector.c +1 -1
index 19ae4a177ac3..fc6f16e14f36 100644
@@ -125,7 +125,7 @@ static void drm_bridge_connector_hpd_cb(void *cb_data,
 
 	drm_bridge_connector_hpd_notify(connector, status);
 
-	drm_kms_helper_hotplug_event(dev);
+	drm_kms_helper_connector_hotplug_event(connector);
 }
 
 static void drm_bridge_connector_enable_hpd(struct drm_connector *connector)
Signature · 1 line
2.41.0
author
#3 lore raw
Quoted 8 lines · Sam Ravnborg
Quoted 2 lines · Simon Ser

This adds more information to the hotplug uevent and lets user-space know that it's about a particular connector only.

Will this change have impact on user space?
They will start to see CONNECTOR=n where they did not occur before. Asking as I have not really worked with the hotplug stuff.

Yes. CONNECTOR is an optional udev event property indicating that only the specified connector has changed. User-space unaware of this property will just ignore it. User-space aware of this property will only refresh information about the connector instead of the whole device.

A few months back, we've converted calls to drm_kms_helper_connector_hotplug_event() in amdgpu and the DRM DP helper.

#4 lore raw

Hi Simon,

Quoted 17 lines · Simon Ser
Quoted 8 lines · Sam Ravnborg
Quoted 2 lines · Simon Ser

This adds more information to the hotplug uevent and lets user-space know that it's about a particular connector only.

Will this change have impact on user space?
They will start to see CONNECTOR=n where they did not occur before. Asking as I have not really worked with the hotplug stuff.

Yes. CONNECTOR is an optional udev event property indicating that only the specified connector has changed. User-space unaware of this property will just ignore it. User-space aware of this property will only refresh information about the connector instead of the whole device.

Quoted 3 lines

A few months back, we've converted calls to drm_kms_helper_connector_hotplug_event() in amdgpu and the DRM DP helper.

Thanks for the explanation - all is good.

Sam