1 /* 2 * Copyright (C) 2019 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #include "ExynosDeviceModule.h" 18 19 #include "ExynosDisplayDrmInterfaceModule.h" 20 21 extern struct exynos_hwc_control exynosHWCControl; 22 23 using namespace gs101; 24 ExynosDeviceModule()25ExynosDeviceModule::ExynosDeviceModule() : ExynosDevice(), mDisplayColorLoader(DISPLAY_COLOR_LIB) { 26 exynosHWCControl.skipStaticLayers = false; 27 28 std::vector<displaycolor::DisplayInfo> display_info; 29 for (uint32_t i = 0; i < mDisplays.size(); i++) { 30 ExynosDisplay* display = mDisplays[i]; 31 ExynosDisplayDrmInterfaceModule* moduleDisplayInterface = 32 (ExynosDisplayDrmInterfaceModule*)(display->mDisplayInterface.get()); 33 34 moduleDisplayInterface->getDisplayInfo(display_info); 35 } 36 initDisplayColor(display_info); 37 } 38 ~ExynosDeviceModule()39ExynosDeviceModule::~ExynosDeviceModule() { 40 } 41 initDisplayColor(const std::vector<displaycolor::DisplayInfo> & display_info)42int ExynosDeviceModule::initDisplayColor( 43 const std::vector<displaycolor::DisplayInfo>& display_info) { 44 mDisplayColorInterface = mDisplayColorLoader.GetDisplayColorGS101(display_info); 45 if (mDisplayColorInterface == nullptr) { 46 ALOGW("%s failed to load displaycolor", __func__); 47 } 48 49 return NO_ERROR; 50 } 51