aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorGravatar RD Babiera <rdbabiera@google.com> 2023-10-09 21:00:58 +0000
committerGravatar Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2023-10-11 11:38:06 +0200
commit89434b069e460967624903b049e5cf5c9e6b99b9 (patch)
treea9f540b82fcc5216ef58055544d9515fcd9d0af3 /drivers/usb
parentxhci: Preserve RsvdP bits in ERSTBA register correctly (diff)
downloadlinux-89434b069e460967624903b049e5cf5c9e6b99b9.tar.gz
linux-89434b069e460967624903b049e5cf5c9e6b99b9.tar.bz2
linux-89434b069e460967624903b049e5cf5c9e6b99b9.zip
usb: typec: altmodes/displayport: Signal hpd low when exiting mode
Upon receiving an ACK for a sent EXIT_MODE message, the DisplayPort driver currently resets the status and configuration of the port partner. The hpd signal is not updated despite being part of the status, so the Display stack can still transmit video despite typec_altmode_exit placing the lanes in a Safe State. Set hpd to low when a sent EXIT_MODE message is ACK'ed. Fixes: 0e3bb7d6894d ("usb: typec: Add driver for DisplayPort alternate mode") Cc: stable@vger.kernel.org Signed-off-by: RD Babiera <rdbabiera@google.com> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20231009210057.3773877-2-rdbabiera@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/typec/altmodes/displayport.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c
index 426c88a516e5..59e0218a8bc5 100644
--- a/drivers/usb/typec/altmodes/displayport.c
+++ b/drivers/usb/typec/altmodes/displayport.c
@@ -304,6 +304,11 @@ static int dp_altmode_vdm(struct typec_altmode *alt,
typec_altmode_update_active(alt, false);
dp->data.status = 0;
dp->data.conf = 0;
+ if (dp->hpd) {
+ drm_connector_oob_hotplug_event(dp->connector_fwnode);
+ dp->hpd = false;
+ sysfs_notify(&dp->alt->dev.kobj, "displayport", "hpd");
+ }
break;
case DP_CMD_STATUS_UPDATE:
dp->data.status = *vdo;