drm/amd/display: Add delay to improve LTTPR UHBR interop
authorMichael Strauss <michael.strauss@amd.com>
Tue, 9 Apr 2024 16:00:34 +0000 (12:00 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 30 Apr 2024 13:46:00 +0000 (09:46 -0400)
[WHY]
Avoid race condition which puts LTTPR into bad state during UHBR LT.

[HOW]
Delay 30ms between starting UHBR TPS1 PHY output and sending TPS1 via DPCD.

Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Michael Strauss <michael.strauss@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_hpo_fixed_vs_pe_retimer_dp.c

index 3e6c7be7e278672687552c12baccfe3c6de7257a..5302d2c9c76077ef5b71ae0db667e28c99db1a8d 100644 (file)
@@ -165,7 +165,12 @@ static void set_hpo_fixed_vs_pe_retimer_dp_link_test_pattern(struct dc_link *lin
                link_res->hpo_dp_link_enc->funcs->set_link_test_pattern(
                                link_res->hpo_dp_link_enc, tp_params);
        }
+
        link->dc->link_srv->dp_trace_source_sequence(link, DPCD_SOURCE_SEQ_AFTER_SET_SOURCE_PATTERN);
+
+       // Give retimer extra time to lock before updating DP_TRAINING_PATTERN_SET to TPS1
+       if (tp_params->dp_phy_pattern == DP_TEST_PATTERN_128b_132b_TPS1_TRAINING_MODE)
+               msleep(30);
 }
 
 static void set_hpo_fixed_vs_pe_retimer_dp_lane_settings(struct dc_link *link,