Skip to content

Commit eb28018

Browse files
Zhongweialexdeucher
authored andcommitted
drm/amd/display: force toggle rate wa for first link training for a retimer
[WHY] Handover from DMUB to driver does not perform link rate toggle. It might cause link training failure for boot up. [HOW] Force toggle rate wa for first link train. link->vendor_specific_lttpr_link_rate_wa should be zero then. Cc: [email protected] # 6.1+ Reviewed-by: Michael Strauss <[email protected]> Acked-by: Hamza Mahfooz <[email protected]> Signed-off-by: Zhongwei <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent c6df7f3 commit eb28018

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static enum link_training_result perform_fixed_vs_pe_nontransparent_training_seq
115115
lt_settings->cr_pattern_time = 16000;
116116

117117
/* Fixed VS/PE specific: Toggle link rate */
118-
apply_toggle_rate_wa = (link->vendor_specific_lttpr_link_rate_wa == target_rate);
118+
apply_toggle_rate_wa = ((link->vendor_specific_lttpr_link_rate_wa == target_rate) || (link->vendor_specific_lttpr_link_rate_wa == 0));
119119
target_rate = get_dpcd_link_rate(&lt_settings->link_settings);
120120
toggle_rate = (target_rate == 0x6) ? 0xA : 0x6;
121121

@@ -271,7 +271,7 @@ enum link_training_result dp_perform_fixed_vs_pe_training_sequence_legacy(
271271
/* Vendor specific: Toggle link rate */
272272
toggle_rate = (rate == 0x6) ? 0xA : 0x6;
273273

274-
if (link->vendor_specific_lttpr_link_rate_wa == rate) {
274+
if (link->vendor_specific_lttpr_link_rate_wa == rate || link->vendor_specific_lttpr_link_rate_wa == 0) {
275275
core_link_write_dpcd(
276276
link,
277277
DP_LINK_BW_SET,
@@ -617,7 +617,7 @@ enum link_training_result dp_perform_fixed_vs_pe_training_sequence(
617617
/* Vendor specific: Toggle link rate */
618618
toggle_rate = (rate == 0x6) ? 0xA : 0x6;
619619

620-
if (link->vendor_specific_lttpr_link_rate_wa == rate) {
620+
if (link->vendor_specific_lttpr_link_rate_wa == rate || link->vendor_specific_lttpr_link_rate_wa == 0) {
621621
core_link_write_dpcd(
622622
link,
623623
DP_LINK_BW_SET,

0 commit comments

Comments
 (0)