From f72a3bba89df212d83ff0f94e23e7cef8bc4c231 Mon Sep 17 00:00:00 2001 From: Midas Chien Date: Wed, 8 Dec 2021 23:48:24 +0800 Subject: 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 --- hwc3/impl/HalImpl.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'hwc3/impl/HalImpl.cpp') 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); -- cgit v1.2.3