Skip to contentSkip to conversation

drm/radeon: Fix a missing check bug in radeon_dp_mst_detect()

PATCH Applied [email protected] 2 participants 3 messages Apr 7, 2021 – Apr 10, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon: Fix a missing check bug in radeon_dp_mst_detect()

From: Yingjie Wang <[email protected]>

In radeon_dp_mst_detect(), We should check whether or not @connector has been unregistered from userspace. If the connector is unregistered, we should return disconnected status.

Fixes 9843ead08f18 ("drm/radeon: add DisplayPort MST support (v2)")
---
 drivers/gpu/drm/radeon/radeon_dp_mst.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/radeon/radeon_dp_mst.c +3 -0
index 2c32186c4acd..4e4c937c36c6 100644
@@ -242,6 +242,9 @@ radeon_dp_mst_detect(struct drm_connector *connector,
 		to_radeon_connector(connector);
 	struct radeon_connector *master = radeon_connector->mst_port;
 
+	if (drm_connector_is_unregistered(connector))
+		return connector_status_disconnected;
+
 	return drm_dp_mst_detect_port(connector, ctx, &master->mst_mgr,
 				      radeon_connector->port);
 }
Signature · 1 line
2.7.4
Applied
#1 lore raw

Applied. Thanks!

Alex

Quoted 30 lines · On Wed, Apr 7, 2021 at 2:23 AM <[email protected]> wrote:

From: Yingjie Wang <[email protected]>

In radeon_dp_mst_detect(), We should check whether or not @connector has been unregistered from userspace. If the connector is unregistered, we should return disconnected status.

Fixes 9843ead08f18 ("drm/radeon: add DisplayPort MST support (v2)")
---
 drivers/gpu/drm/radeon/radeon_dp_mst.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/radeon/radeon_dp_mst.c +3 -1
index 2c32186c4acd..4e4c937c36c6 100644
@@ -242,6 +242,9 @@ radeon_dp_mst_detect(struct drm_connector *connector,
                to_radeon_connector(connector);
        struct radeon_connector *master = radeon_connector->mst_port;
 
+       if (drm_connector_is_unregistered(connector))
+               return connector_status_disconnected;
+
        return drm_dp_mst_detect_port(connector, ctx, &master->mst_mgr,
                                      radeon_connector->port);
 }
--

2.7.4

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#2 lore raw

My pleasure!

Quoted 35 lines · Alex Deucher

Applied. Thanks!

Alex

Quoted 30 lines · On Wed, Apr 7, 2021 at 2:23 AM <[email protected]> wrote:

From: Yingjie Wang <[email protected]>

In radeon_dp_mst_detect(), We should check whether or not @connector has been unregistered from userspace. If the connector is unregistered, we should return disconnected status.

Fixes 9843ead08f18 ("drm/radeon: add DisplayPort MST support (v2)")
---
 drivers/gpu/drm/radeon/radeon_dp_mst.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/radeon/radeon_dp_mst.c +3 -1
index 2c32186c4acd..4e4c937c36c6 100644
@@ -242,6 +242,9 @@ radeon_dp_mst_detect(struct drm_connector *connector,
                to_radeon_connector(connector);
        struct radeon_connector *master = radeon_connector->mst_port;
 
+       if (drm_connector_is_unregistered(connector))
+               return connector_status_disconnected;
+
        return drm_dp_mst_detect_port(connector, ctx, &master->mst_mgr,
                                      radeon_connector->port);
 }
--

2.7.4

Quoted 4 lines
Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel