From 045b22b208f00f23468e94f0f0ed6da23f46ed40 Mon Sep 17 00:00:00 2001 From: Ramkumar Radhakrishnan Date: Thu, 16 Aug 2018 15:10:55 -0700 Subject: hwc2: Wait for retire fence after populating it from layer stack Wait for retire fence and notify pmic about secure display end after populating the retire fence from layer stack. Change-Id: I61661d2b4939bbd184aeb8dac310ff156026800c CRs-Fixed: 2298981 --- sdm/libs/hwc2/hwc_display_primary.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sdm') diff --git a/sdm/libs/hwc2/hwc_display_primary.cpp b/sdm/libs/hwc2/hwc_display_primary.cpp index 56b612f6..9b5354c3 100644 --- a/sdm/libs/hwc2/hwc_display_primary.cpp +++ b/sdm/libs/hwc2/hwc_display_primary.cpp @@ -445,6 +445,11 @@ HWC2::Error HWCDisplayPrimary::GetReadbackBufferFence(int32_t *release_fence) { } HWC2::Error HWCDisplayPrimary::PostCommitLayerStack(int32_t *out_retire_fence) { + auto status = HWCDisplay::PostCommitLayerStack(out_retire_fence); + if (status != HWC2::Error::None) { + return status; + } + if (pmic_notification_pending_) { // Wait for current commit to complete if (*out_retire_fence >= 0) { @@ -456,7 +461,7 @@ HWC2::Error HWCDisplayPrimary::PostCommitLayerStack(int32_t *out_retire_fence) { pmic_intf_->Notify(false /* secure_display_start */); pmic_notification_pending_ = false; } - return HWCDisplay::PostCommitLayerStack(out_retire_fence); + return HWC2::Error::None; } int HWCDisplayPrimary::Perform(uint32_t operation, ...) { -- cgit v1.2.3