提交 eca36565 编写于 作者: Y Yingjie Wang 提交者: Zheng Zengkai

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

stable inclusion
from stable-5.10.50
commit 5885fce7b43919406b32d1c942c9b496aac3abbc
bugzilla: 174522 https://gitee.com/openeuler/kernel/issues/I4DNFY

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5885fce7b43919406b32d1c942c9b496aac3abbc

--------------------------------

[ Upstream commit 655c0ed1 ]

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: NYingjie Wang <wangyingjie55@126.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 912fd24e
...@@ -268,6 +268,9 @@ dm_dp_mst_detect(struct drm_connector *connector, ...@@ -268,6 +268,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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册