All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] drm/amd/dc: Fix a missing check bug in dm_dp_mst_detect()
@ 2021-04-09  0:57 ` wangyingjie55
  0 siblings, 0 replies; 6+ messages in thread
From: wangyingjie55 @ 2021-04-09  0:57 UTC (permalink / raw)
  To: harry.wentland, sunpeng.li, alexander.deucher, christian.koenig,
	airlied, daniel, mikita.lipski, eryk.brol, aurabindo.pillai,
	Wayne.Lin, luben.tuikov
  Cc: wangyingjie55, amd-gfx, dri-devel, linux-kernel

From: Yingjie Wang <wangyingjie55@126.com>

In dm_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: 4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)")
Signed-off-by: Yingjie Wang <wangyingjie55@126.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
index 8ab0b9060d2b..103dfd0e9b65 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -271,6 +271,9 @@ dm_dp_mst_detect(struct drm_connector *connector,
 	struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector);
 	struct amdgpu_dm_connector *master = aconnector->mst_port;
 
+	if (drm_connector_is_unregistered(connector))
+		return connector_status_disconnected;
+
 	return drm_dp_mst_detect_port(connector, ctx, &master->mst_mgr,
 				      aconnector->port);
 }
-- 
2.7.4


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

end of thread, other threads:[~2021-04-23 18:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09  0:57 [PATCH v1] drm/amd/dc: Fix a missing check bug in dm_dp_mst_detect() wangyingjie55
2021-04-09  0:57 ` wangyingjie55
2021-04-09  0:57 ` wangyingjie55
2021-04-23 18:40 ` Alex Deucher
2021-04-23 18:40   ` Alex Deucher
2021-04-23 18:40   ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.