hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/gpu/arm/bifrost/Kconfig
....@@ -1,6 +1,6 @@
11 # SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
22 #
3
-# (C) COPYRIGHT 2012-2021 ARM Limited. All rights reserved.
3
+# (C) COPYRIGHT 2012-2023 ARM Limited. All rights reserved.
44 #
55 # This program is free software and is provided to you under the terms of the
66 # GNU General Public License version 2 as published by the Free Software
....@@ -22,8 +22,7 @@
2222 tristate "Mali Bifrost series support"
2323 select GPU_TRACEPOINTS if ANDROID
2424 select DMA_SHARED_BUFFER
25
- select PM_DEVFREQ
26
- select DEVFREQ_THERMAL
25
+ select FW_LOADER
2726 default n
2827 help
2928 Enable this option to build support for a ARM Mali Bifrost GPU.
....@@ -39,20 +38,40 @@
3938 default "devicetree"
4039 help
4140 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
4342 exist.
4443
45
-config MALI_REAL_HW
44
+choice
45
+ prompt "Mali HW backend"
4646 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
4868
4969 menu "Platform specific options"
50
-source "drivers/gpu/arm/midgard/platform/Kconfig"
70
+source "drivers/gpu/arm/bifrost/platform/Kconfig"
5171 endmenu
5272
5373 config MALI_CSF_SUPPORT
5474 bool "Enable Mali CSF based GPU support"
55
- depends on MALI_BIFROST=m
5675 default n
5776 help
5877 Enables support for CSF based GPUs.
....@@ -93,16 +112,6 @@
93112 Enables tracing in kbase. Trace log available through
94113 the "mali_trace" debugfs file, when the CONFIG_DEBUG_FS is enabled
95114
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
-
106115 config MALI_ARBITER_SUPPORT
107116 bool "Enable arbiter support for Mali"
108117 depends on MALI_BIFROST && !MALI_CSF_SUPPORT
....@@ -119,7 +128,7 @@
119128 depends on MALI_BIFROST
120129 default n
121130 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
123132 dma-buf when needed to run atoms. This is the legacy behavior.
124133
125134 This is intended for testing and the option will get removed in the
....@@ -139,6 +148,11 @@
139148 flushes in other drivers. This only has an effect for clients using
140149 UK 11.18 or older. For later UK versions it is not possible.
141150
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
+
142156 menuconfig MALI_BIFROST_EXPERT
143157 depends on MALI_BIFROST
144158 bool "Enable Expert Settings"
....@@ -149,7 +163,19 @@
149163
150164 if MALI_BIFROST_EXPERT
151165
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
153179 bool "Attempt to allocate 2MB pages"
154180 depends on MALI_BIFROST && MALI_BIFROST_EXPERT
155181 default n
....@@ -157,6 +183,10 @@
157183 Rather than allocating all GPU memory page-by-page, attempt to
158184 allocate 2MB pages from the kernel. This reduces TLB pressure and
159185 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.
160190
161191 If in doubt, say N
162192
....@@ -186,32 +216,12 @@
186216 comment "Platform options"
187217 depends on MALI_BIFROST && MALI_BIFROST_EXPERT
188218
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
-
201219 config MALI_BIFROST_ERROR_INJECT
202220 bool "Enable No Mali error injection"
203221 depends on MALI_BIFROST && MALI_BIFROST_EXPERT && MALI_BIFROST_NO_MALI
204222 default n
205223 help
206224 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.
215225
216226 comment "Debug options"
217227 depends on MALI_BIFROST && MALI_BIFROST_EXPERT
....@@ -225,7 +235,7 @@
225235
226236 config MALI_BIFROST_FENCE_DEBUG
227237 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
229239 default y if MALI_BIFROST_DEBUG
230240 help
231241 Select this option to enable additional checking and reporting on the
....@@ -365,7 +375,7 @@
365375 endif
366376
367377 config MALI_ARBITRATION
368
- bool "Enable Virtualization reference code"
378
+ tristate "Enable Virtualization reference code"
369379 depends on MALI_BIFROST
370380 default n
371381 help
....@@ -373,6 +383,7 @@
373383 virtualization setup for Mali
374384 If unsure, say N.
375385
376
-source "drivers/gpu/arm/midgard/tests/Kconfig"
386
+
387
+# source "drivers/gpu/arm/bifrost/tests/Kconfig"
377388
378389 endif