diff options
author | Bing Guo <bing.guo@amd.com> | 2021-01-04 14:09:41 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-01-20 16:38:20 -0500 |
commit | 69d5c7f398c3e1b5ee56200d54c69239b3db9da7 (patch) | |
tree | 9329749b63ae3be510a7181725f1459d4e2b7594 /drivers/gpu/drm/amd/display | |
parent | d740a39c3dde99f9d8afc5aff8e56bdb48d8be9b (diff) | |
download | linux-stable-69d5c7f398c3e1b5ee56200d54c69239b3db9da7.tar.gz linux-stable-69d5c7f398c3e1b5ee56200d54c69239b3db9da7.tar.bz2 linux-stable-69d5c7f398c3e1b5ee56200d54c69239b3db9da7.zip |
drm/amd/display: Change function decide_dp_link_settings to avoid infinite looping
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: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Bing Guo <bing.guo@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Anson Jacob <anson.jacob@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c index 259fb1539aec..4149b8771462 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c @@ -2399,6 +2399,9 @@ static bool decide_dp_link_settings(struct dc_link *link, struct dc_link_setting initial_link_setting; 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: * 1. is supported according to the link training result * 2. could support the b/w requested by the timing |