sdm: Implement SetDisplayBrightness, GetDisplayBrightness
Change-Id: Ica0f0bbb2955ad26fa113728ee152a21e6014b6c
CRs-Fixed: 2454377
diff --git a/sdm/libs/hwc2/hwc_display_builtin.cpp b/sdm/libs/hwc2/hwc_display_builtin.cpp
index 146d968..da4fcd3 100644
--- a/sdm/libs/hwc2/hwc_display_builtin.cpp
+++ b/sdm/libs/hwc2/hwc_display_builtin.cpp
@@ -886,4 +886,21 @@
return HWC2::Error::None;
}
+HWC2::Error HWCDisplayBuiltIn::SetPanelBrightness(float brightness) {
+ DisplayError ret = display_intf_->SetPanelBrightness(brightness);
+ if (ret != kErrorNone) {
+ return HWC2::Error::NoResources;
+ }
+
+ return HWC2::Error::None;
+}
+
+HWC2::Error HWCDisplayBuiltIn::GetPanelBrightness(float *brightness) {
+ DisplayError ret = display_intf_->GetPanelBrightness(brightness);
+ if (ret != kErrorNone) {
+ return HWC2::Error::NoResources;
+ }
+
+ return HWC2::Error::None;
+}
} // namespace sdm