Commit 655c0ed1 authored by Yingjie Wang's avatar Yingjie Wang Committed by Alex Deucher
Browse files

drm/amd/dc: Fix a missing check bug in dm_dp_mst_detect()



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: 4562236b ("drm/amd/dc: Add dc display driver (v2)")
Signed-off-by: default avatarYingjie Wang <wangyingjie55@126.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c6c6a712
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -278,6 +278,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);
}