1*0a9764feSAndroid Build Coastguard Worker// Copyright (C) 2015 The Android Open Source Project 2*0a9764feSAndroid Build Coastguard Worker// 3*0a9764feSAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 4*0a9764feSAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 5*0a9764feSAndroid Build Coastguard Worker// You may obtain a copy of the License at 6*0a9764feSAndroid Build Coastguard Worker// 7*0a9764feSAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 8*0a9764feSAndroid Build Coastguard Worker// 9*0a9764feSAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 10*0a9764feSAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 11*0a9764feSAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*0a9764feSAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 13*0a9764feSAndroid Build Coastguard Worker// limitations under the License. 14*0a9764feSAndroid Build Coastguard Worker 15*0a9764feSAndroid Build Coastguard Workerpackage { 16*0a9764feSAndroid Build Coastguard Worker default_applicable_licenses: ["external_drm_hwcomposer_license"], 17*0a9764feSAndroid Build Coastguard Worker} 18*0a9764feSAndroid Build Coastguard Worker 19*0a9764feSAndroid Build Coastguard Worker// Added automatically by a large-scale-change 20*0a9764feSAndroid Build Coastguard Worker// See: http://go/android-license-faq 21*0a9764feSAndroid Build Coastguard Workerlicense { 22*0a9764feSAndroid Build Coastguard Worker name: "external_drm_hwcomposer_license", 23*0a9764feSAndroid Build Coastguard Worker visibility: [":__subpackages__"], 24*0a9764feSAndroid Build Coastguard Worker license_kinds: [ 25*0a9764feSAndroid Build Coastguard Worker "SPDX-license-identifier-Apache-2.0", 26*0a9764feSAndroid Build Coastguard Worker ], 27*0a9764feSAndroid Build Coastguard Worker license_text: [ 28*0a9764feSAndroid Build Coastguard Worker "NOTICE", 29*0a9764feSAndroid Build Coastguard Worker ], 30*0a9764feSAndroid Build Coastguard Worker} 31*0a9764feSAndroid Build Coastguard Worker 32*0a9764feSAndroid Build Coastguard Workercc_library_headers { 33*0a9764feSAndroid Build Coastguard Worker name: "drm_hwcomposer_headers", 34*0a9764feSAndroid Build Coastguard Worker vendor: true, 35*0a9764feSAndroid Build Coastguard Worker export_include_dirs: ["."], 36*0a9764feSAndroid Build Coastguard Worker} 37*0a9764feSAndroid Build Coastguard Worker 38*0a9764feSAndroid Build Coastguard Worker// ===================== 39*0a9764feSAndroid Build Coastguard Worker// hwcomposer.drm.so 40*0a9764feSAndroid Build Coastguard Worker// ===================== 41*0a9764feSAndroid Build Coastguard Workercc_defaults { 42*0a9764feSAndroid Build Coastguard Worker name: "hwcomposer.drm_defaults", 43*0a9764feSAndroid Build Coastguard Worker 44*0a9764feSAndroid Build Coastguard Worker shared_libs: [ 45*0a9764feSAndroid Build Coastguard Worker "[email protected]", 46*0a9764feSAndroid Build Coastguard Worker "[email protected]", 47*0a9764feSAndroid Build Coastguard Worker "libcutils", 48*0a9764feSAndroid Build Coastguard Worker "libdrm", 49*0a9764feSAndroid Build Coastguard Worker "libhardware", 50*0a9764feSAndroid Build Coastguard Worker "libhidlbase", 51*0a9764feSAndroid Build Coastguard Worker "liblog", 52*0a9764feSAndroid Build Coastguard Worker "libsync", 53*0a9764feSAndroid Build Coastguard Worker "libui", 54*0a9764feSAndroid Build Coastguard Worker "libutils", 55*0a9764feSAndroid Build Coastguard Worker ], 56*0a9764feSAndroid Build Coastguard Worker 57*0a9764feSAndroid Build Coastguard Worker static_libs: [ 58*0a9764feSAndroid Build Coastguard Worker "libaidlcommonsupport", 59*0a9764feSAndroid Build Coastguard Worker ], 60*0a9764feSAndroid Build Coastguard Worker 61*0a9764feSAndroid Build Coastguard Worker header_libs: [ 62*0a9764feSAndroid Build Coastguard Worker "drm_hwcomposer_headers", 63*0a9764feSAndroid Build Coastguard Worker ], 64*0a9764feSAndroid Build Coastguard Worker 65*0a9764feSAndroid Build Coastguard Worker cflags: [ 66*0a9764feSAndroid Build Coastguard Worker "-Wall", 67*0a9764feSAndroid Build Coastguard Worker "-Werror", 68*0a9764feSAndroid Build Coastguard Worker ], 69*0a9764feSAndroid Build Coastguard Worker 70*0a9764feSAndroid Build Coastguard Worker cppflags: [ 71*0a9764feSAndroid Build Coastguard Worker "-DHWC2_INCLUDE_STRINGIFICATION", 72*0a9764feSAndroid Build Coastguard Worker "-DHWC2_USE_CPP11", 73*0a9764feSAndroid Build Coastguard Worker ], 74*0a9764feSAndroid Build Coastguard Worker 75*0a9764feSAndroid Build Coastguard Worker cpp_std: "gnu++17", 76*0a9764feSAndroid Build Coastguard Worker 77*0a9764feSAndroid Build Coastguard Worker relative_install_path: "hw", 78*0a9764feSAndroid Build Coastguard Worker vendor: true, 79*0a9764feSAndroid Build Coastguard Worker} 80*0a9764feSAndroid Build Coastguard Worker 81*0a9764feSAndroid Build Coastguard Workerfilegroup { 82*0a9764feSAndroid Build Coastguard Worker name: "drm_hwcomposer_fd", 83*0a9764feSAndroid Build Coastguard Worker srcs: ["utils/fd.cpp"], 84*0a9764feSAndroid Build Coastguard Worker} 85*0a9764feSAndroid Build Coastguard Worker 86*0a9764feSAndroid Build Coastguard Workerfilegroup { 87*0a9764feSAndroid Build Coastguard Worker name: "drm_hwcomposer_common", 88*0a9764feSAndroid Build Coastguard Worker srcs: [ 89*0a9764feSAndroid Build Coastguard Worker "bufferinfo/BufferInfoGetter.cpp", 90*0a9764feSAndroid Build Coastguard Worker "bufferinfo/BufferInfoMapperMetadata.cpp", 91*0a9764feSAndroid Build Coastguard Worker 92*0a9764feSAndroid Build Coastguard Worker "compositor/DrmKmsPlan.cpp", 93*0a9764feSAndroid Build Coastguard Worker "compositor/FlatteningController.cpp", 94*0a9764feSAndroid Build Coastguard Worker 95*0a9764feSAndroid Build Coastguard Worker "drm/DrmAtomicStateManager.cpp", 96*0a9764feSAndroid Build Coastguard Worker "drm/DrmConnector.cpp", 97*0a9764feSAndroid Build Coastguard Worker "drm/DrmCrtc.cpp", 98*0a9764feSAndroid Build Coastguard Worker "drm/DrmDevice.cpp", 99*0a9764feSAndroid Build Coastguard Worker "drm/DrmDisplayPipeline.cpp", 100*0a9764feSAndroid Build Coastguard Worker "drm/DrmEncoder.cpp", 101*0a9764feSAndroid Build Coastguard Worker "drm/DrmFbImporter.cpp", 102*0a9764feSAndroid Build Coastguard Worker "drm/DrmHwc.cpp", 103*0a9764feSAndroid Build Coastguard Worker "drm/DrmMode.cpp", 104*0a9764feSAndroid Build Coastguard Worker "drm/DrmPlane.cpp", 105*0a9764feSAndroid Build Coastguard Worker "drm/DrmProperty.cpp", 106*0a9764feSAndroid Build Coastguard Worker "drm/ResourceManager.cpp", 107*0a9764feSAndroid Build Coastguard Worker "drm/UEventListener.cpp", 108*0a9764feSAndroid Build Coastguard Worker "drm/VSyncWorker.cpp", 109*0a9764feSAndroid Build Coastguard Worker 110*0a9764feSAndroid Build Coastguard Worker "backend/Backend.cpp", 111*0a9764feSAndroid Build Coastguard Worker "backend/BackendClient.cpp", 112*0a9764feSAndroid Build Coastguard Worker "backend/BackendManager.cpp", 113*0a9764feSAndroid Build Coastguard Worker 114*0a9764feSAndroid Build Coastguard Worker "hwc2_device/DrmHwcTwo.cpp", 115*0a9764feSAndroid Build Coastguard Worker "hwc2_device/HwcDisplay.cpp", 116*0a9764feSAndroid Build Coastguard Worker "hwc2_device/HwcDisplayConfigs.cpp", 117*0a9764feSAndroid Build Coastguard Worker "hwc2_device/HwcLayer.cpp", 118*0a9764feSAndroid Build Coastguard Worker "hwc2_device/hwc2_device.cpp", 119*0a9764feSAndroid Build Coastguard Worker 120*0a9764feSAndroid Build Coastguard Worker "utils/fd.cpp", 121*0a9764feSAndroid Build Coastguard Worker "utils/properties.cpp", 122*0a9764feSAndroid Build Coastguard Worker ], 123*0a9764feSAndroid Build Coastguard Worker} 124*0a9764feSAndroid Build Coastguard Worker 125*0a9764feSAndroid Build Coastguard Workerfilegroup { 126*0a9764feSAndroid Build Coastguard Worker name: "drm_hwcomposer_hwc3", 127*0a9764feSAndroid Build Coastguard Worker srcs: [ 128*0a9764feSAndroid Build Coastguard Worker "hwc3/Composer.cpp", 129*0a9764feSAndroid Build Coastguard Worker "hwc3/ComposerClient.cpp", 130*0a9764feSAndroid Build Coastguard Worker "hwc3/ComposerResources.cpp", 131*0a9764feSAndroid Build Coastguard Worker "hwc3/DrmHwcThree.cpp", 132*0a9764feSAndroid Build Coastguard Worker "hwc3/Utils.cpp", 133*0a9764feSAndroid Build Coastguard Worker ], 134*0a9764feSAndroid Build Coastguard Worker} 135*0a9764feSAndroid Build Coastguard Worker 136*0a9764feSAndroid Build Coastguard Workerfilegroup { 137*0a9764feSAndroid Build Coastguard Worker name: "drm_hwcomposer_service", 138*0a9764feSAndroid Build Coastguard Worker srcs: [ 139*0a9764feSAndroid Build Coastguard Worker "hwc3/service.cpp", 140*0a9764feSAndroid Build Coastguard Worker ], 141*0a9764feSAndroid Build Coastguard Worker} 142*0a9764feSAndroid Build Coastguard Worker 143*0a9764feSAndroid Build Coastguard Workerfilegroup { 144*0a9764feSAndroid Build Coastguard Worker name: "drm_hwcomposer_init_rc", 145*0a9764feSAndroid Build Coastguard Worker srcs: [ 146*0a9764feSAndroid Build Coastguard Worker "hwc3/hwc3-drm.rc", 147*0a9764feSAndroid Build Coastguard Worker ], 148*0a9764feSAndroid Build Coastguard Worker} 149*0a9764feSAndroid Build Coastguard Worker 150*0a9764feSAndroid Build Coastguard Workerfilegroup { 151*0a9764feSAndroid Build Coastguard Worker name: "drm_hwcomposer_vintf_manifest", 152*0a9764feSAndroid Build Coastguard Worker srcs: [ 153*0a9764feSAndroid Build Coastguard Worker "hwc3/hwc3-drm.xml", 154*0a9764feSAndroid Build Coastguard Worker ], 155*0a9764feSAndroid Build Coastguard Worker} 156*0a9764feSAndroid Build Coastguard Worker 157*0a9764feSAndroid Build Coastguard Worker// Kept only for compatibility with older Android version. Please do not use! 158*0a9764feSAndroid Build Coastguard Workercc_library_static { 159*0a9764feSAndroid Build Coastguard Worker name: "drm_hwcomposer", 160*0a9764feSAndroid Build Coastguard Worker defaults: ["hwcomposer.drm_defaults"], 161*0a9764feSAndroid Build Coastguard Worker srcs: [":drm_hwcomposer_common"], 162*0a9764feSAndroid Build Coastguard Worker} 163*0a9764feSAndroid Build Coastguard Worker 164*0a9764feSAndroid Build Coastguard Workercc_library_shared { 165*0a9764feSAndroid Build Coastguard Worker name: "hwcomposer.drm", 166*0a9764feSAndroid Build Coastguard Worker defaults: ["hwcomposer.drm_defaults"], 167*0a9764feSAndroid Build Coastguard Worker srcs: [ 168*0a9764feSAndroid Build Coastguard Worker ":drm_hwcomposer_common", 169*0a9764feSAndroid Build Coastguard Worker "bufferinfo/legacy/BufferInfoLibdrm.cpp", 170*0a9764feSAndroid Build Coastguard Worker ], 171*0a9764feSAndroid Build Coastguard Worker cflags: ["-DUSE_IMAPPER4_METADATA_API"], 172*0a9764feSAndroid Build Coastguard Worker} 173*0a9764feSAndroid Build Coastguard Worker 174*0a9764feSAndroid Build Coastguard Workercc_library_shared { 175*0a9764feSAndroid Build Coastguard Worker name: "hwcomposer.drm_minigbm", 176*0a9764feSAndroid Build Coastguard Worker defaults: ["hwcomposer.drm_defaults"], 177*0a9764feSAndroid Build Coastguard Worker srcs: [ 178*0a9764feSAndroid Build Coastguard Worker ":drm_hwcomposer_common", 179*0a9764feSAndroid Build Coastguard Worker "bufferinfo/legacy/BufferInfoMinigbm.cpp", 180*0a9764feSAndroid Build Coastguard Worker ], 181*0a9764feSAndroid Build Coastguard Worker} 182*0a9764feSAndroid Build Coastguard Worker 183*0a9764feSAndroid Build Coastguard Workercc_binary { 184*0a9764feSAndroid Build Coastguard Worker name: "android.hardware.composer.hwc3-service.drm", 185*0a9764feSAndroid Build Coastguard Worker 186*0a9764feSAndroid Build Coastguard Worker srcs: [ 187*0a9764feSAndroid Build Coastguard Worker ":drm_hwcomposer_common", 188*0a9764feSAndroid Build Coastguard Worker ":drm_hwcomposer_hwc3", 189*0a9764feSAndroid Build Coastguard Worker ":drm_hwcomposer_service", 190*0a9764feSAndroid Build Coastguard Worker "bufferinfo/legacy/BufferInfoLibdrm.cpp", 191*0a9764feSAndroid Build Coastguard Worker ], 192*0a9764feSAndroid Build Coastguard Worker 193*0a9764feSAndroid Build Coastguard Worker defaults: [ 194*0a9764feSAndroid Build Coastguard Worker "hwcomposer.drm_defaults", 195*0a9764feSAndroid Build Coastguard Worker ], 196*0a9764feSAndroid Build Coastguard Worker 197*0a9764feSAndroid Build Coastguard Worker shared_libs: [ 198*0a9764feSAndroid Build Coastguard Worker "android.hardware.graphics.composer3-V4-ndk", 199*0a9764feSAndroid Build Coastguard Worker "libbase", 200*0a9764feSAndroid Build Coastguard Worker "libbinder_ndk", 201*0a9764feSAndroid Build Coastguard Worker "liblog", 202*0a9764feSAndroid Build Coastguard Worker "libutils", 203*0a9764feSAndroid Build Coastguard Worker ], 204*0a9764feSAndroid Build Coastguard Worker 205*0a9764feSAndroid Build Coastguard Worker cflags: [ 206*0a9764feSAndroid Build Coastguard Worker "-Wall", 207*0a9764feSAndroid Build Coastguard Worker "-Werror", 208*0a9764feSAndroid Build Coastguard Worker 209*0a9764feSAndroid Build Coastguard Worker "-DUSE_IMAPPER4_METADATA_API", 210*0a9764feSAndroid Build Coastguard Worker ], 211*0a9764feSAndroid Build Coastguard Worker 212*0a9764feSAndroid Build Coastguard Worker cppflags: [ 213*0a9764feSAndroid Build Coastguard Worker "-DHWC2_INCLUDE_STRINGIFICATION", 214*0a9764feSAndroid Build Coastguard Worker "-DHWC2_USE_CPP11", 215*0a9764feSAndroid Build Coastguard Worker ], 216*0a9764feSAndroid Build Coastguard Worker 217*0a9764feSAndroid Build Coastguard Worker relative_install_path: "hw", 218*0a9764feSAndroid Build Coastguard Worker vendor: true, 219*0a9764feSAndroid Build Coastguard Worker 220*0a9764feSAndroid Build Coastguard Worker vintf_fragments: [":drm_hwcomposer_vintf_manifest"], 221*0a9764feSAndroid Build Coastguard Worker init_rc: [":drm_hwcomposer_init_rc"], 222*0a9764feSAndroid Build Coastguard Worker} 223*0a9764feSAndroid Build Coastguard Worker 224*0a9764feSAndroid Build Coastguard Worker// Used by hwcomposer.drm_imagination 225*0a9764feSAndroid Build Coastguard Workerfilegroup { 226*0a9764feSAndroid Build Coastguard Worker name: "drm_hwcomposer_platformimagination", 227*0a9764feSAndroid Build Coastguard Worker srcs: ["bufferinfo/legacy/BufferInfoImagination.cpp"], 228*0a9764feSAndroid Build Coastguard Worker} 229*0a9764feSAndroid Build Coastguard Worker 230*0a9764feSAndroid Build Coastguard Worker// Used by hwcomposer.drm_hikey and hwcomposer.drm_hikey960 231*0a9764feSAndroid Build Coastguard Workerfilegroup { 232*0a9764feSAndroid Build Coastguard Worker name: "drm_hwcomposer_platformhisi", 233*0a9764feSAndroid Build Coastguard Worker srcs: ["bufferinfo/legacy/BufferInfoMaliHisi.cpp"], 234*0a9764feSAndroid Build Coastguard Worker} 235*0a9764feSAndroid Build Coastguard Worker 236*0a9764feSAndroid Build Coastguard Worker// Used by hwcomposer.drm_meson 237*0a9764feSAndroid Build Coastguard Workerfilegroup { 238*0a9764feSAndroid Build Coastguard Worker name: "drm_hwcomposer_platformmeson", 239*0a9764feSAndroid Build Coastguard Worker srcs: ["bufferinfo/legacy/BufferInfoMaliMeson.cpp"], 240*0a9764feSAndroid Build Coastguard Worker} 241*0a9764feSAndroid Build Coastguard Worker 242*0a9764feSAndroid Build Coastguard Worker// Used by hwcomposer.drm_mediatek 243*0a9764feSAndroid Build Coastguard Workerfilegroup { 244*0a9764feSAndroid Build Coastguard Worker name: "drm_hwcomposer_platformmediatek", 245*0a9764feSAndroid Build Coastguard Worker srcs: ["bufferinfo/legacy/BufferInfoMaliMediatek.cpp"], 246*0a9764feSAndroid Build Coastguard Worker} 247*0a9764feSAndroid Build Coastguard Worker 248*0a9764feSAndroid Build Coastguard Workerprebuilt_etc { 249*0a9764feSAndroid Build Coastguard Worker name: "drm_hwcomposer_hwc3_apex_vintf", 250*0a9764feSAndroid Build Coastguard Worker src: "hwc3/hwc3-drm.xml", 251*0a9764feSAndroid Build Coastguard Worker sub_dir: "vintf", 252*0a9764feSAndroid Build Coastguard Worker vendor: true, 253*0a9764feSAndroid Build Coastguard Worker installable: false, 254*0a9764feSAndroid Build Coastguard Worker} 255*0a9764feSAndroid Build Coastguard Worker 256*0a9764feSAndroid Build Coastguard Workerprebuilt_etc { 257*0a9764feSAndroid Build Coastguard Worker name: "drm_hwcomposer_hwc3_apex_init_rc", 258*0a9764feSAndroid Build Coastguard Worker filename_from_src: true, 259*0a9764feSAndroid Build Coastguard Worker vendor: true, 260*0a9764feSAndroid Build Coastguard Worker src: ":gen-drm_hwcomposer_hwc3_apex_init_rc", 261*0a9764feSAndroid Build Coastguard Worker} 262*0a9764feSAndroid Build Coastguard Worker 263*0a9764feSAndroid Build Coastguard Workergenrule { 264*0a9764feSAndroid Build Coastguard Worker name: "gen-drm_hwcomposer_hwc3_apex_init_rc", 265*0a9764feSAndroid Build Coastguard Worker srcs: ["hwc3/hwc3-drm.rc"], 266*0a9764feSAndroid Build Coastguard Worker out: ["hwc3-drm.apex.rc"], 267*0a9764feSAndroid Build Coastguard Worker cmd: "sed " + 268*0a9764feSAndroid Build Coastguard Worker // Update the binary location to inside the Apex: 269*0a9764feSAndroid Build Coastguard Worker "-e 's%/vendor/bin/%/apex/com.android.hardware.graphics.composer/bin/%' " + 270*0a9764feSAndroid Build Coastguard Worker "$(in) > $(out)", 271*0a9764feSAndroid Build Coastguard Worker} 272*0a9764feSAndroid Build Coastguard Worker 273*0a9764feSAndroid Build Coastguard Workerfilegroup { 274*0a9764feSAndroid Build Coastguard Worker name: "drm_hwcomposer_hwc3_apex_file_contexts", 275*0a9764feSAndroid Build Coastguard Worker srcs: [ 276*0a9764feSAndroid Build Coastguard Worker "hwc3/hwc3-apex-file-contexts", 277*0a9764feSAndroid Build Coastguard Worker ], 278*0a9764feSAndroid Build Coastguard Worker} 279*0a9764feSAndroid Build Coastguard Worker 280*0a9764feSAndroid Build Coastguard Workerfilegroup { 281*0a9764feSAndroid Build Coastguard Worker name: "drm_hwcomposer_hwc3_apex_manifest", 282*0a9764feSAndroid Build Coastguard Worker srcs: [ 283*0a9764feSAndroid Build Coastguard Worker "hwc3/hwc3-apex-manifest.json", 284*0a9764feSAndroid Build Coastguard Worker ], 285*0a9764feSAndroid Build Coastguard Worker} 286*0a9764feSAndroid Build Coastguard Worker 287*0a9764feSAndroid Build Coastguard Workerapex { 288*0a9764feSAndroid Build Coastguard Worker name: "com.android.hardware.graphics.composer.drm_hwcomposer", 289*0a9764feSAndroid Build Coastguard Worker key: "com.android.hardware.key", 290*0a9764feSAndroid Build Coastguard Worker certificate: ":com.android.hardware.certificate", 291*0a9764feSAndroid Build Coastguard Worker file_contexts: ":drm_hwcomposer_hwc3_apex_file_contexts", 292*0a9764feSAndroid Build Coastguard Worker manifest: ":drm_hwcomposer_hwc3_apex_manifest", 293*0a9764feSAndroid Build Coastguard Worker vendor: true, 294*0a9764feSAndroid Build Coastguard Worker updatable: false, 295*0a9764feSAndroid Build Coastguard Worker soc_specific: true, 296*0a9764feSAndroid Build Coastguard Worker binaries: [ 297*0a9764feSAndroid Build Coastguard Worker "android.hardware.composer.hwc3-service.drm", 298*0a9764feSAndroid Build Coastguard Worker ], 299*0a9764feSAndroid Build Coastguard Worker prebuilts: [ 300*0a9764feSAndroid Build Coastguard Worker "drm_hwcomposer_hwc3_apex_init_rc", 301*0a9764feSAndroid Build Coastguard Worker "drm_hwcomposer_hwc3_apex_vintf", 302*0a9764feSAndroid Build Coastguard Worker ], 303*0a9764feSAndroid Build Coastguard Worker} 304