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 "-Wthread-safety", 74 "-DGRALLOC_LIBRARY_BUILD=1", 75 "-DDISABLE_FRAMEBUFFER_HAL=1", 76 "-DGRALLOC_USE_LEGACY_CALCS=0", 77 "-DGRALLOC_USE_LEGACY_LOCK=0", 78 ], 79 product_variables: { 80 platform_sdk_version: { 81 cflags: ["-DPLATFORM_SDK_VERSION=%d"], 82 }, 83 }, 84 header_libs: [ 85 "libgralloc_headers", 86 ], 87 target: { 88 android: { 89 cflags: [ 90 "-DGRALLOC_HOST_BUILD=0", 91 ], 92 }, 93 host: { 94 cflags: [ 95 "-DGRALLOC_HOST_BUILD=1", 96 ], 97 }, 98 }, 99 soong_config_variables: { 100 mali_display_version: { 101 v0: { 102 cflags: [ 103 "-DMALI_DISPLAY_VERSION=0", 104 ], 105 }, 106 v500: { 107 cflags: [ 108 "-DMALI_DISPLAY_VERSION=500", 109 ], 110 }, 111 v550: { 112 cflags: [ 113 "-DMALI_DISPLAY_VERSION=550", 114 ], 115 }, 116 v650: { 117 cflags: [ 118 "-DMALI_DISPLAY_VERSION=650", 119 ], 120 }, 121 v71: { 122 cflags: [ 123 "-DMALI_DISPLAY_VERSION=71", 124 ], 125 }, 126 }, 127 gralloc_hwc_force_bgra_8888: { 128 cflags: [ 129 "-DGRALLOC_HWC_FORCE_BGRA_8888=1", 130 ], 131 }, 132 gralloc_hwc_fb_disable_afbc: { 133 cflags: [ 134 "-DGRALLOC_HWC_FB_DISABLE_AFBC=1", 135 ], 136 }, 137 gralloc_camera_write_raw16: { 138 cflags: [ 139 "-DGRALLOC_CAMERA_WRITE_RAW16=1", 140 ], 141 }, 142 }, 143} 144