diff options
author | 2022-08-16 19:08:21 +0000 | |
---|---|---|
committer | 2022-08-16 19:08:21 +0000 | |
commit | 44732cde9e19a005def5e110140963a5c2e2f5ae (patch) | |
tree | 9a4deff758bed03ccc5ff838dc55f467c303d762 /libs/ui/Fence.cpp | |
parent | 896cdca96956b6f14e262380b34a0b04e1214b50 (diff) | |
parent | 91192c8103e78895c57d9da1fc04c8695898580f (diff) |
Merge "DO NOT MERGE - Merge Android 13"
Diffstat (limited to 'libs/ui/Fence.cpp')
-rw-r--r-- | libs/ui/Fence.cpp | 6 |
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; |