Skip to content

Commit cbd6c1b

Browse files
Cruise Hungalexdeucher
authored andcommitted
drm/amd/display: Fix DP MST sinks removal issue
[Why] In USB4 DP tunneling, it's possible to have this scenario that the path becomes unavailable and CM tears down the path a little bit late. So, in this case, the HPD is high but fails to read any DPCD register. That causes the link connection type to be set to sst. And not all sinks are removed behind the MST branch. [How] Restore the link connection type if it fails to read DPCD register. Cc: [email protected] Cc: Mario Limonciello <[email protected]> Reviewed-by: Wenjing Liu <[email protected]> Acked-by: Qingqing Zhuo <[email protected]> Signed-off-by: Cruise Hung <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 56574f8 commit cbd6c1b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/gpu/drm/amd/display/dc/link/link_detection.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,7 @@ static bool detect_link_and_local_sink(struct dc_link *link,
855855
struct dc_sink *prev_sink = NULL;
856856
struct dpcd_caps prev_dpcd_caps;
857857
enum dc_connection_type new_connection_type = dc_connection_none;
858+
enum dc_connection_type pre_connection_type = link->type;
858859
const uint32_t post_oui_delay = 30; // 30ms
859860

860861
DC_LOGGER_INIT(link->ctx->logger);
@@ -957,6 +958,8 @@ static bool detect_link_and_local_sink(struct dc_link *link,
957958
}
958959

959960
if (!detect_dp(link, &sink_caps, reason)) {
961+
link->type = pre_connection_type;
962+
960963
if (prev_sink)
961964
dc_sink_release(prev_sink);
962965
return false;
@@ -1244,11 +1247,16 @@ bool link_detect(struct dc_link *link, enum dc_detect_reason reason)
12441247
bool is_delegated_to_mst_top_mgr = false;
12451248
enum dc_connection_type pre_link_type = link->type;
12461249

1250+
DC_LOGGER_INIT(link->ctx->logger);
1251+
12471252
is_local_sink_detect_success = detect_link_and_local_sink(link, reason);
12481253

12491254
if (is_local_sink_detect_success && link->local_sink)
12501255
verify_link_capability(link, link->local_sink, reason);
12511256

1257+
DC_LOG_DC("%s: link_index=%d is_local_sink_detect_success=%d pre_link_type=%d link_type=%d\n", __func__,
1258+
link->link_index, is_local_sink_detect_success, pre_link_type, link->type);
1259+
12521260
if (is_local_sink_detect_success && link->local_sink &&
12531261
dc_is_dp_signal(link->local_sink->sink_signal) &&
12541262
link->dpcd_caps.is_mst_capable)

0 commit comments

Comments
 (0)