summaryrefslogtreecommitdiff
path: root/hwc3/ComposerClient.cpp
diff options
context:
space:
mode:
authorMidas Chien <midaschieh@google.com>2022-01-27 14:31:14 +0800
committerMidas Chien <midaschieh@google.com>2022-02-15 18:49:31 +0800
commit91700d7c6e6cea728e3d8525745ddbf8a0517c98 (patch)
treeab49b4ec7ddbdb96e703e7e6cbdd791ed20cc6d4 /hwc3/ComposerClient.cpp
parent5e1092a20e899b269fb62bcd3f5d001ddbb37d37 (diff)
libhwc2.1: support setIdleTimerEnabled
Implement setIdleTimerEnabled to control kernel idle timer via HWC API. Bug: 198808492 Test: VTS (--gtest_filter=*SetIdleTimerEnabled_*) Test: check idle_delay_ms from sysnode match what HWC set Change-Id: Ia222101a4f0e440db3daf03cd798bf2e748259a5
Diffstat (limited to 'hwc3/ComposerClient.cpp')
-rw-r--r--hwc3/ComposerClient.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/hwc3/ComposerClient.cpp b/hwc3/ComposerClient.cpp
index 848d1f7..49d0e80 100644
--- a/hwc3/ComposerClient.cpp
+++ b/hwc3/ComposerClient.cpp
@@ -162,6 +162,16 @@ ndk::ScopedAStatus ComposerClient::getDisplayCapabilities(int64_t display,
return TO_BINDER_STATUS(err);
}
+ bool support = false;
+ err = mHal->getDisplayIdleTimerSupport(display, support);
+ if (err != ::android::OK) {
+ LOG(ERROR) << "failed to getDisplayIdleTimerSupport: " << err;
+ }
+
+ if (support) {
+ caps->push_back(DisplayCapability::DISPLAY_IDLE_TIMER);
+ }
+
return TO_BINDER_STATUS(err);
}