summaryrefslogtreecommitdiffstats
path: root/sdm/libs/core/display_primary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sdm/libs/core/display_primary.cpp')
-rw-r--r--sdm/libs/core/display_primary.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/sdm/libs/core/display_primary.cpp b/sdm/libs/core/display_primary.cpp
index ba83d05c..4326d8ea 100644
--- a/sdm/libs/core/display_primary.cpp
+++ b/sdm/libs/core/display_primary.cpp
@@ -416,5 +416,18 @@ void DisplayPrimary::ResetPanel() {
}
}
+DisplayError DisplayPrimary::ControlIdlePowerCollapse(bool enable, bool synchronous) {
+ lock_guard<recursive_mutex> obj(recursive_mutex_);
+ if (!active_) {
+ DLOGW("Invalid display state = %d. Panel must be on.", state_);
+ return kErrorPermission;
+ }
+ if (hw_panel_info_.mode == kModeVideo) {
+ DLOGW("Idle power collapse not supported for video mode panel.");
+ return kErrorNotSupported;
+ }
+ return hw_intf_->ControlIdlePowerCollapse(enable, synchronous);
+}
+
} // namespace sdm