Skip to content

Commit 71ae309

Browse files
Meenakshikumar Somasundaramalexdeucher
authored andcommitted
drm/amd/display: Link training retry fix for abort case
[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 <[email protected]> Acked-by: Mikita Lipski <[email protected]> Signed-off-by: Meenakshikumar Somasundaram <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 4e00a43 commit 71ae309

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1840,9 +1840,13 @@ bool perform_link_training_with_retries(
18401840
dp_disable_link_phy(link, signal);
18411841

18421842
/* Abort link training if failure due to sink being unplugged. */
1843-
if (status == LINK_TRAINING_ABORT)
1844-
break;
1845-
else if (do_fallback) {
1843+
if (status == LINK_TRAINING_ABORT) {
1844+
enum dc_connection_type type = dc_connection_none;
1845+
1846+
dc_link_detect_sink(link, &type);
1847+
if (type == dc_connection_none)
1848+
break;
1849+
} else if (do_fallback) {
18461850
decide_fallback_link_setting(*link_setting, &current_setting, status);
18471851
/* Fail link training if reduced link bandwidth no longer meets
18481852
* stream requirements.

0 commit comments

Comments
 (0)