| .. | .. |
|---|
| 1 | 1 | # SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note |
|---|
| 2 | 2 | # |
|---|
| 3 | | -# (C) COPYRIGHT 2012-2021 ARM Limited. All rights reserved. |
|---|
| 3 | +# (C) COPYRIGHT 2012-2023 ARM Limited. All rights reserved. |
|---|
| 4 | 4 | # |
|---|
| 5 | 5 | # This program is free software and is provided to you under the terms of the |
|---|
| 6 | 6 | # GNU General Public License version 2 as published by the Free Software |
|---|
| .. | .. |
|---|
| 22 | 22 | tristate "Mali Bifrost series support" |
|---|
| 23 | 23 | select GPU_TRACEPOINTS if ANDROID |
|---|
| 24 | 24 | select DMA_SHARED_BUFFER |
|---|
| 25 | | - select PM_DEVFREQ |
|---|
| 26 | | - select DEVFREQ_THERMAL |
|---|
| 25 | + select FW_LOADER |
|---|
| 27 | 26 | default n |
|---|
| 28 | 27 | help |
|---|
| 29 | 28 | Enable this option to build support for a ARM Mali Bifrost GPU. |
|---|
| .. | .. |
|---|
| 39 | 38 | default "devicetree" |
|---|
| 40 | 39 | help |
|---|
| 41 | 40 | Enter the name of the desired platform configuration directory to |
|---|
| 42 | | - include in the build. 'platform/$(MALI_PLATFORM_NAME)/Makefile' must |
|---|
| 41 | + include in the build. 'platform/$(MALI_PLATFORM_NAME)/Kbuild' must |
|---|
| 43 | 42 | exist. |
|---|
| 44 | 43 | |
|---|
| 45 | | -config MALI_REAL_HW |
|---|
| 44 | +choice |
|---|
| 45 | + prompt "Mali HW backend" |
|---|
| 46 | 46 | depends on MALI_BIFROST |
|---|
| 47 | | - def_bool !MALI_BIFROST_NO_MALI |
|---|
| 47 | + default MALI_REAL_HW |
|---|
| 48 | + |
|---|
| 49 | +config MALI_REAL_HW |
|---|
| 50 | + bool "Enable build of Mali kernel driver for real HW" |
|---|
| 51 | + depends on MALI_BIFROST |
|---|
| 52 | + help |
|---|
| 53 | + This is the default HW backend. |
|---|
| 54 | + |
|---|
| 55 | +config MALI_BIFROST_NO_MALI |
|---|
| 56 | + bool "Enable build of Mali kernel driver for No Mali" |
|---|
| 57 | + depends on MALI_BIFROST && MALI_BIFROST_EXPERT |
|---|
| 58 | + help |
|---|
| 59 | + This can be used to test the driver in a simulated environment |
|---|
| 60 | + whereby the hardware is not physically present. If the hardware is physically |
|---|
| 61 | + present it will not be used. This can be used to test the majority of the |
|---|
| 62 | + driver without needing actual hardware or for software benchmarking. |
|---|
| 63 | + All calls to the simulated hardware will complete immediately as if the hardware |
|---|
| 64 | + completed the task. |
|---|
| 65 | + |
|---|
| 66 | + |
|---|
| 67 | +endchoice |
|---|
| 48 | 68 | |
|---|
| 49 | 69 | menu "Platform specific options" |
|---|
| 50 | | -source "drivers/gpu/arm/midgard/platform/Kconfig" |
|---|
| 70 | +source "drivers/gpu/arm/bifrost/platform/Kconfig" |
|---|
| 51 | 71 | endmenu |
|---|
| 52 | 72 | |
|---|
| 53 | 73 | config MALI_CSF_SUPPORT |
|---|
| 54 | 74 | bool "Enable Mali CSF based GPU support" |
|---|
| 55 | | - depends on MALI_BIFROST=m |
|---|
| 56 | 75 | default n |
|---|
| 57 | 76 | help |
|---|
| 58 | 77 | Enables support for CSF based GPUs. |
|---|
| .. | .. |
|---|
| 93 | 112 | Enables tracing in kbase. Trace log available through |
|---|
| 94 | 113 | the "mali_trace" debugfs file, when the CONFIG_DEBUG_FS is enabled |
|---|
| 95 | 114 | |
|---|
| 96 | | -config MALI_BIFROST_DMA_FENCE |
|---|
| 97 | | - bool "Enable DMA_BUF fence support for Mali" |
|---|
| 98 | | - depends on MALI_BIFROST |
|---|
| 99 | | - default n |
|---|
| 100 | | - help |
|---|
| 101 | | - Support DMA_BUF fences for Mali. |
|---|
| 102 | | - |
|---|
| 103 | | - This option should only be enabled if the Linux Kernel has built in |
|---|
| 104 | | - support for DMA_BUF fences. |
|---|
| 105 | | - |
|---|
| 106 | 115 | config MALI_ARBITER_SUPPORT |
|---|
| 107 | 116 | bool "Enable arbiter support for Mali" |
|---|
| 108 | 117 | depends on MALI_BIFROST && !MALI_CSF_SUPPORT |
|---|
| .. | .. |
|---|
| 119 | 128 | depends on MALI_BIFROST |
|---|
| 120 | 129 | default n |
|---|
| 121 | 130 | help |
|---|
| 122 | | - This option caused kbase to set up the GPU mapping of imported |
|---|
| 131 | + This option will cause kbase to set up the GPU mapping of imported |
|---|
| 123 | 132 | dma-buf when needed to run atoms. This is the legacy behavior. |
|---|
| 124 | 133 | |
|---|
| 125 | 134 | This is intended for testing and the option will get removed in the |
|---|
| .. | .. |
|---|
| 139 | 148 | flushes in other drivers. This only has an effect for clients using |
|---|
| 140 | 149 | UK 11.18 or older. For later UK versions it is not possible. |
|---|
| 141 | 150 | |
|---|
| 151 | +config MALI_CORESIGHT |
|---|
| 152 | + depends on MALI_BIFROST && MALI_CSF_SUPPORT && !MALI_BIFROST_NO_MALI |
|---|
| 153 | + bool "Enable Kbase CoreSight tracing support" |
|---|
| 154 | + default n |
|---|
| 155 | + |
|---|
| 142 | 156 | menuconfig MALI_BIFROST_EXPERT |
|---|
| 143 | 157 | depends on MALI_BIFROST |
|---|
| 144 | 158 | bool "Enable Expert Settings" |
|---|
| .. | .. |
|---|
| 149 | 163 | |
|---|
| 150 | 164 | if MALI_BIFROST_EXPERT |
|---|
| 151 | 165 | |
|---|
| 152 | | -config MALI_2MB_ALLOC |
|---|
| 166 | +config LARGE_PAGE_ALLOC_OVERRIDE |
|---|
| 167 | + bool "Override default setting of 2MB pages" |
|---|
| 168 | + depends on MALI_BIFROST && MALI_BIFROST_EXPERT |
|---|
| 169 | + default n |
|---|
| 170 | + help |
|---|
| 171 | + An override config for LARGE_PAGE_ALLOC config. |
|---|
| 172 | + When LARGE_PAGE_ALLOC_OVERRIDE is Y, 2MB page allocation will be |
|---|
| 173 | + enabled by LARGE_PAGE_ALLOC. When this is N, the feature will be |
|---|
| 174 | + enabled when GPU HW satisfies requirements. |
|---|
| 175 | + |
|---|
| 176 | + If in doubt, say N |
|---|
| 177 | + |
|---|
| 178 | +config LARGE_PAGE_ALLOC |
|---|
| 153 | 179 | bool "Attempt to allocate 2MB pages" |
|---|
| 154 | 180 | depends on MALI_BIFROST && MALI_BIFROST_EXPERT |
|---|
| 155 | 181 | default n |
|---|
| .. | .. |
|---|
| 157 | 183 | Rather than allocating all GPU memory page-by-page, attempt to |
|---|
| 158 | 184 | allocate 2MB pages from the kernel. This reduces TLB pressure and |
|---|
| 159 | 185 | helps to prevent memory fragmentation. |
|---|
| 186 | + |
|---|
| 187 | + Note this config applies only when LARGE_PAGE_ALLOC_OVERRIDE config |
|---|
| 188 | + is enabled and enabling this on a GPU HW that does not satisfy |
|---|
| 189 | + requirements can cause serious problem. |
|---|
| 160 | 190 | |
|---|
| 161 | 191 | If in doubt, say N |
|---|
| 162 | 192 | |
|---|
| .. | .. |
|---|
| 186 | 216 | comment "Platform options" |
|---|
| 187 | 217 | depends on MALI_BIFROST && MALI_BIFROST_EXPERT |
|---|
| 188 | 218 | |
|---|
| 189 | | -config MALI_BIFROST_NO_MALI |
|---|
| 190 | | - bool "Enable No Mali" |
|---|
| 191 | | - depends on MALI_BIFROST && MALI_BIFROST_EXPERT |
|---|
| 192 | | - default n |
|---|
| 193 | | - help |
|---|
| 194 | | - This can be used to test the driver in a simulated environment |
|---|
| 195 | | - whereby the hardware is not physically present. If the hardware is physically |
|---|
| 196 | | - present it will not be used. This can be used to test the majority of the |
|---|
| 197 | | - driver without needing actual hardware or for software benchmarking. |
|---|
| 198 | | - All calls to the simulated hardware will complete immediately as if the hardware |
|---|
| 199 | | - completed the task. |
|---|
| 200 | | - |
|---|
| 201 | 219 | config MALI_BIFROST_ERROR_INJECT |
|---|
| 202 | 220 | bool "Enable No Mali error injection" |
|---|
| 203 | 221 | depends on MALI_BIFROST && MALI_BIFROST_EXPERT && MALI_BIFROST_NO_MALI |
|---|
| 204 | 222 | default n |
|---|
| 205 | 223 | help |
|---|
| 206 | 224 | Enables insertion of errors to test module failure and recovery mechanisms. |
|---|
| 207 | | - |
|---|
| 208 | | -config MALI_GEM5_BUILD |
|---|
| 209 | | - bool "Enable build of Mali kernel driver for GEM5" |
|---|
| 210 | | - depends on MALI_BIFROST && MALI_BIFROST_EXPERT |
|---|
| 211 | | - default n |
|---|
| 212 | | - help |
|---|
| 213 | | - This option is to do a Mali GEM5 build. |
|---|
| 214 | | - If unsure, say N. |
|---|
| 215 | 225 | |
|---|
| 216 | 226 | comment "Debug options" |
|---|
| 217 | 227 | depends on MALI_BIFROST && MALI_BIFROST_EXPERT |
|---|
| .. | .. |
|---|
| 225 | 235 | |
|---|
| 226 | 236 | config MALI_BIFROST_FENCE_DEBUG |
|---|
| 227 | 237 | bool "Enable debug sync fence usage" |
|---|
| 228 | | - depends on MALI_BIFROST && MALI_BIFROST_EXPERT && (SYNC || SYNC_FILE) |
|---|
| 238 | + depends on MALI_BIFROST && MALI_BIFROST_EXPERT && SYNC_FILE |
|---|
| 229 | 239 | default y if MALI_BIFROST_DEBUG |
|---|
| 230 | 240 | help |
|---|
| 231 | 241 | Select this option to enable additional checking and reporting on the |
|---|
| .. | .. |
|---|
| 365 | 375 | endif |
|---|
| 366 | 376 | |
|---|
| 367 | 377 | config MALI_ARBITRATION |
|---|
| 368 | | - bool "Enable Virtualization reference code" |
|---|
| 378 | + tristate "Enable Virtualization reference code" |
|---|
| 369 | 379 | depends on MALI_BIFROST |
|---|
| 370 | 380 | default n |
|---|
| 371 | 381 | help |
|---|
| .. | .. |
|---|
| 373 | 383 | virtualization setup for Mali |
|---|
| 374 | 384 | If unsure, say N. |
|---|
| 375 | 385 | |
|---|
| 376 | | -source "drivers/gpu/arm/midgard/tests/Kconfig" |
|---|
| 386 | + |
|---|
| 387 | +# source "drivers/gpu/arm/bifrost/tests/Kconfig" |
|---|
| 377 | 388 | |
|---|
| 378 | 389 | endif |
|---|