]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
drm/dp: Add byte-by-byte fallback for broken USB-C adapters
authorChia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Thu, 4 Dec 2025 02:46:47 +0000 (10:46 +0800)
committerMario Limonciello (AMD) <superm1@kernel.org>
Fri, 9 Jan 2026 17:27:26 +0000 (11:27 -0600)
commita8f49a0043011c3dd12998a6c700bb59d5365c20
tree567560fac0025c7713c46256656fdb09007a4acd
parent9ce4aef9a5b1b76207152ba019f838f62dff97b8
drm/dp: Add byte-by-byte fallback for broken USB-C adapters

Some USB-C hubs and adapters have buggy firmware where multi-byte AUX
reads consistently timeout, while single-byte reads from the same address
work correctly.

Known affected devices that exhibit this issue:
- Lenovo USB-C to VGA adapter (VIA VL817 chipset)
  idVendor=17ef, idProduct=7217
- Dell DA310 USB-C mobile adapter hub
  idVendor=413c, idProduct=c010

Analysis of the failure pattern shows:
- Single-byte probes to 0xf0000 (LTTPR) succeed
- Single-byte probes to 0x00102 (TRAINING_AUX_RD_INTERVAL) succeed
- Multi-byte reads from 0x00000 (DPCD capabilities) timeout with -ETIMEDOUT
- Retrying does not help - the failure is consistent across all attempts

The issue appears to be a firmware bug in the AUX transaction handling
that specifically affects multi-byte reads.

Add a fallback mechanism in drm_dp_dpcd_read_data() that attempts
byte-by-byte reading when the normal multi-byte read fails. This
workaround only activates for adapters that fail the standard read path,
ensuring no impact on correctly functioning hardware.

Tested with:
- Lenovo USB-C to VGA adapter (VIA VL817) - now works with fallback
- Dell DA310 USB-C hub - now works with fallback
- Dell/Analogix Slimport adapter - continues to work with normal path

Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Link: https://patch.msgid.link/20251204024647.1462866-1-acelan.kao@canonical.com
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
include/drm/display/drm_dp_helper.h