summaryrefslogtreecommitdiff
path: root/hwc3/impl/HalImpl.cpp
diff options
context:
space:
mode:
authorMidas Chien <midaschieh@google.com>2021-12-08 23:48:24 +0800
committerMidas Chien <midaschieh@google.com>2021-12-20 14:32:36 +0800
commitf72a3bba89df212d83ff0f94e23e7cef8bc4c231 (patch)
treee65825542e162d230db2633dfe88cc1470d082d6 /hwc3/impl/HalImpl.cpp
parent289ef553add5ac6a8e416b2c25429fa270c27d9b (diff)
hwc3: do acceptDisplayChanges if display is validated
When presentDisplay is called after validateDisplay without call acceptDisplayChanges, call acceptDisplayChanges in presentDisplay. Bug: 207005096 Test: VtsHalGraphicsComposer3_TargetTest Change-Id: I98270aecd82a4d5cdbf2e514567dca5ac3b953e9
Diffstat (limited to 'hwc3/impl/HalImpl.cpp')
-rw-r--r--hwc3/impl/HalImpl.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/hwc3/impl/HalImpl.cpp b/hwc3/impl/HalImpl.cpp
index 45dfa32..f79073b 100644
--- a/hwc3/impl/HalImpl.cpp
+++ b/hwc3/impl/HalImpl.cpp
@@ -536,6 +536,16 @@ int32_t HalImpl::presentDisplay(int64_t display, ndk::ScopedFileDescriptor& fenc
ExynosDisplay* halDisplay;
RET_IF_ERR(getHalDisplay(display, halDisplay));
+ // TODO: not expect acceptDisplayChanges if there are no changes to accept
+ if (halDisplay->mRenderingState == RENDERING_STATE_VALIDATED) {
+ LOG(INFO) << halDisplay->mDisplayName.string()
+ << ": acceptDisplayChanges was not called";
+ if (halDisplay->acceptDisplayChanges() != HWC2_ERROR_NONE) {
+ LOG(ERROR) << halDisplay->mDisplayName.string()
+ << ": acceptDisplayChanges is failed";
+ }
+ }
+
int32_t hwcFence;
RET_IF_ERR(halDisplay->presentDisplay(&hwcFence));
h2a::translate(hwcFence, fence);