diff --git a/src/common/displayport/src/dp_connectorimpl.cpp b/src/common/displayport/src/dp_connectorimpl.cpp index f3267bc57..430f59af4 100644 --- a/src/common/displayport/src/dp_connectorimpl.cpp +++ b/src/common/displayport/src/dp_connectorimpl.cpp @@ -4416,7 +4416,11 @@ bool ConnectorImpl::allocateDpTunnelBw(NvU64 bandwidth) // = DPCD Value / granularityMultiplier // DPCD Value = bandwidth * granularityMultiplier // - requestBw = (NvU8) divide_ceil(bandwidth * granularityMultiplier, 1000 * 1000 * 1000); + { + NvU64 rawBw = divide_ceil(bandwidth * (NvU64)granularityMultiplier, + (NvU64)1000 * 1000 * 1000); + requestBw = (rawBw > NV_U8_MAX) ? (NvU8)NV_U8_MAX : (NvU8)rawBw; + } if (requestBw > estimatedBw) { @@ -5030,12 +5034,6 @@ bool ConnectorImpl::isLinkLost() if (!hal->getLaneStatusChannelEqualizationDone(i)) return true; } - - if (!(hal->isDpInTunnelingSupported() && main->isDpTunnelingHwBugWarEnabled())) - { - if (!hal->getInterlaneAlignDone()) - return true; - } } return false; } @@ -5545,6 +5543,23 @@ bool ConnectorImpl::trainLinkOptimized(LinkConfiguration lConfig) }; } + + // + // If RM fell back to a lower link config during training + // (main->train() can internally reduce lanes/rate), the DSC + // PPS parameters computed during compoundQuery for + // highestAssessedLC are now stale. Mark as failed so the + // caller does not proceed with mismatched DSC configuration. + // + if (highestAssessedLC.isValid() && + highestAssessedLC != activeLinkConfig && + activeLinkConfig.isValid()) + { + DP_PRINTF(DP_WARNING, + "DPCONN> MST link trained at lower config than assessed;" + " DSC parameters may be stale."); + bLinkTrainingSuccessful = false; + } lConfig = activeLinkConfig; if (bEnteredFlushMode)