union dpcd_replay_configuration replay_configuration = {0};
/*AMD Replay version reuse DP_PSR_ERROR_STATUS for REPLAY_ERROR status.*/
union psr_error_status replay_error_status = {0};
+ bool ret = false;
+ int retries = 0;
if (!link->replay_settings.replay_feature_enabled)
return;
- dm_helpers_dp_read_dpcd(
- link->ctx,
- link,
- DP_SINK_PR_REPLAY_STATUS,
- &replay_configuration.raw,
- sizeof(replay_configuration.raw));
+ while (retries < 10) {
+ ret = dm_helpers_dp_read_dpcd(
+ link->ctx,
+ link,
+ DP_SINK_PR_REPLAY_STATUS,
+ &replay_configuration.raw,
+ sizeof(replay_configuration.raw));
+
+ if (ret)
+ break;
+
+ retries++;
+ }
+
+ if (!ret)
+ DC_LOG_WARNING("[%s][%d] DPCD read addr.0x%x failed with %d retries\n",
+ __func__, __LINE__,
+ DP_SINK_PR_REPLAY_STATUS, retries);
dm_helpers_dp_read_dpcd(
link->ctx,