1/* 2 * Copyright (C) 2020 Arm Limited. 3 * SPDX-License-Identifier: Apache-2.0 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18soong_namespace { 19 imports: [ 20 "hardware/google/graphics/common", 21 "hardware/google/gchips", 22 ] 23} 24 25package { 26 default_applicable_licenses: ["Android-Apache-2.0"], 27} 28 29soong_config_module_type { 30 name: "arm_gralloc_cc_defaults", 31 module_type: "cc_defaults", 32 config_namespace: "arm_gralloc", 33 variables: [ 34 "mali_display_version", 35 "gralloc_hwc_force_bgra_8888", 36 "gralloc_hwc_fb_disable_afbc", 37 "gralloc_camera_write_raw16", 38 ], 39 properties: [ 40 "cflags", 41 ], 42} 43 44soong_config_string_variable { 45 name: "mali_display_version", 46 values: [ 47 "v0", 48 "v500", 49 "v550", 50 "v650", 51 "v71", 52 ], 53} 54 55soong_config_bool_variable { 56 name: "gralloc_hwc_force_bgra_8888", 57} 58soong_config_bool_variable { 59 name: "gralloc_hwc_fb_disable_afbc", 60} 61soong_config_bool_variable { 62 name: "gralloc_camera_write_raw16", 63} 64 65arm_gralloc_cc_defaults { 66 name: "arm_gralloc_defaults", 67 owner: "arm", 68 vendor: true, 69 proprietary: true, 70 cflags: [ 71 "-Wundef", 72 "-Werror", 73 "-DGRALLOC_LIBRARY_BUILD=1", 74 "-DDISABLE_FRAMEBUFFER_HAL=1", 75 "-DGRALLOC_USE_LEGACY_CALCS=0", 76 "-DGRALLOC_USE_LEGACY_LOCK=0", 77 ], 78 product_variables: { 79 platform_sdk_version: { 80 cflags: ["-DPLATFORM_SDK_VERSION=%d"], 81 }, 82 }, 83 header_libs: [ 84 "libgralloc_headers", 85 ], 86 target: { 87 android: { 88 cflags: [ 89 "-DGRALLOC_HOST_BUILD=0", 90 ], 91 }, 92 host: { 93 cflags: [ 94 "-DGRALLOC_HOST_BUILD=1", 95 ], 96 }, 97 }, 98 soong_config_variables: { 99 mali_display_version: { 100 v0: { 101 cflags: [ 102 "-DMALI_DISPLAY_VERSION=0", 103 ], 104 }, 105 v500: { 106 cflags: [ 107 "-DMALI_DISPLAY_VERSION=500", 108 ], 109 }, 110 v550: { 111 cflags: [ 112 "-DMALI_DISPLAY_VERSION=550", 113 ], 114 }, 115 v650: { 116 cflags: [ 117 "-DMALI_DISPLAY_VERSION=650", 118 ], 119 }, 120 v71: { 121 cflags: [ 122 "-DMALI_DISPLAY_VERSION=71", 123 ], 124 }, 125 }, 126 gralloc_hwc_force_bgra_8888: { 127 cflags: [ 128 "-DGRALLOC_HWC_FORCE_BGRA_8888=1", 129 ], 130 }, 131 gralloc_hwc_fb_disable_afbc: { 132 cflags: [ 133 "-DGRALLOC_HWC_FB_DISABLE_AFBC=1", 134 ], 135 }, 136 gralloc_camera_write_raw16: { 137 cflags: [ 138 "-DGRALLOC_CAMERA_WRITE_RAW16=1", 139 ], 140 }, 141 }, 142} 143