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 18package { 19 default_applicable_licenses: ["Android-Apache-2.0"], 20} 21 22soong_config_module_type { 23 name: "arm_gralloc_cc_defaults", 24 module_type: "cc_defaults", 25 config_namespace: "arm_gralloc", 26 variables: [ 27 "mali_display_version", 28 "gralloc_hwc_force_bgra_8888", 29 "gralloc_hwc_fb_disable_afbc", 30 "gralloc_camera_write_raw16", 31 ], 32 properties: [ 33 "cflags", 34 ], 35} 36 37soong_config_string_variable { 38 name: "mali_display_version", 39 values: [ 40 "v0", 41 "v500", 42 "v550", 43 "v650", 44 "v71", 45 ], 46} 47 48soong_config_bool_variable { 49 name: "gralloc_hwc_force_bgra_8888", 50} 51soong_config_bool_variable { 52 name: "gralloc_hwc_fb_disable_afbc", 53} 54soong_config_bool_variable { 55 name: "gralloc_camera_write_raw16", 56} 57 58arm_gralloc_cc_defaults { 59 name: "arm_gralloc_defaults", 60 owner: "arm", 61 vendor: true, 62 proprietary: true, 63 cflags: [ 64 "-ldl", 65 "-Wundef", 66 "-Werror", 67 "-DGRALLOC_LIBRARY_BUILD=1", 68 "-DDISABLE_FRAMEBUFFER_HAL=1", 69 "-DGRALLOC_USE_LEGACY_CALCS=0", 70 "-DGRALLOC_USE_LEGACY_LOCK=0", 71 ], 72 product_variables: { 73 platform_sdk_version: { 74 cflags: ["-DPLATFORM_SDK_VERSION=%d"], 75 }, 76 }, 77 header_libs: [ 78 "libgralloc_headers", 79 ], 80 target: { 81 android: { 82 cflags: [ 83 "-DGRALLOC_HOST_BUILD=0", 84 ], 85 }, 86 host: { 87 cflags: [ 88 "-DGRALLOC_HOST_BUILD=1", 89 ], 90 }, 91 }, 92 soong_config_variables: { 93 mali_display_version: { 94 v0: { 95 cflags: [ 96 "-DMALI_DISPLAY_VERSION=0", 97 ], 98 }, 99 v500: { 100 cflags: [ 101 "-DMALI_DISPLAY_VERSION=500", 102 ], 103 }, 104 v550: { 105 cflags: [ 106 "-DMALI_DISPLAY_VERSION=550", 107 ], 108 }, 109 v650: { 110 cflags: [ 111 "-DMALI_DISPLAY_VERSION=650", 112 ], 113 }, 114 v71: { 115 cflags: [ 116 "-DMALI_DISPLAY_VERSION=71", 117 ], 118 }, 119 }, 120 gralloc_hwc_force_bgra_8888: { 121 cflags: [ 122 "-DGRALLOC_HWC_FORCE_BGRA_8888=1", 123 ], 124 }, 125 gralloc_hwc_fb_disable_afbc: { 126 cflags: [ 127 "-DGRALLOC_HWC_FB_DISABLE_AFBC=1", 128 ], 129 }, 130 gralloc_camera_write_raw16: { 131 cflags: [ 132 "-DGRALLOC_CAMERA_WRITE_RAW16=1", 133 ], 134 }, 135 }, 136} 137