Skip to contentSkip to conversation

drm/radeon: reintroduce radeon_dp_work_func content

PATCH In review Alex Deucher 2 participants 2 messages May 18, 2023

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/radeon: reintroduce radeon_dp_work_func content

Put back the radeon_dp_work_func logic. It seems that handling DP RX interrupts is necessary to make some panels work. This was removed with the MST support, but it regresses some systems so add it back. While we are here, add the proper mutex locking.

Fixes 01ad1d9c2888 ("drm/radeon: Drop legacy MST support")
Cc Lyude Paul <[email protected]>
---
 drivers/gpu/drm/radeon/radeon_irq_kms.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/gpu/drm/radeon/radeon_irq_kms.c +10 -0
index 3377fbc71f65..c4dda908666c 100644
@@ -99,6 +99,16 @@ static void radeon_hotplug_work_func(struct work_struct *work)
 
 static void radeon_dp_work_func(struct work_struct *work)
 {
+	struct radeon_device *rdev = container_of(work, struct radeon_device,
+						  dp_work);
+	struct drm_device *dev = rdev->ddev;
+	struct drm_mode_config *mode_config = &dev->mode_config;
+	struct drm_connector *connector;
+
+	mutex_lock(&mode_config->mutex);
+	list_for_each_entry(connector, &mode_config->connector_list, head)
+		radeon_connector_hotplug(connector);
+	mutex_unlock(&mode_config->mutex);
 }
 
 /**
Signature · 1 line
2.40.1
Reviewed-by on v1 1/1
#1 lore raw

Whoops, sorry about that!

Quoted 35 lines · Alex Deucher

Put back the radeon_dp_work_func logic. It seems that handling DP RX interrupts is necessary to make some panels work. This was removed with the MST support, but it regresses some systems so add it back. While we are here, add the proper mutex locking.

Fixes 01ad1d9c2888 ("drm/radeon: Drop legacy MST support")
Cc Lyude Paul <[email protected]>
---
 drivers/gpu/drm/radeon/radeon_irq_kms.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/gpu/drm/radeon/radeon_irq_kms.c +10 -0
index 3377fbc71f65..c4dda908666c 100644
@@ -99,6 +99,16 @@ static void radeon_hotplug_work_func(struct work_struct *work)
 
 static void radeon_dp_work_func(struct work_struct *work)
 {
+	struct radeon_device *rdev = container_of(work, struct radeon_device,
+						  dp_work);
+	struct drm_device *dev = rdev->ddev;
+	struct drm_mode_config *mode_config = &dev->mode_config;
+	struct drm_connector *connector;
+
+	mutex_lock(&mode_config->mutex);
+	list_for_each_entry(connector, &mode_config->connector_list, head)
+		radeon_connector_hotplug(connector);
+	mutex_unlock(&mode_config->mutex);
 }
 
 /**
Signature · 3 lines
Cheers,
 Lyude Paul (she/her)
 Software Engineer at Red Hat