summaryrefslogtreecommitdiff
path: root/libs/ui/Fence.cpp
diff options
context:
space:
mode:
author Xin Li <delphij@google.com> 2022-08-16 19:08:21 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2022-08-16 19:08:21 +0000
commit44732cde9e19a005def5e110140963a5c2e2f5ae (patch)
tree9a4deff758bed03ccc5ff838dc55f467c303d762 /libs/ui/Fence.cpp
parent896cdca96956b6f14e262380b34a0b04e1214b50 (diff)
parent91192c8103e78895c57d9da1fc04c8695898580f (diff)
Merge "DO NOT MERGE - Merge Android 13"
Diffstat (limited to 'libs/ui/Fence.cpp')
-rw-r--r--libs/ui/Fence.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/ui/Fence.cpp b/libs/ui/Fence.cpp
index 33ab7c470e..cc96f83578 100644
--- a/libs/ui/Fence.cpp
+++ b/libs/ui/Fence.cpp
@@ -132,9 +132,13 @@ nsecs_t Fence::getSignalTime() const {
ALOGE("sync_file_info returned NULL for fd %d", mFenceFd.get());
return SIGNAL_TIME_INVALID;
}
+
if (finfo->status != 1) {
+ const auto status = finfo->status;
+ ALOGE_IF(status < 0, "%s: sync_file_info contains an error: <%d> for fd: <%d>", __func__,
+ status, mFenceFd.get());
sync_file_info_free(finfo);
- return SIGNAL_TIME_PENDING;
+ return status < 0 ? SIGNAL_TIME_INVALID : SIGNAL_TIME_PENDING;
}
uint64_t timestamp = 0;