mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 03:27:30 -04:00
usb: typec: ucsi: Invert DisplayPort role assignment
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 <stable@kernel.org>
Fixes: af8622f6a5 ("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>
Link: https://patch.msgid.link/20260601142837.3240207-1-akuchynski@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8af6812795
commit
d092d7edf8
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user