summaryrefslogtreecommitdiff
path: root/hwc3/impl/HalImpl.cpp
diff options
context:
space:
mode:
authorMidas Chien <midaschieh@google.com>2022-01-14 15:40:55 +0800
committerMidas Chien <midaschieh@google.com>2022-01-20 15:23:24 +0800
commit31a49697eddaa89388cc223d76021a02490c22f6 (patch)
tree0deaf8cf6b1b834dfc30595a9bcd6f5620cc7b4f /hwc3/impl/HalImpl.cpp
parentca14fd522f8cf02766bee9180b40069d0ad16adc (diff)
hwc3: add setIdleTimerEnabled and vsyncIdle callback
Bug: 194068871 Bug: 198808492 Test: build, vts Change-Id: Ia55c4069246d3aac08b8f0ec5653bbdc684db42c
Diffstat (limited to 'hwc3/impl/HalImpl.cpp')
-rw-r--r--hwc3/impl/HalImpl.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/hwc3/impl/HalImpl.cpp b/hwc3/impl/HalImpl.cpp
index ea632f3..bc52cb8 100644
--- a/hwc3/impl/HalImpl.cpp
+++ b/hwc3/impl/HalImpl.cpp
@@ -81,6 +81,14 @@ void vsyncPeriodTimingChanged(hwc2_callback_data_t callbackData,
hal->getEventCallback()->onVsyncPeriodTimingChanged(display, timeline);
}
+void vsyncIdle(hwc2_callback_data_t callbackData, hwc2_display_t hwcDisplay) {
+ auto hal = static_cast<HalImpl*>(callbackData);
+ int64_t display;
+
+ h2a::translate(hwcDisplay, display);
+ hal->getEventCallback()->onVsyncIdle(display);
+}
+
void seamlessPossible(hwc2_callback_data_t callbackData, hwc2_display_t hwcDisplay) {
auto hal = static_cast<HalImpl*>(callbackData);
int64_t display;
@@ -925,6 +933,14 @@ int32_t HalImpl::setVsyncEnabled(int64_t display, bool enabled) {
return halDisplay->setVsyncEnabled(hwcEnable);
}
+int32_t HalImpl::setIdleTimerEnabled(int64_t display, int32_t __unused timeout) {
+ ExynosDisplay* halDisplay;
+ RET_IF_ERR(getHalDisplay(display, halDisplay));
+
+ // TODO(b/198808492): implement setIdleTimerEnabled
+ return HWC2_ERROR_UNSUPPORTED;
+}
+
int32_t HalImpl::validateDisplay(int64_t display, std::vector<int64_t>* outChangedLayers,
std::vector<Composition>* outCompositionTypes,
uint32_t* outDisplayRequestMask,