Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: typec: altmodes/displayport: do not enter mode if port is the UFP

Nothing currently stops the DisplayPort Alt Mode driver from sending
Enter Mode if the port is the Data Device. Utilize
typec_altmode_get_data_role to prevent mode entry.

Signed-off-by: RD Babiera <rdbabiera@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250923181606.1583584-6-rdbabiera@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

RD Babiera and committed by
Greg Kroah-Hartman
41294342 ed4a5c5d

+3 -1
+3 -1
drivers/usb/typec/altmodes/displayport.c
··· 758 758 struct fwnode_handle *fwnode; 759 759 struct dp_altmode *dp; 760 760 761 - /* FIXME: Port can only be DFP_U. */ 761 + /* Port can only be DFP_U. */ 762 + if (typec_altmode_get_data_role(alt) != TYPEC_HOST) 763 + return -EPROTO; 762 764 763 765 /* Make sure we have compatible pin configurations */ 764 766 if (!(DP_CAP_PIN_ASSIGN_DFP_D(port->vdo) &