drm/amd/display: Adjust DP 8b10b LT exit behavior
[Why] Polling SINK_STATUS DPCD can cause some non-DP2.0 LTTPR hubs to hang and no longer respond to AUX. [How] As a workaround for the problem hubs, and also to more closely match DP spec 8b10b behavior, don't poll for intra-hop AUX reply indication on 8b10b-encoded links. Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com> Acked-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: Ilya Bakoulin <Ilya.Bakoulin@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
158858bf1a
commit
180f33d27a
|
@ -1912,7 +1912,7 @@ enum dc_status dpcd_configure_lttpr_mode(struct dc_link *link, struct link_train
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dpcd_exit_training_mode(struct dc_link *link)
|
static void dpcd_exit_training_mode(struct dc_link *link, enum dp_link_encoding encoding)
|
||||||
{
|
{
|
||||||
uint8_t sink_status = 0;
|
uint8_t sink_status = 0;
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
|
@ -1920,6 +1920,7 @@ static void dpcd_exit_training_mode(struct dc_link *link)
|
||||||
/* clear training pattern set */
|
/* clear training pattern set */
|
||||||
dpcd_set_training_pattern(link, DP_TRAINING_PATTERN_VIDEOIDLE);
|
dpcd_set_training_pattern(link, DP_TRAINING_PATTERN_VIDEOIDLE);
|
||||||
|
|
||||||
|
if (encoding == DP_128b_132b_ENCODING) {
|
||||||
/* poll for intra-hop disable */
|
/* poll for intra-hop disable */
|
||||||
for (i = 0; i < 10; i++) {
|
for (i = 0; i < 10; i++) {
|
||||||
if ((core_link_read_dpcd(link, DP_SINK_STATUS, &sink_status, 1) == DC_OK) &&
|
if ((core_link_read_dpcd(link, DP_SINK_STATUS, &sink_status, 1) == DC_OK) &&
|
||||||
|
@ -1927,6 +1928,7 @@ static void dpcd_exit_training_mode(struct dc_link *link)
|
||||||
break;
|
break;
|
||||||
udelay(1000);
|
udelay(1000);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum dc_status dpcd_configure_channel_coding(struct dc_link *link,
|
enum dc_status dpcd_configure_channel_coding(struct dc_link *link,
|
||||||
|
@ -2649,7 +2651,7 @@ enum link_training_result dc_link_dp_perform_link_training(
|
||||||
<_settings);
|
<_settings);
|
||||||
|
|
||||||
/* reset previous training states */
|
/* reset previous training states */
|
||||||
dpcd_exit_training_mode(link);
|
dpcd_exit_training_mode(link, encoding);
|
||||||
|
|
||||||
/* configure link prior to entering training mode */
|
/* configure link prior to entering training mode */
|
||||||
dpcd_configure_lttpr_mode(link, <_settings);
|
dpcd_configure_lttpr_mode(link, <_settings);
|
||||||
|
@ -2670,7 +2672,7 @@ enum link_training_result dc_link_dp_perform_link_training(
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
|
|
||||||
/* exit training mode */
|
/* exit training mode */
|
||||||
dpcd_exit_training_mode(link);
|
dpcd_exit_training_mode(link, encoding);
|
||||||
|
|
||||||
/* switch to video idle */
|
/* switch to video idle */
|
||||||
if ((status == LINK_TRAINING_SUCCESS) || !skip_video_pattern)
|
if ((status == LINK_TRAINING_SUCCESS) || !skip_video_pattern)
|
||||||
|
|
Loading…
Reference in New Issue