summaryrefslogtreecommitdiff
path: root/libhwc2.1/pixel-display.cpp
diff options
context:
space:
mode:
authorlinpeter <linpeter@google.com>2022-09-12 15:59:25 +0800
committerlinpeter <linpeter@google.com>2022-10-03 23:51:59 +0800
commit233a84b6bb2170d3330ef549f87b1313826aa51c (patch)
treefa1b567f075b42e48f70199a9667a0c623ef6fbd /libhwc2.1/pixel-display.cpp
parent9c5b796746c5a0ffbfd71681e6df3886f6125c57 (diff)
hwc: dim brightness support
Bug: 241969007 test: enable/disable dim brightness mode adb shell vndservice call Exynos.HWCService 1009 i32 0 i32 1 adb shell vndservice call Exynos.HWCService 1009 i32 0 i32 0 Change-Id: I2d5a3c75ef78c18779b4fe4b51c9e6b23c023cf8
Diffstat (limited to 'libhwc2.1/pixel-display.cpp')
-rw-r--r--libhwc2.1/pixel-display.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/libhwc2.1/pixel-display.cpp b/libhwc2.1/pixel-display.cpp
index d12e328..c95c239 100644
--- a/libhwc2.1/pixel-display.cpp
+++ b/libhwc2.1/pixel-display.cpp
@@ -260,6 +260,23 @@ ndk::ScopedAStatus Display::getPanelCalibrationStatus(PanelCalibrationStatus *_a
}
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
+
+ndk::ScopedAStatus Display::isDbmSupported(bool *_aidl_return) {
+ if (!mDisplay) {
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+ }
+ *_aidl_return = mDisplay->isDbmSupported();
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus Display::setDbmState(bool enabled) {
+ if (!mDisplay) {
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+ }
+ mDisplay->setDbmState(enabled);
+ return ndk::ScopedAStatus::ok();
+}
+
} // namespace display
} // namespace pixel
} // namespace hardware