提交 ab0a06d6 编写于 作者: B Bing Guo 提交者: Zheng Zengkai

drm/amd/display: Change function decide_dp_link_settings to avoid infinite looping

stable inclusion
from stable-5.10.14
commit 95850b9d0b23c2a3a5b7bc0dc636aba95df182d3
bugzilla: 48051

--------------------------------

[ Upstream commit 4716a7c5 ]

Why:
Function decide_dp_link_settings() loops infinitely when required bandwidth
can't be supported.

How:
Check the required bandwidth against verified_link_cap before trying to
find a link setting for it.
Tested-by: NDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: NBing Guo <bing.guo@amd.com>
Reviewed-by: NJun Lei <Jun.Lei@amd.com>
Acked-by: NAnson Jacob <anson.jacob@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 111f6f41
...@@ -2375,6 +2375,9 @@ static bool decide_dp_link_settings(struct dc_link *link, struct dc_link_setting ...@@ -2375,6 +2375,9 @@ static bool decide_dp_link_settings(struct dc_link *link, struct dc_link_setting
initial_link_setting; initial_link_setting;
uint32_t link_bw; uint32_t link_bw;
if (req_bw > dc_link_bandwidth_kbps(link, &link->verified_link_cap))
return false;
/* 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册