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

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
...@@ -278,6 +278,9 @@ dm_dp_mst_detect(struct drm_connector *connector, ...@@ -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 *aconnector = to_amdgpu_dm_connector(connector);
struct amdgpu_dm_connector *master = aconnector->mst_port; 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, return drm_dp_mst_detect_port(connector, ctx, &master->mst_mgr,
aconnector->port); aconnector->port);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment