38 lines
1.8 KiB
Diff
38 lines
1.8 KiB
Diff
From bd5d6119ca1ed030ad26d06d1b3e980873ff0336 Mon Sep 17 00:00:00 2001
|
|
From: Martin Stark <901824+martinstark@users.noreply.github.com>
|
|
Date: Sun, 13 Sep 2026 22:32:38 +0200
|
|
Subject: [PATCH 1/2] fix(displayport): allow detach when sink is unplugged
|
|
|
|
The HPD check in dpPreModeset() rejects detach-only requests after unplug. This skips DP library cleanup while NVKMS advances its head bookkeeping, leaving stale attached groups that can block subsequent link training.
|
|
|
|
Allow detach-only requests when HPD is low. Reject requests with an attachment target on any selected head, preserving the connector/discovery guards and forced-connected and dynamic-mux exceptions.
|
|
---
|
|
src/common/displayport/src/dp_connectorimpl.cpp | 12 +++++++++---
|
|
1 file changed, 9 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/common/displayport/src/dp_connectorimpl.cpp b/src/common/displayport/src/dp_connectorimpl.cpp
|
|
index 99e0e97..7451e6c 100644
|
|
--- a/src/common/displayport/src/dp_connectorimpl.cpp
|
|
+++ b/src/common/displayport/src/dp_connectorimpl.cpp
|
|
@@ -3861,11 +3861,17 @@ void ConnectorImpl::dpPreModeset(const DpPreModesetParams ¶ms)
|
|
return;
|
|
}
|
|
|
|
- // Skip gating modeset on HPD for DDS panels
|
|
+ // Allow detach bookkeeping even when HPD is low.
|
|
if(!previousPlugged && !bClientForcedConnected && !main->isInternalPanelDynamicMuxCapable())
|
|
{
|
|
- DP_ASSERT(0 && "DPCONN> dpPreModeset called when Plugged State is false!");
|
|
- return;
|
|
+ for (NvU32 i = 0; i < NV_MAX_HEADS; i++)
|
|
+ {
|
|
+ if ((params.headMask & NVBIT(i)) && params.head[i].pTarget != NULL)
|
|
+ {
|
|
+ DP_ASSERT(0 && "DPCONN> dpPreModeset attach called when Plugged State is false!");
|
|
+ return;
|
|
+ }
|
|
+ }
|
|
}
|
|
|
|
this->bFECEnable |= this->needToEnableFEC(params);
|