Skip to content

Commit 0988e04

Browse files
committed
Merge fix/dplib-bug-fixes: interlane alignment, NvU8 truncation, MST LT fallback detection
2 parents 17352b1 + 27567d7 commit 0988e04

1 file changed

Lines changed: 22 additions & 7 deletions

File tree

src/common/displayport/src/dp_connectorimpl.cpp

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4534,7 +4534,11 @@ bool ConnectorImpl::allocateDpTunnelBw(NvU64 bandwidth)
45344534
// = DPCD Value / granularityMultiplier
45354535
// DPCD Value = bandwidth * granularityMultiplier
45364536
//
4537-
requestBw = (NvU8) divide_ceil(bandwidth * granularityMultiplier, 1000 * 1000 * 1000);
4537+
{
4538+
NvU64 rawBw = divide_ceil(bandwidth * (NvU64)granularityMultiplier,
4539+
(NvU64)1000 * 1000 * 1000);
4540+
requestBw = (rawBw > NV_U8_MAX) ? (NvU8)NV_U8_MAX : (NvU8)rawBw;
4541+
}
45384542

45394543
if (requestBw > estimatedBw)
45404544
{
@@ -5148,12 +5152,6 @@ bool ConnectorImpl::isLinkLost()
51485152
if (!hal->getLaneStatusChannelEqualizationDone(i))
51495153
return true;
51505154
}
5151-
5152-
if (!(hal->isDpInTunnelingSupported() && main->isDpTunnelingHwBugWarEnabled()))
5153-
{
5154-
if (!hal->getInterlaneAlignDone())
5155-
return true;
5156-
}
51575155
}
51585156
return false;
51595157
}
@@ -5663,6 +5661,23 @@ bool ConnectorImpl::trainLinkOptimized(LinkConfiguration lConfig)
56635661
};
56645662
}
56655663

5664+
5665+
//
5666+
// If RM fell back to a lower link config during training
5667+
// (main->train() can internally reduce lanes/rate), the DSC
5668+
// PPS parameters computed during compoundQuery for
5669+
// highestAssessedLC are now stale. Mark as failed so the
5670+
// caller does not proceed with mismatched DSC configuration.
5671+
//
5672+
if (highestAssessedLC.isValid() &&
5673+
highestAssessedLC != activeLinkConfig &&
5674+
activeLinkConfig.isValid())
5675+
{
5676+
DP_PRINTF(DP_WARNING,
5677+
"DPCONN> MST link trained at lower config than assessed;"
5678+
" DSC parameters may be stale.");
5679+
bLinkTrainingSuccessful = false;
5680+
}
56665681
lConfig = activeLinkConfig;
56675682

56685683
if (bEnteredFlushMode)

0 commit comments

Comments
 (0)