patch "usb: typec: mux: intel_pmc_mux: Fix DP alternate mode entry" added to usb-linus
Subsystems (4)
This is a note to let you know that I've just added the patch titled
usb: typec: mux: intel_pmc_mux: Fix DP alternate mode entry
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From 130206a88683d859f63ed6d4a56ab5c2b4930c8e Mon Sep 17 00:00:00 2001
From: Heikki Krogerus <[email protected]>
Date: Fri, 29 May 2020 16:17:53 +0300
Subject: usb: typec: mux: intel_pmc_mux: Fix DP alternate mode entry
The PMC needs to be notified separately about HPD (hotplug detected) signal being high after mode entry. There is a bit "HPD High" in the Alternate Mode Request that the driver already sets, but that bit is only valid when the DisplayPort Alternate Mode is directly entered from disconnected state.
--- drivers/usb/typec/mux/intel_pmc_mux.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
drivers/usb/typec/mux/intel_pmc_mux.c +11 -2
@@ -148,7 +148,8 @@ pmc_usb_mux_dp_hpd(struct pmc_usb_port *port, struct typec_mux_state *state) msg[0 ] =PMC_USB_DP_HPD ; msg[0 ] |= port->usb3_port <<PMC_USB_MSG_USB3_PORT_SHIFT ; - msg[1 ] =PMC_USB_DP_HPD_IRQ ; +if (data->status &DP_STATUS_IRQ_HPD ) + msg[1 ] =PMC_USB_DP_HPD_IRQ ;if (data->status &DP_STATUS_HPD_STATE ) msg[1 ] |=PMC_USB_DP_HPD_LVL ;
@@ -161,6 +162,7 @@ pmc_usb_mux_dp(struct pmc_usb_port *port, struct typec_mux_state *state) {struct typec_displayport_data *data = state->data;struct altmode_req req = { }; +int ret;if (data->status &DP_STATUS_IRQ_HPD )return pmc_usb_mux_dp_hpd (port, state);
@@ -181,7 +183,14 @@ pmc_usb_mux_dp(struct pmc_usb_port *port, struct typec_mux_state *state)if (data->status &DP_STATUS_HPD_STATE ) req.mode_data |=PMC_USB_ALTMODE_HPD_HIGH ; -return pmc_usb_command (port, (void *)&req,sizeof (req)); + ret =pmc_usb_command (port, (void *)&req,sizeof (req)); +if (ret) +return ret; + +if (data->status &DP_STATUS_HPD_STATE ) +return pmc_usb_mux_dp_hpd (port, state); + +return 0 ; } static int
Signature · 1 line
2.27.0