public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: RD Babiera <rdbabiera@google.com>
Cc: gregkh@linuxfoundation.org, utkarsh.h.patel@intel.com,
	andriy.shevchenko@linux.intel.com, badhri@google.com,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@kernel.org
Subject: Re: [PATCH v1] usb: typec: altmode/displayport: set displayport signaling rate in configure message
Date: Wed, 11 Mar 2026 15:59:43 +0200	[thread overview]
Message-ID: <abF1Tx7YQ2mdu2SW@kuha> (raw)
In-Reply-To: <20260310204106.3939862-2-rdbabiera@google.com>

Tue, Mar 10, 2026 at 08:41:05PM +0000, RD Babiera kirjoitti:
> dp_altmode_configure sets the signaling rate to the current
> configuration's rate and then shifts the value to the Select
> Configuration bitfield. On the initial configuration, dp->data.conf
> is 0 to begin with, so the signaling rate field is never set, which
> leads to some DisplayPort Alt Mode partners sending NAK to the
> Configure message.
> 
> Set the signaling rate to the capabilities supported by both the
> port and the port partner. If the cable supports DisplayPort Alt Mode,
> then include its capabilities as well.
> 
> Fixes: a17fae8fc38e ("usb: typec: Add Displayport Alternate Mode 2.1 Support")
> Cc: stable@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 | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c
> index d185688a16b1..35d9c3086990 100644
> --- a/drivers/usb/typec/altmodes/displayport.c
> +++ b/drivers/usb/typec/altmodes/displayport.c
> @@ -100,9 +100,14 @@ static int dp_altmode_configure(struct dp_altmode *dp, u8 con)
>  {
>  	u8 pin_assign = 0;
>  	u32 conf;
> +	u32 signal;
>  
>  	/* DP Signalling */
> -	conf = (dp->data.conf & DP_CONF_SIGNALLING_MASK) >> DP_CONF_SIGNALLING_SHIFT;
> +	signal = DP_CAP_DP_SIGNALLING(dp->port->vdo) & DP_CAP_DP_SIGNALLING(dp->alt->vdo);
> +	if (dp->plug_prime)
> +		signal &= DP_CAP_DP_SIGNALLING(dp->plug_prime->vdo);
> +
> +	conf = signal << DP_CONF_SIGNALLING_SHIFT;
>  
>  	switch (con) {
>  	case DP_STATUS_CON_DISABLED:
> 
> base-commit: bb375c251ab40bdbc5272008fcf2bc6cd5266610
> -- 
> 2.53.0.473.g4a7958ca14-goog

-- 
heikki

      reply	other threads:[~2026-03-11 14:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 20:41 [PATCH v1] usb: typec: altmode/displayport: set displayport signaling rate in configure message RD Babiera
2026-03-11 13:59 ` 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=abF1Tx7YQ2mdu2SW@kuha \
    --to=heikki.krogerus@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=badhri@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rdbabiera@google.com \
    --cc=stable@kernel.org \
    --cc=utkarsh.h.patel@intel.com \
    /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