drm/amd/display: Fix DP-DVI dongle hotplug
authorGabe Teeger <gabe.teeger@amd.com>
Fri, 28 Jun 2024 20:05:36 +0000 (16:05 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 23 Jul 2024 21:07:10 +0000 (17:07 -0400)
[why]
Hotplugging with a DVI-DP dongle on pre-rdna embedded platform
working about half the time. The regression was found to be the
setting of link->type here.
[what]
Reverts fix besides the logging added.

Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Signed-off-by: Jerry Zuo <jerry.zuo@amd.com>
Signed-off-by: Gabe Teeger <gabe.teeger@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/link/link_detection.c

index bba644024780ad0dc3a3c30d82c4110c2f42769f..391dbe81534da7b1ce707a5cef33dff82bd41fea 100644 (file)
@@ -863,7 +863,6 @@ static bool detect_link_and_local_sink(struct dc_link *link,
        struct dc_sink *prev_sink = NULL;
        struct dpcd_caps prev_dpcd_caps;
        enum dc_connection_type new_connection_type = dc_connection_none;
-       enum dc_connection_type pre_connection_type = link->type;
        const uint32_t post_oui_delay = 30; // 30ms
 
        DC_LOGGER_INIT(link->ctx->logger);
@@ -965,7 +964,6 @@ static bool detect_link_and_local_sink(struct dc_link *link,
                        }
 
                        if (!detect_dp(link, &sink_caps, reason)) {
-                               link->type = pre_connection_type;
 
                                if (prev_sink)
                                        dc_sink_release(prev_sink);
@@ -1299,8 +1297,7 @@ bool link_detect(struct dc_link *link, enum dc_detect_reason reason)
                        link->dpcd_caps.is_mst_capable)
                is_delegated_to_mst_top_mgr = discover_dp_mst_topology(link, reason);
 
-       if (is_local_sink_detect_success &&
-                       pre_link_type == dc_connection_mst_branch &&
+       if (pre_link_type == dc_connection_mst_branch &&
                        link->type != dc_connection_mst_branch)
                is_delegated_to_mst_top_mgr = link_reset_cur_dp_mst_topology(link);