Commit e748b59f authored by Lewis Huang's avatar Lewis Huang Committed by Alex Deucher

drm/amd/display: stop top_mgr when type change to non-MST during s3

[Why]
Driver keeps the invalid information cause report the
incorrect monitor which save in remote sink to OS

[How]
When connector type change from MST to non-MST,
stop the topology manager.
Signed-off-by: default avatarLewis Huang <Lewis.Huang@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarQingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 202ad02d
...@@ -854,6 +854,7 @@ static bool dc_link_detect_helper(struct dc_link *link, ...@@ -854,6 +854,7 @@ static bool dc_link_detect_helper(struct dc_link *link,
struct dpcd_caps prev_dpcd_caps; struct dpcd_caps prev_dpcd_caps;
bool same_dpcd = true; bool same_dpcd = true;
enum dc_connection_type new_connection_type = dc_connection_none; enum dc_connection_type new_connection_type = dc_connection_none;
enum dc_connection_type pre_connection_type = dc_connection_none;
bool perform_dp_seamless_boot = false; bool perform_dp_seamless_boot = false;
const uint32_t post_oui_delay = 30; // 30ms const uint32_t post_oui_delay = 30; // 30ms
...@@ -889,6 +890,7 @@ static bool dc_link_detect_helper(struct dc_link *link, ...@@ -889,6 +890,7 @@ static bool dc_link_detect_helper(struct dc_link *link,
link_disconnect_sink(link); link_disconnect_sink(link);
if (new_connection_type != dc_connection_none) { if (new_connection_type != dc_connection_none) {
pre_connection_type = link->type;
link->type = new_connection_type; link->type = new_connection_type;
link->link_state_valid = false; link->link_state_valid = false;
...@@ -962,6 +964,12 @@ static bool dc_link_detect_helper(struct dc_link *link, ...@@ -962,6 +964,12 @@ static bool dc_link_detect_helper(struct dc_link *link,
return true; return true;
} }
// link switch from MST to non-MST stop topology manager
if (pre_connection_type == dc_connection_mst_branch &&
link->type != dc_connection_mst_branch) {
dm_helpers_dp_mst_stop_top_mgr(link->ctx, link);
}
if (link->type == dc_connection_mst_branch) { if (link->type == dc_connection_mst_branch) {
LINK_INFO("link=%d, mst branch is now Connected\n", LINK_INFO("link=%d, mst branch is now Connected\n",
link->link_index); link->link_index);
......
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