From: Jimmy Kizito Date: Mon, 5 Apr 2021 22:05:09 +0000 (-0400) Subject: drm/amd/display: Skip DPCD read for DPTX-to-DPIA hop X-Git-Tag: v5.16-rc1~140^2~11^2~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=31cf79f05d34f4a8040bbeaaf7f03b0fb5fe117f;p=thirdparty%2Fkernel%2Flinux.git drm/amd/display: Skip DPCD read for DPTX-to-DPIA hop [why & how] Driver does not need to train the first hop. Reviewed-by: Jun Lei Acked-by: Wayne Lin Acked-by: Nicholas Kazlauskas Acked-by: Harry Wentland Signed-off-by: Jimmy Kizito Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c index c9477ddbdd5d7..13bf1d5ffb25e 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c @@ -1775,6 +1775,13 @@ static enum dc_status configure_lttpr_mode_non_transparent( if (encoding == DP_8b_10b_ENCODING) { repeater_cnt = dp_convert_to_count(link->dpcd_caps.lttpr_caps.phy_repeater_cnt); + + /* Driver does not need to train the first hop. Skip DPCD read and clear + * AUX_RD_INTERVAL for DPTX-to-DPIA hop. + */ + if (link->ep_type == DISPLAY_ENDPOINT_USB4_DPIA) + link->dpcd_caps.lttpr_caps.aux_rd_interval[--repeater_cnt] = 0; + for (repeater_id = repeater_cnt; repeater_id > 0; repeater_id--) { aux_interval_address = DP_TRAINING_AUX_RD_INTERVAL_PHY_REPEATER1 + ((DP_REPEATER_CONFIGURATION_AND_STATUS_SIZE) * (repeater_id - 1));