* [PATCH v1] usb: typec: altmodes/displayport: Signal hpd low when exiting mode
@ 2023-10-09 21:00 RD Babiera
2023-10-10 8:44 ` Heikki Krogerus
0 siblings, 1 reply; 2+ messages in thread
From: RD Babiera @ 2023-10-09 21:00 UTC (permalink / raw)
To: heikki.krogerus, gregkh
Cc: badhri, linux-usb, linux-kernel, RD Babiera, stable
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>
---
drivers/usb/typec/altmodes/displayport.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c
index f503cb4cd721..718da02036d8 100644
--- a/drivers/usb/typec/altmodes/displayport.c
+++ b/drivers/usb/typec/altmodes/displayport.c
@@ -307,6 +307,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;
base-commit: 1053c4a4b8fcbd28386e80347e7c82d4d617e352
--
2.42.0.609.gbb76f46606-goog
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH v1] usb: typec: altmodes/displayport: Signal hpd low when exiting mode
2023-10-09 21:00 [PATCH v1] usb: typec: altmodes/displayport: Signal hpd low when exiting mode RD Babiera
@ 2023-10-10 8:44 ` Heikki Krogerus
0 siblings, 0 replies; 2+ messages in thread
From: Heikki Krogerus @ 2023-10-10 8:44 UTC (permalink / raw)
To: RD Babiera; +Cc: gregkh, badhri, linux-usb, linux-kernel, stable
On Mon, Oct 09, 2023 at 09:00:58PM +0000, RD Babiera wrote:
> 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>
> ---
> drivers/usb/typec/altmodes/displayport.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c
> index f503cb4cd721..718da02036d8 100644
> --- a/drivers/usb/typec/altmodes/displayport.c
> +++ b/drivers/usb/typec/altmodes/displayport.c
> @@ -307,6 +307,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;
>
> base-commit: 1053c4a4b8fcbd28386e80347e7c82d4d617e352
> --
> 2.42.0.609.gbb76f46606-goog
--
heikki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-10 8:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-09 21:00 [PATCH v1] usb: typec: altmodes/displayport: Signal hpd low when exiting mode RD Babiera
2023-10-10 8:44 ` Heikki Krogerus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®