Commit fa3c5a8e authored by Cruise's avatar Cruise Committed by Alex Deucher

drm/amd/display: Not fallback if link BW is smaller than req BW

[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: default avatarWenjing Liu <wenjing.liu@amd.com>
Acked-by: default avatarRoman Li <roman.li@amd.com>
Signed-off-by: default avatarCruise <cruise.hung@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 79d92dba
...@@ -1704,10 +1704,13 @@ bool perform_link_training_with_retries( ...@@ -1704,10 +1704,13 @@ bool perform_link_training_with_retries(
is_link_bw_min = ((cur_link_settings.link_rate <= LINK_RATE_LOW) && is_link_bw_min = ((cur_link_settings.link_rate <= LINK_RATE_LOW) &&
(cur_link_settings.lane_count <= LANE_COUNT_ONE)); (cur_link_settings.lane_count <= LANE_COUNT_ONE));
if (is_link_bw_low) if (is_link_bw_low) {
DC_LOG_WARNING( DC_LOG_WARNING(
"%s: Link(%d) bandwidth too low after fallback req_bw(%d) > link_bw(%d)\n", "%s: Link(%d) bandwidth too low after fallback req_bw(%d) > link_bw(%d)\n",
__func__, link->link_index, req_bw, link_bw); __func__, link->link_index, req_bw, link_bw);
return false;
}
} }
msleep(delay_between_attempts); msleep(delay_between_attempts);
......
...@@ -430,10 +430,6 @@ static enum link_training_result dpia_training_cr_non_transparent( ...@@ -430,10 +430,6 @@ static enum link_training_result dpia_training_cr_non_transparent(
retry_count++; 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( DC_LOG_HW_LINK_TRAINING(
"%s\n DPIA(%d) clock recovery\n -hop(%d)\n - result(%d)\n - retries(%d)\n - status(%d)\n", "%s\n DPIA(%d) clock recovery\n -hop(%d)\n - result(%d)\n - retries(%d)\n - status(%d)\n",
__func__, __func__,
...@@ -537,10 +533,6 @@ static enum link_training_result dpia_training_cr_transparent( ...@@ -537,10 +533,6 @@ static enum link_training_result dpia_training_cr_transparent(
retry_count++; 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", DC_LOG_HW_LINK_TRAINING("%s\n DPIA(%d) clock recovery\n -hop(%d)\n - result(%d)\n - retries(%d)\n",
__func__, __func__,
link->link_id.enum_id - ENUM_ID_1, link->link_id.enum_id - ENUM_ID_1,
...@@ -731,10 +723,6 @@ static enum link_training_result dpia_training_eq_non_transparent( ...@@ -731,10 +723,6 @@ static enum link_training_result dpia_training_eq_non_transparent(
lt_settings->hw_lane_settings, lt_settings->dpcd_lane_settings); 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( DC_LOG_HW_LINK_TRAINING(
"%s\n DPIA(%d) equalization\n - hop(%d)\n - result(%d)\n - retries(%d)\n - status(%d)\n", "%s\n DPIA(%d) equalization\n - hop(%d)\n - result(%d)\n - retries(%d)\n - status(%d)\n",
__func__, __func__,
...@@ -822,10 +810,6 @@ static enum link_training_result dpia_training_eq_transparent( ...@@ -822,10 +810,6 @@ static enum link_training_result dpia_training_eq_transparent(
lt_settings->hw_lane_settings, lt_settings->dpcd_lane_settings); 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", DC_LOG_HW_LINK_TRAINING("%s\n DPIA(%d) equalization\n - hop(%d)\n - result(%d)\n - retries(%d)\n",
__func__, __func__,
link->link_id.enum_id - ENUM_ID_1, link->link_id.enum_id - ENUM_ID_1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment