Commit aae861b8 authored by Malay Keshav's avatar Malay Keshav Committed by Commit Bot

List evdi displays as USB during touch pairing

When connecting touch devices via a USB-C cable, the touch-display
pairing may fail. This happens specifically when multiple external
displays are connected. The only way to resolve this is by performing
a manual calibration.

The default heuristic that pairs touch controllers and displays
connected via the USB fails since the display is actually connected
via the display link interface rather than the USB. The display is
thus listed as an evdi device when the pairing happens.

This patch changes the way we identify USB devices and lists evdi
displays as USB displays instead.

Bug: 925211
Change-Id: I2568d41360f6f23465fd28314d5602f29f562204
Component: Touch device manager, evdi, usb, pairing
Reviewed-on: https://chromium-review.googlesource.com/c/1435758
Commit-Queue: Malay Keshav <malaykeshav@chromium.org>
Reviewed-by: default avatarStéphane Marchesin <marcheu@chromium.org>
Reviewed-by: default avatarMichael Spang <spang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626169}
parent 37c22eb5
...@@ -35,10 +35,17 @@ bool IsDeviceConnectedViaUsb(const base::FilePath& path) { ...@@ -35,10 +35,17 @@ bool IsDeviceConnectedViaUsb(const base::FilePath& path) {
for (const auto& component : components) { for (const auto& component : components) {
if (base::StartsWith(component, "usb", if (base::StartsWith(component, "usb",
base::CompareCase::INSENSITIVE_ASCII)) base::CompareCase::INSENSITIVE_ASCII)) {
return true; return true;
} }
// TODO(malaykeshav): When evdi starts registering with the usb subsystem
// in the kernel, this would no longer be needed. All evdi displays are USB
// right now. This might change in the future however.
// See https://crbug.com/923165 for more info.
if (base::StartsWith(component, "evdi", base::CompareCase::SENSITIVE))
return true;
}
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment