summaryrefslogtreecommitdiff
path: root/hwc3/impl/HalImpl.cpp
diff options
context:
space:
mode:
authorMidas Chien <midaschieh@google.com>2022-02-16 10:44:21 +0000
committerMidas Chien <midaschieh@google.com>2022-02-17 13:29:23 +0800
commit1fbbdedc5425e4dfc06d39ee881ebda6aacd9b74 (patch)
tree6c86cc81954e4c13eb22a78e457f820d2f00c2a7 /hwc3/impl/HalImpl.cpp
parent0ec8e120c9b88fb7dc7f590e23914dd8267a5941 (diff)
Revert "Revert "libhwc2.1: support setIdleTimerEnabled""
This reverts commit 13c602ef2fa6ec36e9ec02633ec7727fd4427d3c. Reason for revert: avc denied is addressed in another patch Bug: 219857957 Bug: 198808492 Test: composer access panel_idle withou avc denied Change-Id: If1753cde988d8e2c755168bbc174da9faf138b91
Diffstat (limited to 'hwc3/impl/HalImpl.cpp')
-rw-r--r--hwc3/impl/HalImpl.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/hwc3/impl/HalImpl.cpp b/hwc3/impl/HalImpl.cpp
index 1a56cfa..17fc4b2 100644
--- a/hwc3/impl/HalImpl.cpp
+++ b/hwc3/impl/HalImpl.cpp
@@ -941,12 +941,11 @@ int32_t HalImpl::setVsyncEnabled(int64_t display, bool enabled) {
return halDisplay->setVsyncEnabled(hwcEnable);
}
-int32_t HalImpl::setIdleTimerEnabled(int64_t display, int32_t __unused timeout) {
+int32_t HalImpl::setIdleTimerEnabled(int64_t display, int32_t timeout) {
ExynosDisplay* halDisplay;
RET_IF_ERR(getHalDisplay(display, halDisplay));
- // TODO(b/198808492): implement setIdleTimerEnabled
- return HWC2_ERROR_UNSUPPORTED;
+ return halDisplay->setDisplayIdleTimer(timeout);
}
int32_t HalImpl::validateDisplay(int64_t display, std::vector<int64_t>* outChangedLayers,
@@ -1016,4 +1015,11 @@ int32_t HalImpl::getRCDLayerSupport(int64_t display, bool& outSupport) {
return halDisplay->getRCDLayerSupport(outSupport);
}
+int32_t HalImpl::getDisplayIdleTimerSupport(int64_t display, bool& outSupport) {
+ ExynosDisplay* halDisplay;
+ RET_IF_ERR(getHalDisplay(display, halDisplay));
+
+ return halDisplay->getDisplayIdleTimerSupport(outSupport);
+}
+
} // namespace aidl::android::hardware::graphics::composer3::impl