diff options
author | David Ung <davidu@nvidia.com> | 2016-01-20 23:32:53 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-01-20 23:32:53 +0000 |
commit | 70e2bef4cf352601628c1dec2650f7bd2934b6c7 (patch) | |
tree | d4ea10df375a983f4a099e9ed97eaea715811ade | |
parent | 269f3111af526e6f31748dc37067ca1065c0c95a (diff) | |
parent | 49d657d512b033addd8926eff7e735d6d36e641b (diff) | |
download | drm_hwcomposer-70e2bef4cf352601628c1dec2650f7bd2934b6c7.tar.gz |
drm_hwcomposer: Increase fence timeout upto 5x
am: 49d657d512
* commit '49d657d512b033addd8926eff7e735d6d36e641b':
drm_hwcomposer: Increase fence timeout upto 5x
-rw-r--r-- | drmdisplaycompositor.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp index 29ecc75..1012828 100644 --- a/drmdisplaycompositor.cpp +++ b/drmdisplaycompositor.cpp @@ -664,11 +664,14 @@ int DrmDisplayCompositor::CommitFrame(DrmDisplayComposition *display_comp, DrmHwcLayer &layer = layers[comp_plane.source_layer]; if (!test_only && layer.acquire_fence.get() >= 0) { int acquire_fence = layer.acquire_fence.get(); + int total_fence_timeout = 0; for (int i = 0; i < kAcquireWaitTries; ++i) { - ret = sync_wait(acquire_fence, kAcquireWaitTimeoutMs); + int fence_timeout = kAcquireWaitTimeoutMs * (1 << i); + total_fence_timeout += fence_timeout; + ret = sync_wait(acquire_fence, fence_timeout); if (ret) ALOGW("Acquire fence %d wait %d failed (%d). Total time %d", - acquire_fence, i, ret, (i + 1) * kAcquireWaitTimeoutMs); + acquire_fence, i, ret, total_fence_timeout); } if (ret) { ALOGE("Failed to wait for acquire %d/%d", acquire_fence, ret); |