1// Copyright (C) 2012 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15// See: http://go/android-license-faq 16package { 17 default_applicable_licenses: ["hardware_google_graphics_common_libhwc2.1_license"], 18} 19 20license { 21 name: "hardware_google_graphics_common_libhwc2.1_license", 22 visibility: [":__subpackages__"], 23 license_kinds: [ 24 "SPDX-license-identifier-Apache-2.0", 25 ], 26 license_text: [ 27 "NOTICE", 28 ], 29} 30 31cc_library_shared { 32 name: "libdrmresource", 33 34 shared_libs: [ 35 "libcutils", 36 "libdrm", 37 "liblog", 38 "libutils", 39 "libhardware", 40 ], 41 proprietary: true, 42 local_include_dirs: ["libdrmresource/include"], 43 srcs: [ 44 "libdrmresource/utils/worker.cpp", 45 "libdrmresource/drm/resourcemanager.cpp", 46 "libdrmresource/drm/drmdevice.cpp", 47 "libdrmresource/drm/drmconnector.cpp", 48 "libdrmresource/drm/drmcrtc.cpp", 49 "libdrmresource/drm/drmencoder.cpp", 50 "libdrmresource/drm/drmmode.cpp", 51 "libdrmresource/drm/drmplane.cpp", 52 "libdrmresource/drm/drmproperty.cpp", 53 "libdrmresource/drm/drmeventlistener.cpp", 54 "libdrmresource/drm/vsyncworker.cpp", 55 ], 56 cflags: [ 57 "-DHLOG_CODE=0", 58 "-Wno-unused-parameter", 59 "-Wthread-safety", 60 ] + select(soong_config_variable("ANDROID", "target_board_platform"), { 61 any @ soc_ver: ["-DSOC_VERSION=" + soc_ver], 62 default: [], 63 }), 64 header_libs: [ 65 "device_kernel_headers", 66 ], 67 export_shared_lib_headers: ["libdrm"], 68 defaults: [ 69 "google_graphics_cc_default", 70 ], 71} 72 73// For converting libexynosdisplay 74filegroup { 75 name: "libexynosdisplay_common_srcs", 76 srcs: [ 77 "libhwchelper/ExynosHWCHelper.cpp", 78 "DisplaySceneInfo.cpp", 79 "ExynosHWCDebug.cpp", 80 "libdevice/BrightnessController.cpp", 81 "libdevice/ExynosDisplay.cpp", 82 "libdevice/ExynosDevice.cpp", 83 "libdevice/ExynosLayer.cpp", 84 "libdevice/HistogramDevice.cpp", 85 "libdevice/DisplayTe2Manager.cpp", 86 "libmaindisplay/ExynosPrimaryDisplay.cpp", 87 "libresource/ExynosMPP.cpp", 88 "libresource/ExynosResourceManager.cpp", 89 "libexternaldisplay/ExynosExternalDisplay.cpp", 90 "libvirtualdisplay/ExynosVirtualDisplay.cpp", 91 "libdisplayinterface/ExynosDeviceInterface.cpp", 92 "libdisplayinterface/ExynosDisplayInterface.cpp", 93 "libdisplayinterface/ExynosDeviceDrmInterface.cpp", 94 "libdisplayinterface/ExynosDisplayDrmInterface.cpp", 95 "libvrr/display/common/CommonDisplayContextProvider.cpp", 96 "libvrr/display/exynos/ExynosDisplayContextProvider.cpp", 97 "libvrr/Power/PowerStatsProfileTokenGenerator.cpp", 98 "libvrr/Power/DisplayStateResidencyProvider.cpp", 99 "libvrr/Power/DisplayStateResidencyWatcher.cpp", 100 "libvrr/FileNode.cpp", 101 "libvrr/RefreshRateCalculator/InstantRefreshRateCalculator.cpp", 102 "libvrr/RefreshRateCalculator/ExitIdleRefreshRateCalculator.cpp", 103 "libvrr/RefreshRateCalculator/PeriodRefreshRateCalculator.cpp", 104 "libvrr/RefreshRateCalculator/CombinedRefreshRateCalculator.cpp", 105 "libvrr/RefreshRateCalculator/RefreshRateCalculatorFactory.cpp", 106 "libvrr/RefreshRateCalculator/VideoFrameRateCalculator.cpp", 107 "libvrr/Statistics/VariableRefreshRateStatistic.cpp", 108 "libvrr/Utils.cpp", 109 "libvrr/VariableRefreshRateController.cpp", 110 "libvrr/VariableRefreshRateVersion.cpp", 111 "pixel-display.cpp", 112 "pixelstats-display.cpp", 113 "histogram_mediator.cpp", 114 ], 115} 116 117filegroup { 118 name: "pixel_display_default_xml", 119 srcs: [ 120 "pixel-display-default.xml", 121 ], 122} 123 124filegroup { 125 name: "pixel_display_secondary_xml", 126 srcs: [ 127 "pixel-display-secondary.xml", 128 ], 129} 130 131cc_defaults { 132 name: "libexynosdisplay_common_cc_default", 133 134 shared_libs: [ 135 "liblog", 136 "libcutils", 137 "libhardware", 138 "[email protected]", 139 "[email protected]", 140 "[email protected]", 141 "libhardware_legacy", 142 "libutils", 143 "libsync", 144 "libacryl", 145 "libui", 146 "libion_google", 147 "libdrmresource", 148 "libdrm", 149 "libvendorgraphicbuffer", 150 "libbinder_ndk", 151 "android.hardware.power-V2-ndk", 152 "//hardware/google/interfaces:pixel-power-ext-V1-ndk", 153 "//hardware/google/pixel:pixel_stateresidency_provider_aidl_interface-ndk", 154 "android.hardware.graphics.composer3-V4-ndk", 155 "android.hardware.drm-V1-ndk", 156 "//hardware/google/interfaces:com.google.hardware.pixel.display-V13-ndk", 157 "android.frameworks.stats-V2-ndk", 158 "//hardware/google/pixel:libpixelatoms_defs", 159 "//hardware/google/pixel:pixelatoms-cpp", 160 "libbinder_ndk", 161 "libbase", 162 "libpng", 163 "libprocessgroup", 164 ], 165 166 header_libs: [ 167 "device_kernel_headers", 168 "google_hal_headers", 169 "libbinder_headers", 170 "//hardware/google/gchips/gralloc4:libgralloc_headers", 171 "libhardware_legacy_headers", 172 ], 173 174 static_libs: [ 175 "libVendorVideoApi", 176 "libjsoncpp", 177 "libaidlcommonsupport", 178 ], 179 proprietary: true, 180 181 include_dirs: [ 182 "hardware/google/graphics/common/include", 183 "hardware/google/graphics/common/libhwc2.1", 184 "hardware/google/graphics/common/libhwc2.1/libdevice", 185 "hardware/google/graphics/common/libhwc2.1/libmaindisplay", 186 "hardware/google/graphics/common/libhwc2.1/libexternaldisplay", 187 "hardware/google/graphics/common/libhwc2.1/libvirtualdisplay", 188 "hardware/google/graphics/common/libhwc2.1/libhwchelper", 189 "hardware/google/graphics/common/libhwc2.1/libresource", 190 "hardware/google/graphics/common/libhwc2.1/libhwcService", 191 "hardware/google/graphics/common/libhwc2.1/libdisplayinterface", 192 "hardware/google/graphics/common/libhwc2.1/libdrmresource/include", 193 "hardware/google/graphics/common/libhwc2.1/libvrr", 194 "hardware/google/graphics/common/libhwc2.1/libvrr/interface", 195 ], 196 197 srcs: [ 198 ":libexynosdisplay_common_srcs", 199 ], 200 201 export_shared_lib_headers: [ 202 "libacryl", 203 "libdrm", 204 "libui", 205 "libvendorgraphicbuffer", 206 ], 207 208 vintf_fragments: [ 209 ":pixel_display_default_xml", 210 ] + select(soong_config_variable("google_graphics", "uses_idisplay_intf_sec"), { 211 true: [":pixel_display_secondary_xml"], 212 default: [], 213 }), 214 215 cflags: [ 216 "-DHLOG_CODE=0", 217 "-DLOG_TAG=\"hwc-display\"", 218 "-Wno-unused-parameter", 219 "-Wthread-safety", 220 ] + select(soong_config_variable("ANDROID", "target_board_platform"), { 221 any @ soc_ver: ["-DSOC_VERSION=" + soc_ver], 222 default: [], 223 }), 224 225 defaults: [ 226 // include hardware/google/graphics/common/BoardConfigCFlags.mk 227 "google_graphics_cc_default", 228 ], 229} 230