Unverified Commit 1a021e04 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!12074 drm/amd/display: Check index for aux_rd_interval before using

parents 5d76abff e5a9ec6b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -914,10 +914,10 @@ static enum dc_status configure_lttpr_mode_non_transparent(
			/* 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)
			if (link->ep_type == DISPLAY_ENDPOINT_USB4_DPIA && repeater_cnt > 0 && repeater_cnt < MAX_REPEATER_CNT)
				link->dpcd_caps.lttpr_caps.aux_rd_interval[--repeater_cnt] = 0;

			for (repeater_id = repeater_cnt; repeater_id > 0; repeater_id--) {
			for (repeater_id = repeater_cnt; repeater_id > 0 && repeater_id < MAX_REPEATER_CNT; repeater_id--) {
				aux_interval_address = DP_TRAINING_AUX_RD_INTERVAL_PHY_REPEATER1 +
						((DP_REPEATER_CONFIGURATION_AND_STATUS_SIZE) * (repeater_id - 1));
				core_link_read_dpcd(