hwc2: Return error when idle pc is enabled/disabled during suspend
Change-Id: I240043880395c2f727674b951a1875ee9bf90284
CRs-Fixed: 2337831
diff --git a/sdm/libs/hwc2/hwc_display_builtin.cpp b/sdm/libs/hwc2/hwc_display_builtin.cpp
index e242128..b368ca7 100644
--- a/sdm/libs/hwc2/hwc_display_builtin.cpp
+++ b/sdm/libs/hwc2/hwc_display_builtin.cpp
@@ -755,15 +755,14 @@
return HWC2::Error::None;
}
-HWC2::Error HWCDisplayBuiltIn::ControlIdlePowerCollapse(bool enable, bool synchronous) {
+DisplayError 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;
+ return error;
}
} // namespace sdm