[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1617929840-13269-1-git-send-email-wangyingjie55@126.com>
Date: Thu, 8 Apr 2021 17:57:20 -0700
From: wangyingjie55@....com
To: harry.wentland@....com, sunpeng.li@....com,
alexander.deucher@....com, christian.koenig@....com,
airlied@...ux.ie, daniel@...ll.ch, mikita.lipski@....com,
eryk.brol@....com, aurabindo.pillai@....com, Wayne.Lin@....com,
luben.tuikov@....com
Cc: wangyingjie55@....com, amd-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: [PATCH v1] drm/amd/dc: Fix a missing check bug in dm_dp_mst_detect()
From: Yingjie Wang <wangyingjie55@....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@....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
Powered by blists - more mailing lists