1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2/* 3 * 4 * (C) COPYRIGHT 2017-2021 ARM Limited. All rights reserved. 5 * 6 * This program is free software and is provided to you under the terms of the 7 * GNU General Public License version 2 as published by the Free Software 8 * Foundation, and any use by you of this program is subject to the terms 9 * of such GNU license. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, you can access it online at 18 * http://www.gnu.org/licenses/gpl-2.0.html. 19 * 20 */ 21 22/* Kernel-side tests may include mali_kbase's headers. Therefore any config 23 * options which affect the sizes of any structs (e.g. adding extra members) 24 * must be included in these defaults, so that the structs are consistent in 25 * both mali_kbase and the test modules. */ 26bob_defaults { 27 name: "mali_kbase_shared_config_defaults", 28 defaults: [ 29 "kernel_defaults", 30 ], 31 no_mali: { 32 kbuild_options: [ 33 "CONFIG_MALI_BIFROST_NO_MALI=y", 34 "CONFIG_MALI_NO_MALI_DEFAULT_GPU={{.gpu}}", 35 ], 36 }, 37 gpu_has_csf: { 38 kbuild_options: ["CONFIG_MALI_CSF_SUPPORT=y"], 39 }, 40 mali_devfreq: { 41 kbuild_options: ["CONFIG_MALI_BIFROST_DEVFREQ=y"], 42 }, 43 mali_midgard_dvfs: { 44 kbuild_options: ["CONFIG_MALI_BIFROST_DVFS=y"], 45 }, 46 mali_gator_support: { 47 kbuild_options: ["CONFIG_MALI_BIFROST_GATOR_SUPPORT=y"], 48 }, 49 mali_midgard_enable_trace: { 50 kbuild_options: ["CONFIG_MALI_BIFROST_ENABLE_TRACE=y"], 51 }, 52 mali_dma_fence: { 53 kbuild_options: ["CONFIG_MALI_BIFROST_DMA_FENCE=y"], 54 }, 55 mali_arbiter_support: { 56 kbuild_options: ["CONFIG_MALI_ARBITER_SUPPORT=y"], 57 }, 58 mali_dma_buf_map_on_demand: { 59 kbuild_options: ["CONFIG_MALI_DMA_BUF_MAP_ON_DEMAND=y"], 60 }, 61 mali_dma_buf_legacy_compat: { 62 kbuild_options: ["CONFIG_MALI_DMA_BUF_LEGACY_COMPAT=y"], 63 }, 64 mali_2mb_alloc: { 65 kbuild_options: ["CONFIG_MALI_2MB_ALLOC=y"], 66 }, 67 mali_memory_fully_backed: { 68 kbuild_options: ["CONFIG_MALI_MEMORY_FULLY_BACKED=y"], 69 }, 70 mali_corestack: { 71 kbuild_options: ["CONFIG_MALI_CORESTACK=y"], 72 }, 73 mali_real_hw: { 74 kbuild_options: ["CONFIG_MALI_REAL_HW=y"], 75 }, 76 mali_error_inject_none: { 77 kbuild_options: ["CONFIG_MALI_ERROR_INJECT_NONE=y"], 78 }, 79 mali_error_inject_track_list: { 80 kbuild_options: ["CONFIG_MALI_ERROR_INJECT_TRACK_LIST=y"], 81 }, 82 mali_error_inject_random: { 83 kbuild_options: ["CONFIG_MALI_ERROR_INJECT_RANDOM=y"], 84 }, 85 mali_error_inject: { 86 kbuild_options: ["CONFIG_MALI_BIFROST_ERROR_INJECT=y"], 87 }, 88 mali_gem5_build: { 89 kbuild_options: ["CONFIG_MALI_GEM5_BUILD=y"], 90 }, 91 mali_debug: { 92 kbuild_options: [ 93 "CONFIG_MALI_BIFROST_DEBUG=y", 94 "MALI_KERNEL_TEST_API={{.debug}}", 95 ], 96 }, 97 mali_fence_debug: { 98 kbuild_options: ["CONFIG_MALI_BIFROST_FENCE_DEBUG=y"], 99 }, 100 mali_system_trace: { 101 kbuild_options: ["CONFIG_MALI_BIFROST_SYSTEM_TRACE=y"], 102 }, 103 buslog: { 104 kbuild_options: ["CONFIG_MALI_BUSLOG=y"], 105 }, 106 cinstr_vector_dump: { 107 kbuild_options: ["CONFIG_MALI_VECTOR_DUMP=y"], 108 }, 109 cinstr_gwt: { 110 kbuild_options: ["CONFIG_MALI_CINSTR_GWT=y"], 111 }, 112 cinstr_primary_hwc: { 113 kbuild_options: ["CONFIG_MALI_PRFCNT_SET_PRIMARY=y"], 114 }, 115 cinstr_secondary_hwc: { 116 kbuild_options: ["CONFIG_MALI_BIFROST_PRFCNT_SET_SECONDARY=y"], 117 }, 118 cinstr_tertiary_hwc: { 119 kbuild_options: ["CONFIG_MALI_PRFCNT_SET_TERTIARY=y"], 120 }, 121 cinstr_hwc_set_select_via_debug_fs: { 122 kbuild_options: ["CONFIG_MALI_PRFCNT_SET_SELECT_VIA_DEBUG_FS=y"], 123 }, 124 mali_job_dump: { 125 kbuild_options: ["CONFIG_MALI_JOB_DUMP"], 126 }, 127 mali_pwrsoft_765: { 128 kbuild_options: ["CONFIG_MALI_PWRSOFT_765=y"], 129 }, 130 mali_hw_errata_1485982_not_affected: { 131 kbuild_options: ["CONFIG_MALI_HW_ERRATA_1485982_NOT_AFFECTED=y"], 132 }, 133 mali_hw_errata_1485982_use_clock_alternative: { 134 kbuild_options: ["CONFIG_MALI_HW_ERRATA_1485982_USE_CLOCK_ALTERNATIVE=y"], 135 }, 136 kbuild_options: [ 137 "CONFIG_MALI_PLATFORM_NAME={{.mali_platform_name}}", 138 "MALI_CUSTOMER_RELEASE={{.release}}", 139 "MALI_UNIT_TEST={{.unit_test_code}}", 140 "MALI_USE_CSF={{.gpu_has_csf}}", 141 "MALI_JIT_PRESSURE_LIMIT_BASE={{.jit_pressure_limit_base}}", 142 143 // Start of CS experimental features definitions. 144 // If there is nothing below, definition should be added as follows: 145 // "MALI_EXPERIMENTAL_FEATURE={{.experimental_feature}}" 146 // experimental_feature above comes from Mconfig in 147 // <ddk_root>/product/base/ 148 // However, in Mconfig, experimental_feature should be looked up (for 149 // similar explanation to this one) as ALLCAPS, i.e. 150 // EXPERIMENTAL_FEATURE. 151 // 152 // IMPORTANT: MALI_CS_EXPERIMENTAL should NEVER be defined below as it 153 // is an umbrella feature that would be open for inappropriate use 154 // (catch-all for experimental CS code without separating it into 155 // different features). 156 "MALI_INCREMENTAL_RENDERING={{.incremental_rendering}}", 157 "MALI_GPU_TIMESTAMP_CORRECTION={{.gpu_timestamp_correction}}", 158 "MALI_BASE_CSF_PERFORMANCE_TESTS={{.base_csf_performance_tests}}", 159 "MALI_GPU_TIMESTAMP_INTERPOLATION={{.gpu_timestamp_interpolation}}", 160 ], 161} 162 163bob_kernel_module { 164 name: "mali_kbase", 165 defaults: [ 166 "mali_kbase_shared_config_defaults", 167 ], 168 srcs: [ 169 "*.c", 170 "*.h", 171 "Kbuild", 172 "backend/gpu/*.c", 173 "backend/gpu/*.h", 174 "backend/gpu/Kbuild", 175 "context/*.c", 176 "context/*.h", 177 "context/Kbuild", 178 "ipa/*.c", 179 "ipa/*.h", 180 "ipa/Kbuild", 181 "platform/*.h", 182 "platform/*/*.c", 183 "platform/*/*.h", 184 "platform/*/Kbuild", 185 "thirdparty/*.c", 186 "thirdparty/Kbuild", 187 "debug/*.c", 188 "debug/*.h", 189 "debug/Kbuild", 190 "device/*.c", 191 "device/*.h", 192 "device/Kbuild", 193 "gpu/*.c", 194 "gpu/*.h", 195 "gpu/Kbuild", 196 "tl/*.c", 197 "tl/*.h", 198 "tl/Kbuild", 199 "mmu/*.c", 200 "mmu/*.h", 201 "mmu/Kbuild", 202 ], 203 gpu_has_job_manager: { 204 srcs: [ 205 "context/backend/*_jm.c", 206 "debug/backend/*_jm.c", 207 "debug/backend/*_jm.h", 208 "device/backend/*_jm.c", 209 "gpu/backend/*_jm.c", 210 "gpu/backend/*_jm.h", 211 "jm/*.h", 212 "tl/backend/*_jm.c", 213 "mmu/backend/*_jm.c", 214 "ipa/backend/*_jm.c", 215 "ipa/backend/*_jm.h", 216 ], 217 }, 218 gpu_has_csf: { 219 srcs: [ 220 "context/backend/*_csf.c", 221 "csf/*.c", 222 "csf/*.h", 223 "csf/Kbuild", 224 "csf/ipa_control/*.c", 225 "csf/ipa_control/*.h", 226 "csf/ipa_control/Kbuild", 227 "debug/backend/*_csf.c", 228 "debug/backend/*_csf.h", 229 "device/backend/*_csf.c", 230 "gpu/backend/*_csf.c", 231 "gpu/backend/*_csf.h", 232 "tl/backend/*_csf.c", 233 "mmu/backend/*_csf.c", 234 "ipa/backend/*_csf.c", 235 "ipa/backend/*_csf.h", 236 ], 237 }, 238 mali_arbiter_support: { 239 srcs: [ 240 "arbiter/*.c", 241 "arbiter/*.h", 242 "arbiter/Kbuild", 243 ], 244 }, 245 kbuild_options: [ 246 "CONFIG_MALI_BIFROST=m", 247 "CONFIG_MALI_KUTF=n", 248 ], 249 buslog: { 250 extra_symbols: [ 251 "bus_logger", 252 ], 253 }, 254} 255