diff options
Diffstat (limited to 'libhwc2.1')
-rw-r--r-- | libhwc2.1/Android.mk | 1 | ||||
-rw-r--r-- | libhwc2.1/libdevice/HistogramController.cpp | 21 | ||||
-rw-r--r-- | libhwc2.1/libdevice/HistogramController.h | 23 | ||||
-rw-r--r-- | libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp | 5 |
4 files changed, 50 insertions, 0 deletions
diff --git a/libhwc2.1/Android.mk b/libhwc2.1/Android.mk index de43986..a04375b 100644 --- a/libhwc2.1/Android.mk +++ b/libhwc2.1/Android.mk @@ -15,6 +15,7 @@ LOCAL_SRC_FILES += \ ../../$(TARGET_BOARD_PLATFORM)/libhwc2.1/libcolormanager/DisplayColorModule.cpp \ ../../$(TARGET_BOARD_PLATFORM)/libhwc2.1/libdevice/ExynosDeviceModule.cpp \ + ../../$(TARGET_BOARD_PLATFORM)/libhwc2.1/libdevice/HistogramController.cpp \ ../../$(TARGET_BOARD_PLATFORM)/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp \ ../../$(TARGET_BOARD_PLATFORM)/libhwc2.1/libresource/ExynosMPPModule.cpp \ ../../$(TARGET_BOARD_PLATFORM)/libhwc2.1/libresource/ExynosResourceManagerModule.cpp \ diff --git a/libhwc2.1/libdevice/HistogramController.cpp b/libhwc2.1/libdevice/HistogramController.cpp new file mode 100644 index 0000000..137fd61 --- /dev/null +++ b/libhwc2.1/libdevice/HistogramController.cpp @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "HistogramController.h" + +void HistogramController::initSupportSamplePosList() { + mHistogramCapability.supportSamplePosList.push_back(HistogramSamplePos::POST_POSTPROC); +} diff --git a/libhwc2.1/libdevice/HistogramController.h b/libhwc2.1/libdevice/HistogramController.h new file mode 100644 index 0000000..988e6e3 --- /dev/null +++ b/libhwc2.1/libdevice/HistogramController.h @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "HistogramDevice.h" + +class HistogramController : public HistogramDevice { +public: + HistogramController(ExynosDisplay *display) : HistogramDevice(display, 1, {}) {} + virtual void initSupportSamplePosList() override; +}; diff --git a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp index 7301370..e21999c 100644 --- a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp +++ b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp @@ -708,6 +708,7 @@ int32_t ExynosPrimaryDisplayModule::updateColorConversionInfo() return ret; } + updateBrightnessState(); /* clear flag and layer mapping info before setting */ mDisplaySceneInfo.reset(); @@ -759,6 +760,10 @@ int32_t ExynosPrimaryDisplayModule::updatePresentColorConversionInfo() if (refresh_rate > 0) { mDisplaySceneInfo.displayScene.refresh_rate = refresh_rate; } + auto operation_rate = moduleDisplayInterface->getOperationRate(); + if (operation_rate > 0) { + mDisplaySceneInfo.displayScene.operation_rate = static_cast<uint32_t>(operation_rate); + } mDisplaySceneInfo.displayScene.lhbm_on = mBrightnessController->isLhbmOn(); mDisplaySceneInfo.displayScene.dbv = mBrightnessController->getBrightnessLevel(); |