diff options
author | Sergey Volk <servolk@google.com> | 2023-10-20 23:15:18 +0000 |
---|---|---|
committer | Sergey Volk <servolk@google.com> | 2023-10-26 00:07:16 +0000 |
commit | cd3baa3b108294e0e4c8c55b2eca81528e2ace91 (patch) | |
tree | 9f69f880d307e65df634e3937ce2bfda00b9c0eb | |
parent | 6f7c830755a1c053677e725adaed7476833656ca (diff) | |
download | gs101-cd3baa3b108294e0e4c8c55b2eca81528e2ace91.tar.gz |
displaycolor: Add init of color pipeline for external display
When hardware composer initializes libdisplaycolor, it provides a list
of displays, that currently includes only primary displays, but we want
to support color management for external display too, so make sure the
external display info is included into the display_info collection.
Also there's no brightness controller for external display, so move
the brightness_range initialization to the primary display path.
Bug: 288608645
Test: build and boot a device
Change-Id: Iac7a1b6e32367a7610aad25a0de0b5d488276031
-rw-r--r-- | libhwc2.1/libdevice/ExynosDeviceModule.cpp | 2 | ||||
-rw-r--r-- | libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterfaceModule.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libhwc2.1/libdevice/ExynosDeviceModule.cpp b/libhwc2.1/libdevice/ExynosDeviceModule.cpp index 2af614b..5501247 100644 --- a/libhwc2.1/libdevice/ExynosDeviceModule.cpp +++ b/libhwc2.1/libdevice/ExynosDeviceModule.cpp @@ -29,7 +29,7 @@ ExynosDeviceModule::ExynosDeviceModule() : ExynosDevice(), mDisplayColorLoader(D std::vector<displaycolor::DisplayInfo> display_info; for (uint32_t i = 0; i < mDisplays.size(); i++) { ExynosDisplay* display = mDisplays[i]; - if (display->mType == HWC_DISPLAY_PRIMARY) { + if (display->mType == HWC_DISPLAY_PRIMARY || display->mType == HWC_DISPLAY_EXTERNAL) { ExynosDisplayDrmInterfaceModule* moduleDisplayInterface = (ExynosDisplayDrmInterfaceModule*)(display->mDisplayInterface.get()); moduleDisplayInterface->getDisplayInfo(display_info); diff --git a/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterfaceModule.cpp b/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterfaceModule.cpp index 5e19626..c469ec8 100644 --- a/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterfaceModule.cpp +++ b/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterfaceModule.cpp @@ -442,8 +442,8 @@ void ExynosDisplayDrmInterfaceModule::getDisplayInfo( std::vector<displaycolor::DisplayInfo> &display_info) { displaycolor::DisplayInfo disp_info; - disp_info.brightness_ranges = mExynosDisplay->mBrightnessController->getBrightnessRanges(); if (mExynosDisplay->mType == HWC_DISPLAY_PRIMARY) { + disp_info.brightness_ranges = mExynosDisplay->mBrightnessController->getBrightnessRanges(); disp_info.panel_name = GetPanelName(); disp_info.panel_serial = GetPanelSerial(); if (mExynosDisplay->mIndex == 0) |