diff options
| author | 2022-08-16 11:49:27 -0700 | |
|---|---|---|
| committer | 2022-08-16 11:49:27 -0700 | |
| commit | 91192c8103e78895c57d9da1fc04c8695898580f (patch) | |
| tree | 9a4deff758bed03ccc5ff838dc55f467c303d762 /libs/ui/Fence.cpp | |
| parent | 896cdca96956b6f14e262380b34a0b04e1214b50 (diff) | |
| parent | a7459772bbc558b8b13df09de8b0cea156d81870 (diff) | |
DO NOT MERGE - Merge Android 13
Bug: 242648940
Merged-In: Ia3eae81cc26b28b0d25dc5f5c6cd04ec8c1bafdf
Change-Id: Icd8e5ea85bfed76d58c81368d94dd1f6101fc087
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; |