Commit 3f1f74f4 authored by Jerry Zuo's avatar Jerry Zuo Committed by Alex Deucher

drm/amd/display: Fix two MST not light up regressions

1. Change 100104: Move verify link cap after read edid causes MST
   link_cap struct not being set. It leads to zero denominator
   pbn_per_slot value, leading to the crash at
   dal_fixed31_32_div(). Skip MST link training for now and will
   need to add MST specific link traning routine later.

2. Change 98822: Adding edp supports changes link setting
   condition from max_link to verified_link. It leads to MST is
   getting wrong link settings.
   e.g. LINK_SPREAD_05_DOWNSPREAD_30KHZ not set in MST case
Signed-off-by: default avatarJerry Zuo <Jerry.Zuo@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent dff2721b
...@@ -607,6 +607,12 @@ bool dc_link_detect(struct dc_link *link, bool boot) ...@@ -607,6 +607,12 @@ bool dc_link_detect(struct dc_link *link, bool boot)
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);
/* Need to setup mst link_cap struct here
* otherwise dc_link_detect() will leave mst link_cap
* empty which leads to allocate_mst_payload() has "0"
* pbn_per_slot value leading to exception on dal_fixed31_32_div()
*/
link->verified_link_cap = link->reported_link_cap;
return false; return false;
} }
...@@ -672,13 +678,9 @@ bool dc_link_detect(struct dc_link *link, bool boot) ...@@ -672,13 +678,9 @@ bool dc_link_detect(struct dc_link *link, bool boot)
* TODO debug why Dell 2413 doesn't like * TODO debug why Dell 2413 doesn't like
* two link trainings * two link trainings
*/ */
if (is_mst_supported(link)) {
link->verified_link_cap = /* deal with non-mst cases */
link->reported_link_cap; dp_hbr_verify_link_cap(link, &link->reported_link_cap);
} else {
dp_hbr_verify_link_cap(link,
&link->reported_link_cap);
}
} }
/* HDMI-DVI Dongle */ /* HDMI-DVI Dongle */
......
...@@ -1459,6 +1459,14 @@ void decide_link_settings(struct dc_stream_state *stream, ...@@ -1459,6 +1459,14 @@ void decide_link_settings(struct dc_stream_state *stream,
return; return;
} }
/* MST doesn't perform link training for now
* TODO: add MST specific link training routine
*/
if (is_mst_supported(link)) {
*link_setting = link->verified_link_cap;
return;
}
/* search for the minimum link setting that: /* search for the minimum link setting that:
* 1. is supported according to the link training result * 1. is supported according to the link training result
* 2. could support the b/w requested by the timing * 2. could support the b/w requested by the timing
......
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