Query the port partner's SVIDs when the DisplayPort driver sysfs
is not recognized so that the USB HAL can identify whether or not
the port partner supports Thunderbolt.
Test: manual verification on device - test to see that cableStatus
is set to NOT_CAPABLE on hub that supports Thunderbolt but not
DisplayPort Alt Mode. Then verify that device not capable of being
a DisplayPort sink but does support Thunderbolt does not trigger
this status.
Bug: 288150501
Change-Id: Iaba60ecc5510acecee1e1d3241611906c738a263
Signed-off-by: RD Babiera <rdbabiera@google.com>
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:873766c6f0c668ba526eaefe18ecc5e51ce87d67)
Adds functionality for enabling and disabling DisplayPort Alt Mode
on the port through enableUsbData in the USB HAL to comply with USB
restrictions for heightened security mode.
Test: manual test on device - use enableUsbData dumpsys command to
turn off DisplayPort and then turn it back on while connected to a
partner sink.
Bug: 297208252
Change-Id: I9f071bce802b728f2229abc08efb2204e4c2505a
Signed-off-by: RD Babiera <rdbabiera@google.com>
If Usb.cpp cannot write a zero value to the USB_DATA_PATH file, display
the message of "Not able to turn off usb connection notification".
Test: refactoring CL. Existing tests still pass.
Bug: 301016122
Change-Id: I4e2a920a67b022496c5332d260ff53cd6400a9f9
Populates AltModeData within PortStatus with DisplayPort
Alt Mode statuses for pin assignment, hpd, link training
status, and port partner capability.
Test: manual test on device
Bug: 297286558
Change-Id: I52a56f7090ed6dbef6211f19d6350cecac58e4fa
(cherry picked from commit c2c37bf3a81e4138bd2c0e82275d363dce2220ec)
Signed-off-by: RD Babiera <rdbabiera@google.com>
Better enforces that only one DisplayPort poll thread should be
active at once. If a new call to setup is made from additional
bind uevents before a disconnect occurs, tells the old thread
to shutdown and awaits signaling before a new worker thread spins
up.
Test: manual testing on device
Bug: 286593610
Change-Id: I1707970c500915fd4abb161d0b3a424bbb2bddca
(cherrypicked from commit 78f6294e381ca4df70b28d1d0f07aff77b73574c)
Signed-off-by: RD Babiera <rdbabiera@google.com>
When booting check whether displayport driver has been probed and
signal hpd events as needed. Pin config and orientation needs to
be queried before signalling hpd.
Test: Manual verification on device
Bug: 297286558
Change-Id: Iddb0921b363e49c41c0f6f635887b4daf4d19561
(cherry picked from commit 574d046bd7c3a2d81f48caf3881a61ad0d283e9a)
Signed-off-by: RD Babiera <rdbabiera@google.com>
Monitor typec stack for irq_hpd events and signal irq_hpd when the
irq_hpd counter value read is not the same as the previously cached
value.
Test: Manual verification on device
Bug: 297286558
Change-Id: Id4a72afcf85550cabbc2f9469bb0ccb92cd02ad2
(cherry picked from commit 412f31194c8b169806a2c0df85ef6bf69cf7af0b)
Signed-off-by: RD Babiera <rdbabiera@google.com>
Passes usb object reference to thread creation of
mDisplayPortShutdownHelper so that it can properly call DisplayPort
shutdown method instead of calling on NULL reference.
Test: manual test on device
Bug: 297286558
Change-Id: Ie4dabb5e3ae9065f57cc0fbf2593fbe399097472
(cherry picked from commit cc50d9950807280653973a0dd9cd3b22e323bcd5)
Signed-off-by: RD Babiera <rdbabiera@google.com>
Write pin assignment, hpd, and orientation from type-c class to
drmdp platform device attributes using epoll when displayport
driver binds to device, and determine whether or not to shut down
epoll on displayport driver change uevents.
Test: manual testing with form factor device
Bug: 297286558
(cherry picked from commit de0fc9d2201685b5eb4c3905e652911b192a542f)
Change-Id: Iec9fc76166481a4611bb2fc023aea044b497f2c0
Signed-off-by: RD Babiera <rdbabiera@google.com>