Skip to contentSkip to conversation

usb: typec: ucsi: Support for DisplayPort alt mode

PATCH New Heikki Krogerus 1 participant 1 message Feb 6, 2019 USB

lore
Share & tools
lore
#0 lore raw

PATCH 5/5 usb: typec: ucsi: Support for DisplayPort alt mode

Hi,

Quoted 12 lines · Ajay Gupta

Review static void ucsi_unregister_altmodes(struct · line 432

Quoted 10 lines
(quoted diff) +5 -0
@@ -412,6 +424,12 @@ static void ucsi_unregister_altmodes(struct
 ucsi_connector *con, u8 recipient)
 	}
 
 	while (adev[i]) {
+		if (recipient == UCSI_RECIPIENT_SOP &&
+		    adev[i]->svid == USB_TYPEC_DP_SID) {
+			alt = typec_match_altmode(con->port_altmode, -1,
+						  USB_TYPEC_DP_SID, 1);
+			ucsi_displayport_remove_partner(alt);

"alt" may be null here in cases where attached type-C device has DP alt mode which is not supported by connector. Please change as

Quoted 2 lines
			If (alt)
				ucsi_displayport_remove_partner(alt);

That should not be necessary. Check ucsi_displayport_remove_partner(). I put a condition there if (!alt) return;

thanks,