* [PATCH v1] usb: typec: ucsi: acpi: Add DMI quirk for Dell XPS platforms
@ 2026-09-11 13:28 Heikki Krogerus
2026-09-12 13:12 ` Manuel Knitza
0 siblings, 1 reply; 2+ messages in thread
From: Heikki Krogerus @ 2026-09-11 13:28 UTC (permalink / raw)
To: Greg Kroah-Hartman, Manuel Knitza; +Cc: linux-usb
On Dell XPS systems, the UCSI firmware incorrectly reports duplicate
or extra DisplayPort and Thunderbolt alternate mode entries with
conflicting and malformed VDOs when querying alternate mode details.
This causes the kernel to retain an invalid VDO descriptor, breaking
DisplayPort Alternate Mode functionality during hotplug events.
Work around this issue by clearing the UCSI_CAP_ALT_MODE_DETAILS
feature flag in a DMI quirk matching Dell XPS platforms so that the
driver does not attempt to register alternate modes on these systems.
Reported-by: Manuel Knitza <manuel.knitza@googlemail.com>
Closes: https://lore.kernel.org/linux-usb/CAMRbua4xZfsQ0FXsrfq=SCbyZa1n=Aw5UrD3bEaU41d+J3KmXw@mail.gmail.com/
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
Hi,
This has to be tested, I'm "guessing" the DMI match.
Manuel, can you test this?
Thanks,
---
drivers/usb/typec/ucsi/ucsi_acpi.c | 41 ++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/drivers/usb/typec/ucsi/ucsi_acpi.c b/drivers/usb/typec/ucsi/ucsi_acpi.c
index 18286d3e9cc59..58cdc07a095eb 100644
--- a/drivers/usb/typec/ucsi/ucsi_acpi.c
+++ b/drivers/usb/typec/ucsi/ucsi_acpi.c
@@ -161,6 +161,39 @@ static const struct ucsi_operations ucsi_gram_ops = {
.async_control = ucsi_acpi_async_control
};
+static int ucsi_dell_sync_control(struct ucsi *ucsi, u64 command, u32 *cci,
+ void *val, size_t len, void *msg_out,
+ size_t msg_out_size)
+{
+ int ret;
+
+ ret = ucsi_sync_control_common(ucsi, command, cci, val, len,
+ msg_out, msg_out_size);
+ if (ret < 0)
+ return ret;
+
+ if (UCSI_COMMAND(command) == UCSI_GET_CAPABILITY && val) {
+ struct ucsi_capability *cap = val;
+
+ if (cap->features & UCSI_CAP_ALT_MODE_DETAILS) {
+ dev_warn(ucsi->dev,
+ "Firmware bug: broken altmode details reporting, disabling\n");
+ cap->features &= ~UCSI_CAP_ALT_MODE_DETAILS;
+ }
+ }
+
+ return ret;
+}
+
+static const struct ucsi_operations ucsi_dell_ops = {
+ .read_version = ucsi_acpi_read_version,
+ .read_cci = ucsi_acpi_read_cci,
+ .poll_cci = ucsi_acpi_poll_cci,
+ .read_message_in = ucsi_acpi_read_message_in,
+ .sync_control = ucsi_dell_sync_control,
+ .async_control = ucsi_acpi_async_control
+};
+
static const struct dmi_system_id ucsi_acpi_quirks[] = {
{
.matches = {
@@ -170,6 +203,14 @@ static const struct dmi_system_id ucsi_acpi_quirks[] = {
},
.driver_data = (void *)&ucsi_gram_ops,
},
+ {
+ .ident = "Dell XPS",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "XPS"),
+ },
+ .driver_data = (void *)&ucsi_dell_ops,
+ },
{ }
};
--
2.50.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] usb: typec: ucsi: acpi: Add DMI quirk for Dell XPS platforms
2026-09-11 13:28 [PATCH v1] usb: typec: ucsi: acpi: Add DMI quirk for Dell XPS platforms Heikki Krogerus
@ 2026-09-12 13:12 ` Manuel Knitza
0 siblings, 0 replies; 2+ messages in thread
From: Manuel Knitza @ 2026-09-12 13:12 UTC (permalink / raw)
To: Heikki Krogerus; +Cc: Greg Kroah-Hartman, linux-usb
Tested-by: Manuel Knitza <manuel.knitza@googlemail.com>
Tested on a Dell XPS 16 DA16260 (BIOS 1.10.1), which the DMI match hits
("Dell Inc." / "XPS 16 DA16260"). Unmodified patch built and loaded on
7.2.3-arch1-3: alt modes registered go 1 -> 0, the duplicate-altmode and
VDO-mismatch warnings disappear, the new warning appears, all connectors
still register, and a running DisplayPort link (5120x2160@60, HBR3,
4 lanes) is undisturbed by the module swap. The same change backported to
the 5-argument sync_control signature behaves identically on 7.1.8.
Note it does not build on 7.1.x as-is - msg_out/msg_out_size only arrived
in 7.2.
Details, and one caveat worth reading before this is taken as a fix, are
in the bug thread:
https://lore.kernel.org/linux-usb/CAMRbua4oitgPgCXtWKTJa0_5AHbtzLV-47k=nCSP0Rq-Mhpx-w@mail.gmail.com/
Short form of the caveat: with the quirk active, DisplayPort still never
comes back on hotplug or on resume. The quirk removes misleading data,
it does not restore the function.
Am Fr., 11. Sept. 2026 um 15:28 Uhr schrieb Heikki Krogerus
<heikki.krogerus@linux.intel.com>:
>
> On Dell XPS systems, the UCSI firmware incorrectly reports duplicate
> or extra DisplayPort and Thunderbolt alternate mode entries with
> conflicting and malformed VDOs when querying alternate mode details.
> This causes the kernel to retain an invalid VDO descriptor, breaking
> DisplayPort Alternate Mode functionality during hotplug events.
>
> Work around this issue by clearing the UCSI_CAP_ALT_MODE_DETAILS
> feature flag in a DMI quirk matching Dell XPS platforms so that the
> driver does not attempt to register alternate modes on these systems.
>
> Reported-by: Manuel Knitza <manuel.knitza@googlemail.com>
> Closes: https://lore.kernel.org/linux-usb/CAMRbua4xZfsQ0FXsrfq=SCbyZa1n=Aw5UrD3bEaU41d+J3KmXw@mail.gmail.com/
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> Hi,
>
> This has to be tested, I'm "guessing" the DMI match.
> Manuel, can you test this?
>
> Thanks,
>
> ---
> drivers/usb/typec/ucsi/ucsi_acpi.c | 41 ++++++++++++++++++++++++++++++
> 1 file changed, 41 insertions(+)
>
> diff --git a/drivers/usb/typec/ucsi/ucsi_acpi.c b/drivers/usb/typec/ucsi/ucsi_acpi.c
> index 18286d3e9cc59..58cdc07a095eb 100644
> --- a/drivers/usb/typec/ucsi/ucsi_acpi.c
> +++ b/drivers/usb/typec/ucsi/ucsi_acpi.c
> @@ -161,6 +161,39 @@ static const struct ucsi_operations ucsi_gram_ops = {
> .async_control = ucsi_acpi_async_control
> };
>
> +static int ucsi_dell_sync_control(struct ucsi *ucsi, u64 command, u32 *cci,
> + void *val, size_t len, void *msg_out,
> + size_t msg_out_size)
> +{
> + int ret;
> +
> + ret = ucsi_sync_control_common(ucsi, command, cci, val, len,
> + msg_out, msg_out_size);
> + if (ret < 0)
> + return ret;
> +
> + if (UCSI_COMMAND(command) == UCSI_GET_CAPABILITY && val) {
> + struct ucsi_capability *cap = val;
> +
> + if (cap->features & UCSI_CAP_ALT_MODE_DETAILS) {
> + dev_warn(ucsi->dev,
> + "Firmware bug: broken altmode details reporting, disabling\n");
> + cap->features &= ~UCSI_CAP_ALT_MODE_DETAILS;
> + }
> + }
> +
> + return ret;
> +}
> +
> +static const struct ucsi_operations ucsi_dell_ops = {
> + .read_version = ucsi_acpi_read_version,
> + .read_cci = ucsi_acpi_read_cci,
> + .poll_cci = ucsi_acpi_poll_cci,
> + .read_message_in = ucsi_acpi_read_message_in,
> + .sync_control = ucsi_dell_sync_control,
> + .async_control = ucsi_acpi_async_control
> +};
> +
> static const struct dmi_system_id ucsi_acpi_quirks[] = {
> {
> .matches = {
> @@ -170,6 +203,14 @@ static const struct dmi_system_id ucsi_acpi_quirks[] = {
> },
> .driver_data = (void *)&ucsi_gram_ops,
> },
> + {
> + .ident = "Dell XPS",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
> + DMI_MATCH(DMI_PRODUCT_NAME, "XPS"),
> + },
> + .driver_data = (void *)&ucsi_dell_ops,
> + },
> { }
> };
>
> --
> 2.50.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-12 13:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-11 13:28 [PATCH v1] usb: typec: ucsi: acpi: Add DMI quirk for Dell XPS platforms Heikki Krogerus
2026-09-12 13:12 ` Manuel Knitza
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.