mirror of
https://github.com/Evolution-X-Devices/device_google_zuma
synced 2026-02-01 07:40:34 +00:00
Merge "usb: handle displayport debounce timer empty reads" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
2c21455b27
@@ -1724,8 +1724,10 @@ void *displayPortPollWork(void *param) {
|
||||
std::vector<PortStatus> currentPortStatus;
|
||||
ret = read(usb->mDisplayPortDebounceTimer, &res, sizeof(res));
|
||||
ALOGI("usbdp: dp debounce triggered, val:%lu ret:%d", res, ret);
|
||||
if (ret < 0)
|
||||
ALOGE("usbdp: debounce read errno:%d", errno);
|
||||
if (ret < 0) {
|
||||
ALOGW("usbdp: debounce read error:%d", errno);
|
||||
continue;
|
||||
}
|
||||
queryVersionHelper(usb, ¤tPortStatus);
|
||||
} else if (events[n].data.fd == usb->mDisplayPortActivateTimer) {
|
||||
string activePartner, activePort;
|
||||
@@ -1776,6 +1778,7 @@ void *displayPortPollWork(void *param) {
|
||||
|
||||
error:
|
||||
/* Need to disarm so new threads don't get old event */
|
||||
armTimerFdHelper(usb->mDisplayPortDebounceTimer, 0);
|
||||
armTimerFdHelper(usb->mDisplayPortActivateTimer, 0);
|
||||
close(link_training_status_fd);
|
||||
link_training_status_fd_error:
|
||||
|
||||
Reference in New Issue
Block a user