Skip to content

Commit

Permalink
drm/amd/display: Not fallback if link BW is smaller than req BW
Browse files Browse the repository at this point in the history
[Why]
When the link BW is smaller than the request BW,
the DP LT just kept running and fallback to lower link config.
DP LT just aborted if is_hpd_pending bit is high.
But is_hpd_pending bit indicates a new HPD event received.
It doesn't mean the HPD is low.

[How]
Abort the DP LT if the link BW is smaller than the request BW.
Remove checking is_hpd_pending bit in DP LT.

Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Acked-by: Roman Li <roman.li@amd.com>
Signed-off-by: Cruise <cruise.hung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Cruise authored and Alex Deucher committed May 20, 2024
1 parent 79d92db commit fa3c5a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1704,10 +1704,13 @@ bool perform_link_training_with_retries(
is_link_bw_min = ((cur_link_settings.link_rate <= LINK_RATE_LOW) &&
(cur_link_settings.lane_count <= LANE_COUNT_ONE));

if (is_link_bw_low)
if (is_link_bw_low) {
DC_LOG_WARNING(
"%s: Link(%d) bandwidth too low after fallback req_bw(%d) > link_bw(%d)\n",
__func__, link->link_index, req_bw, link_bw);

return false;
}
}

msleep(delay_between_attempts);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,10 +430,6 @@ static enum link_training_result dpia_training_cr_non_transparent(
retry_count++;
}

/* Abort link training if clock recovery failed due to HPD unplug. */
if (link->is_hpd_pending)
result = LINK_TRAINING_ABORT;

DC_LOG_HW_LINK_TRAINING(
"%s\n DPIA(%d) clock recovery\n -hop(%d)\n - result(%d)\n - retries(%d)\n - status(%d)\n",
__func__,
Expand Down Expand Up @@ -537,10 +533,6 @@ static enum link_training_result dpia_training_cr_transparent(
retry_count++;
}

/* Abort link training if clock recovery failed due to HPD unplug. */
if (link->is_hpd_pending)
result = LINK_TRAINING_ABORT;

DC_LOG_HW_LINK_TRAINING("%s\n DPIA(%d) clock recovery\n -hop(%d)\n - result(%d)\n - retries(%d)\n",
__func__,
link->link_id.enum_id - ENUM_ID_1,
Expand Down Expand Up @@ -731,10 +723,6 @@ static enum link_training_result dpia_training_eq_non_transparent(
lt_settings->hw_lane_settings, lt_settings->dpcd_lane_settings);
}

/* Abort link training if equalization failed due to HPD unplug. */
if (link->is_hpd_pending)
result = LINK_TRAINING_ABORT;

DC_LOG_HW_LINK_TRAINING(
"%s\n DPIA(%d) equalization\n - hop(%d)\n - result(%d)\n - retries(%d)\n - status(%d)\n",
__func__,
Expand Down Expand Up @@ -822,10 +810,6 @@ static enum link_training_result dpia_training_eq_transparent(
lt_settings->hw_lane_settings, lt_settings->dpcd_lane_settings);
}

/* Abort link training if equalization failed due to HPD unplug. */
if (link->is_hpd_pending)
result = LINK_TRAINING_ABORT;

DC_LOG_HW_LINK_TRAINING("%s\n DPIA(%d) equalization\n - hop(%d)\n - result(%d)\n - retries(%d)\n",
__func__,
link->link_id.enum_id - ENUM_ID_1,
Expand Down

0 comments on commit fa3c5a8

Please sign in to comment.