summaryrefslogtreecommitdiff
path: root/sdm/libs/hwc2/hwc_session.cpp
diff options
context:
space:
mode:
authorRajavenu Kyatham <rkyatham@codeaurora.org>2019-02-13 15:29:55 +0530
committerRavikanth Tuniki <rtunik@codeaurora.org>2019-04-04 13:24:58 +0530
commit930b5d408d52987f70e3b870c50e22fe24d0ae74 (patch)
tree8a39d89bac1745ed5596fddccf941d92246d3cc2 /sdm/libs/hwc2/hwc_session.cpp
parente05ff195108ad7caefa81871ca7af67ec4d3cc84 (diff)
sdm: Couple doze mode transition to commit.
Repeating previous commit on doze state transition can result in fetching content from stale buffers. Cache the power state and trigger a refresh for transition to take effect. CRs-Fixed: 2335745 Change-Id: I8508d64a55c3b30239c6ed2886df391407d22f25
Diffstat (limited to 'sdm/libs/hwc2/hwc_session.cpp')
-rw-r--r--sdm/libs/hwc2/hwc_session.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/sdm/libs/hwc2/hwc_session.cpp b/sdm/libs/hwc2/hwc_session.cpp
index 525bef18..fe6bec54 100644
--- a/sdm/libs/hwc2/hwc_session.cpp
+++ b/sdm/libs/hwc2/hwc_session.cpp
@@ -974,6 +974,12 @@ int32_t HWCSession::SetPowerMode(hwc2_device_t *device, hwc2_display_t display,
hwc_session->UpdateVsyncSource();
hwc_session->UpdateThrottlingRate();
+
+ // Trigger refresh for doze mode to take effect.
+ if (mode == HWC2::PowerMode::Doze) {
+ hwc_session->Refresh(display);
+ }
+
return HWC2_ERROR_NONE;
}