Linux USB
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Andrei Kuchynski <akuchynski@chromium.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Pooja Katiyar <pooja.katiyar@intel.com>,
	Johan Hovold <johan@kernel.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] usb: typec: ucsi: Invert DisplayPort role assignment
Date: Fri, 5 Jun 2026 15:52:28 +0300	[thread overview]
Message-ID: <aiLGjHK-kdETm7u-@kuha> (raw)
In-Reply-To: <20260601142837.3240207-1-akuchynski@chromium.org>

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

      reply	other threads:[~2026-06-05 12:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01 14:28 [PATCH] usb: typec: ucsi: Invert DisplayPort role assignment Andrei Kuchynski
2026-06-05 12:52 ` Heikki Krogerus [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aiLGjHK-kdETm7u-@kuha \
    --to=heikki.krogerus@linux.intel.com \
    --cc=akuchynski@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pooja.katiyar@intel.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox