Skip to content

Commit

Permalink
drm/amd/display: Link training retry fix for abort case
Browse files Browse the repository at this point in the history
[ Upstream commit 71ae309 ]

[Why]
If link training is aborted, it shall be retried if sink is present.

[How]
Check hpd status to find out whether sink is present or not. If sink is
present, then link training shall be tried again with same settings.
Otherwise, link training shall be aborted.

Reviewed-by: Jimmy Kizito <Jimmy.Kizito@amd.com>
Acked-by: Mikita Lipski <mikita.lipski@amd.com>
Signed-off-by: Meenakshikumar Somasundaram <meenakshikumar.somasundaram@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Meenakshikumar Somasundaram authored and gregkh committed Sep 30, 2021
1 parent 7643868 commit fca67e1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
Expand Up @@ -1849,9 +1849,13 @@ bool perform_link_training_with_retries(
dp_disable_link_phy(link, signal);

/* Abort link training if failure due to sink being unplugged. */
if (status == LINK_TRAINING_ABORT)
break;
else if (do_fallback) {
if (status == LINK_TRAINING_ABORT) {
enum dc_connection_type type = dc_connection_none;

dc_link_detect_sink(link, &type);
if (type == dc_connection_none)
break;
} else if (do_fallback) {
decide_fallback_link_setting(*link_setting, &current_setting, status);
/* Fail link training if reduced link bandwidth no longer meets
* stream requirements.
Expand Down

0 comments on commit fca67e1

Please sign in to comment.