hwc: Retry vsync on EBUSY
The driver returns EBUSY if it is unable to complete the frame
within a timeout - this is a recoverable error
Change-Id: Ifde01c1d7515598a82d032c0ba869fa658b050a9
diff --git a/libhwcomposer/hwc_vsync.cpp b/libhwcomposer/hwc_vsync.cpp
index ee6af28..7f7bb1f 100644
--- a/libhwcomposer/hwc_vsync.cpp
+++ b/libhwcomposer/hwc_vsync.cpp
@@ -112,9 +112,11 @@
if(!fakevsync) {
for(int i = 0; i < MAX_RETRY_COUNT; i++) {
len = pread(fd_timestamp, vdata, MAX_DATA, 0);
- if(len < 0 && (errno == EAGAIN || errno == EINTR)) {
- ALOGW("%s: vsync read: EAGAIN, retry (%d/%d).",
- __FUNCTION__, i, MAX_RETRY_COUNT);
+ if(len < 0 && (errno == EAGAIN ||
+ errno == EINTR ||
+ errno == EBUSY)) {
+ ALOGW("%s: vsync read: %s, retry (%d/%d).",
+ __FUNCTION__, strerror(errno), i, MAX_RETRY_COUNT);
continue;
} else {
break;