sdm: Define client interface to enable/disable idle pc
1. Define client interface to enable/disable idle power collapse
2. Maintain refcount to handle concurrent enable/disable
3. Trigger the screen refresh and wait for the next frame commit
done event before returning the control to the client on disable
idle pc
4. Enable idle pc on suspend and reset the refcount
5. Add binder support to enable/disable idle pc
CRs-Fixed: 2255316
Change-Id:Ibcaf9d4edca502cc91e9b201be822bd48313a635
diff --git a/sdm/libs/hwc2/hwc_display_builtin.cpp b/sdm/libs/hwc2/hwc_display_builtin.cpp
index c502c0e..cc02ad6 100644
--- a/sdm/libs/hwc2/hwc_display_builtin.cpp
+++ b/sdm/libs/hwc2/hwc_display_builtin.cpp
@@ -706,4 +706,15 @@
return HWC2::Error::None;
}
+HWC2::Error HWCDisplayBuiltIn::ControlIdlePowerCollapse(bool enable, bool synchronous) {
+ DisplayError error = kErrorNone;
+
+ if (display_intf_) {
+ error = display_intf_->ControlIdlePowerCollapse(enable, synchronous);
+ validated_ = false;
+ }
+
+ return (error != kErrorNone) ? HWC2::Error::Unsupported : HWC2::Error::None;
+}
+
} // namespace sdm