* [PATCH] usb: typec: ucsi: Invert DisplayPort role assignment
@ 2026-06-01 14:28 Andrei Kuchynski
2026-06-05 12:52 ` Heikki Krogerus
0 siblings, 1 reply; 2+ messages in thread
From: Andrei Kuchynski @ 2026-06-01 14:28 UTC (permalink / raw)
To: Heikki Krogerus
Cc: Greg Kroah-Hartman, Pooja Katiyar, Johan Hovold, linux-usb,
linux-kernel, Andrei Kuchynski, stable
The existing implementation assigned these flags backwards, configuring
the partner's DisplayPort role to match the port's role instead of
complementing it.
This prevents proper configuration during DP altmode activation, often
causing `pin_assignment` to remain 0 in `dp_altmode_configure()` and
resulting in VDM negotiation failures:
[ 583.328246] typec port1.1: VDM 0xff01a150 failed
Additionally, the fix ensures that the `pin_assignment` sysfs attribute
displays the correct values.
Cc: stable@vger.kernel.org
Fixes: af8622f6a585 ("usb: typec: ucsi: Support for DisplayPort alt mode")
Signed-off-by: Andrei Kuchynski <akuchynski@chromium.org>
---
drivers/usb/typec/ucsi/displayport.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/typec/ucsi/displayport.c b/drivers/usb/typec/ucsi/displayport.c
index 8aae80b457d74..669f08013c7ab 100644
--- a/drivers/usb/typec/ucsi/displayport.c
+++ b/drivers/usb/typec/ucsi/displayport.c
@@ -166,12 +166,12 @@ static int ucsi_displayport_status_update(struct ucsi_dp *dp)
* that Multi-function is preferred.
*/
if (DP_CAP_CAPABILITY(cap) & DP_CAP_UFP_D) {
- dp->data.status |= DP_STATUS_CON_UFP_D;
+ dp->data.status |= DP_STATUS_CON_DFP_D;
if (DP_CAP_UFP_D_PIN_ASSIGN(cap) & BIT(DP_PIN_ASSIGN_D))
dp->data.status |= DP_STATUS_PREFER_MULTI_FUNC;
} else {
- dp->data.status |= DP_STATUS_CON_DFP_D;
+ dp->data.status |= DP_STATUS_CON_UFP_D;
if (DP_CAP_DFP_D_PIN_ASSIGN(cap) & BIT(DP_PIN_ASSIGN_D))
dp->data.status |= DP_STATUS_PREFER_MULTI_FUNC;
--
2.54.0.823.g6e5bcc1fc9-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] usb: typec: ucsi: Invert DisplayPort role assignment
2026-06-01 14:28 [PATCH] usb: typec: ucsi: Invert DisplayPort role assignment Andrei Kuchynski
@ 2026-06-05 12:52 ` Heikki Krogerus
0 siblings, 0 replies; 2+ messages in thread
From: Heikki Krogerus @ 2026-06-05 12:52 UTC (permalink / raw)
To: Andrei Kuchynski
Cc: Greg Kroah-Hartman, Pooja Katiyar, Johan Hovold, linux-usb,
linux-kernel, stable
On Mon, Jun 01, 2026 at 02:28:37PM +0000, Andrei Kuchynski wrote:
> The existing implementation assigned these flags backwards, configuring
> the partner's DisplayPort role to match the port's role instead of
> complementing it.
> This prevents proper configuration during DP altmode activation, often
> causing `pin_assignment` to remain 0 in `dp_altmode_configure()` and
> resulting in VDM negotiation failures:
>
> [ 583.328246] typec port1.1: VDM 0xff01a150 failed
>
> Additionally, the fix ensures that the `pin_assignment` sysfs attribute
> displays the correct values.
>
> Cc: stable@vger.kernel.org
> Fixes: af8622f6a585 ("usb: typec: ucsi: Support for DisplayPort alt mode")
> Signed-off-by: Andrei Kuchynski <akuchynski@chromium.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/ucsi/displayport.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/typec/ucsi/displayport.c b/drivers/usb/typec/ucsi/displayport.c
> index 8aae80b457d74..669f08013c7ab 100644
> --- a/drivers/usb/typec/ucsi/displayport.c
> +++ b/drivers/usb/typec/ucsi/displayport.c
> @@ -166,12 +166,12 @@ static int ucsi_displayport_status_update(struct ucsi_dp *dp)
> * that Multi-function is preferred.
> */
> if (DP_CAP_CAPABILITY(cap) & DP_CAP_UFP_D) {
> - dp->data.status |= DP_STATUS_CON_UFP_D;
> + dp->data.status |= DP_STATUS_CON_DFP_D;
>
> if (DP_CAP_UFP_D_PIN_ASSIGN(cap) & BIT(DP_PIN_ASSIGN_D))
> dp->data.status |= DP_STATUS_PREFER_MULTI_FUNC;
> } else {
> - dp->data.status |= DP_STATUS_CON_DFP_D;
> + dp->data.status |= DP_STATUS_CON_UFP_D;
>
> if (DP_CAP_DFP_D_PIN_ASSIGN(cap) & BIT(DP_PIN_ASSIGN_D))
> dp->data.status |= DP_STATUS_PREFER_MULTI_FUNC;
> --
> 2.54.0.823.g6e5bcc1fc9-goog
--
heikki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-05 12:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-01 14:28 [PATCH] usb: typec: ucsi: Invert DisplayPort role assignment Andrei Kuchynski
2026-06-05 12:52 ` Heikki Krogerus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox