Skip to contentSkip to conversation

usb: typec: altmode/displayport: set displayport signaling rate in configure message

PATCH In review RD Babiera 2 participants 2 messages Mar 10 – Mar 11

Subsystems (3)
lore
Share & tools
lore

RD Babiera

author
#0 lore raw

PATCH 1/1 usb: typec: altmode/displayport: set displayport signaling rate in configure message

dp_altmode_configure sets the signaling rate to the current configuration's rate and then shifts the value to the Select Configuration bitfield. On the initial configuration, dp->data.conf is 0 to begin with, so the signaling rate field is never set, which leads to some DisplayPort Alt Mode partners sending NAK to the Configure message.

Set the signaling rate to the capabilities supported by both the port and the port partner. If the cable supports DisplayPort Alt Mode, then include its capabilities as well.

Fixes a17fae8fc38e ("usb: typec: Add Displayport Alternate Mode 2.1 Support")
---
 drivers/usb/typec/altmodes/displayport.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/usb/typec/altmodes/displayport.c +6 -1
index d185688a16b1..35d9c3086990 100644
@@ -100,9 +100,14 @@ static int dp_altmode_configure(struct dp_altmode *dp, u8 con)
 {
 	u8 pin_assign = 0;
 	u32 conf;
+	u32 signal;
 
 	/* DP Signalling */
-	conf = (dp->data.conf & DP_CONF_SIGNALLING_MASK) >> DP_CONF_SIGNALLING_SHIFT;
+	signal = DP_CAP_DP_SIGNALLING(dp->port->vdo) & DP_CAP_DP_SIGNALLING(dp->alt->vdo);
+	if (dp->plug_prime)
+		signal &= DP_CAP_DP_SIGNALLING(dp->plug_prime->vdo);
+
+	conf = signal << DP_CONF_SIGNALLING_SHIFT;
 
 	switch (con) {
 	case DP_STATUS_CON_DISABLED:

base-commit: bb375c251ab40bdbc5272008fcf2bc6cd5266610

Signature · 1 line
2.53.0.473.g4a7958ca14-goog
maintainer Acked-by on v1 1/1
#1 lore raw

Tue, Mar 10, 2026 at 08:41:05PM +0000, RD Babiera kirjoitti:

Quoted 7 lines

dp_altmode_configure sets the signaling rate to the current configuration's rate and then shifts the value to the Select Configuration bitfield. On the initial configuration, dp->data.conf is 0 to begin with, so the signaling rate field is never set, which leads to some DisplayPort Alt Mode partners sending NAK to the Configure message.

Quoted 7 lines

Set the signaling rate to the capabilities supported by both the port and the port partner. If the cable supports DisplayPort Alt Mode, then include its capabilities as well.

Fixes a17fae8fc38e ("usb: typec: Add Displayport Alternate Mode 2.1 Support")
Quoted 28 lines
---
 drivers/usb/typec/altmodes/displayport.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/usb/typec/altmodes/displayport.c +6 -1
index d185688a16b1..35d9c3086990 100644
@@ -100,9 +100,14 @@ static int dp_altmode_configure(struct dp_altmode *dp, u8 con)
 {
 	u8 pin_assign = 0;
 	u32 conf;
+	u32 signal;
 
 	/* DP Signalling */
-	conf = (dp->data.conf & DP_CONF_SIGNALLING_MASK) >> DP_CONF_SIGNALLING_SHIFT;
+	signal = DP_CAP_DP_SIGNALLING(dp->port->vdo) & DP_CAP_DP_SIGNALLING(dp->alt->vdo);
+	if (dp->plug_prime)
+		signal &= DP_CAP_DP_SIGNALLING(dp->plug_prime->vdo);
+
+	conf = signal << DP_CONF_SIGNALLING_SHIFT;
 
 	switch (con) {
 	case DP_STATUS_CON_DISABLED:

base-commit: bb375c251ab40bdbc5272008fcf2bc6cd5266610

Signature · 1 line
2.53.0.473.g4a7958ca14-goog
Signature · 1 line
heikki