From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: RD Babiera <rdbabiera@google.com>
Cc: gregkh@linuxfoundation.org, badhri@google.com,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] usb: typec: altmodes/displayport: do not enter mode if port is the UFP
Date: Wed, 8 Oct 2025 13:33:28 +0300 [thread overview]
Message-ID: <aOY9-B1V3SNvcjrF@kuha.fi.intel.com> (raw)
In-Reply-To: <20250923181606.1583584-6-rdbabiera@google.com>
On Tue, Sep 23, 2025 at 06:16:08PM +0000, RD Babiera wrote:
> Nothing currently stops the DisplayPort Alt Mode driver from sending
> Enter Mode if the port is the Data Device. Utilize
> typec_altmode_get_data_role to prevent mode entry.
>
> Signed-off-by: RD Babiera <rdbabiera@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/altmodes/displayport.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c
> index 1dcb77faf85d..8d111ad3b71b 100644
> --- a/drivers/usb/typec/altmodes/displayport.c
> +++ b/drivers/usb/typec/altmodes/displayport.c
> @@ -758,7 +758,9 @@ int dp_altmode_probe(struct typec_altmode *alt)
> struct fwnode_handle *fwnode;
> struct dp_altmode *dp;
>
> - /* FIXME: Port can only be DFP_U. */
> + /* Port can only be DFP_U. */
> + if (typec_altmode_get_data_role(alt) != TYPEC_HOST)
> + return -EPROTO;
>
> /* Make sure we have compatible pin configurations */
> if (!(DP_CAP_PIN_ASSIGN_DFP_D(port->vdo) &
> --
> 2.51.0.534.gc79095c0ca-goog
--
heikki
next prev parent reply other threads:[~2025-10-08 10:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-23 18:16 [PATCH v2 0/2] usb: typec: altmodes/displayport: add port data role handling support RD Babiera
2025-09-23 18:16 ` [PATCH v2 1/2] usb: typec: class: add typec_get_data_role symbol RD Babiera
2025-10-08 10:32 ` Heikki Krogerus
2025-09-23 18:16 ` [PATCH v2 2/2] usb: typec: altmodes/displayport: do not enter mode if port is the UFP RD Babiera
2025-10-08 10:33 ` Heikki Krogerus [this message]
2026-01-10 7:53 ` Andy Yan
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=aOY9-B1V3SNvcjrF@kuha.fi.intel.com \
--to=heikki.krogerus@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 \
/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