]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/radeon: Fix a missing check bug in radeon_dp_mst_detect()
authorYingjie Wang <wangyingjie55@126.com>
Wed, 7 Apr 2021 03:10:04 +0000 (20:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 08:49:56 +0000 (10:49 +0200)
[ Upstream commit 25315ebfaefcffd126a266116b37bb8a3d1c4620 ]

In radeon_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: 9843ead08f18 ("drm/radeon: add DisplayPort MST support (v2)")
Signed-off-by: Yingjie Wang <wangyingjie55@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/radeon/radeon_dp_mst.c

index 2c32186c4acd98fec494f38400a7e8e26d8ff1f8..4e4c937c36c62c71060adffbd04a11233238587a 100644 (file)
@@ -242,6 +242,9 @@ radeon_dp_mst_detect(struct drm_connector *connector,
                to_radeon_connector(connector);
        struct radeon_connector *master = radeon_connector->mst_port;
 
+       if (drm_connector_is_unregistered(connector))
+               return connector_status_disconnected;
+
        return drm_dp_mst_detect_port(connector, ctx, &master->mst_mgr,
                                      radeon_connector->port);
 }