From: Jignesh Patel <jignesh1.patel@intel.com>
To: heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
madhusudanarao.amara@intel.com, jignesh1.patel@intel.com
Subject: [PATCH v2] usb: typec: displayport: correct DP sink plug/receptacle pin parsing
Date: Tue, 24 Nov 2026 17:22:41 +0530 [thread overview]
Message-ID: <20261124115241.2956206-1-jignesh1.patel@intel.com> (raw)
The current code always reads bits 23:16 for both DP Sink device
direct-attach plug and receptacle cases. As per VESA DPAM v2.1b Table
5-6, the expected behavior is to read:
- bits 15:8 for a DP Sink plug
- bits 23:16 for a receptacle
Example:
- Partner Capability VDO = 0x00001c05
- bits 1:0 = 1, indicating DP Sink Device Capable
- bit 6 = 0, indicating the DP interface is presented on a USB-C plug
Based on bits 1:0 and bit 6, the pin assignment should be parsed from
bits 15:8, which gives 0x1c
Fixes: 0e3bb7d6894d ("usb: typec: Add driver for DisplayPort alternate mode")
Co-developed-by: Amara Madhusudanarao <madhusudanarao.amara@intel.com>
Signed-off-by: Amara Madhusudanarao <madhusudanarao.amara@intel.com>
Signed-off-by: Jignesh Patel <jignesh1.patel@intel.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
v2:
- Added Fixes tag as per the review comment.
drivers/usb/typec/altmodes/displayport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c
index 263a89c5f324..bbb7917b155b 100644
--- a/drivers/usb/typec/altmodes/displayport.c
+++ b/drivers/usb/typec/altmodes/displayport.c
@@ -114,7 +114,7 @@ static int dp_altmode_configure(struct dp_altmode *dp, u8 con)
return 0;
case DP_STATUS_CON_DFP_D:
conf |= DP_CONF_UFP_U_AS_DFP_D;
- pin_assign = DP_CAP_UFP_D_PIN_ASSIGN(dp->alt->vdo) &
+ pin_assign = DP_CAP_PIN_ASSIGN_UFP_D(dp->alt->vdo) &
DP_CAP_DFP_D_PIN_ASSIGN(dp->port->vdo);
/* Account for active cable capabilities */
if (dp->plug_prime)
--
2.34.1
reply other threads:[~2026-11-24 11:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261124115241.2956206-1-jignesh1.patel@intel.com \
--to=jignesh1.patel@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=madhusudanarao.amara@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
all inboxes | Powered by JetHome®