summaryrefslogtreecommitdiff
path: root/mali_kbase/Mconfig
blob: 60cb2a368af63d22be6353df05ab9e263697037a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
#
# (C) COPYRIGHT 2012-2019 ARM Limited. All rights reserved.
#
# This program is free software and is provided to you under the terms of the
# GNU General Public License version 2 as published by the Free Software
# Foundation, and any use by you of this program is subject to the terms
# of such GNU licence.
#
# A copy of the licence is included with the program, and can also be obtained
# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA  02110-1301, USA.
#
#


menuconfig MALI_MIDGARD
	bool "Mali Midgard series support"
	default y
	help
	  Enable this option to build support for a ARM Mali Midgard GPU.

	  To compile this driver as a module, choose M here:
	  this will generate a single module, called mali_kbase.

config MALI_GATOR_SUPPORT
	bool "Enable Streamline tracing support"
	depends on MALI_MIDGARD && !BACKEND_USER
	default y
	help
	  Enables kbase tracing used by the Arm Streamline Performance Analyzer.
	  The tracepoints are used to derive GPU activity charts in Streamline.

config MALI_MIDGARD_DVFS
	bool "Enable legacy DVFS"
	depends on MALI_MIDGARD && !MALI_DEVFREQ
	default n
	help
	  Choose this option to enable legacy DVFS in the Mali Midgard DDK.

config MALI_MIDGARD_ENABLE_TRACE
	bool "Enable kbase tracing"
	depends on MALI_MIDGARD
	default n
	help
	  Enables tracing in kbase.  Trace log available through
	  the "mali_trace" debugfs file, when the CONFIG_DEBUG_FS is enabled

config MALI_DEVFREQ
	bool "devfreq support for Mali"
	depends on MALI_MIDGARD
	default y if PLATFORM_JUNO
	default y if PLATFORM_CUSTOM
	help
	  Support devfreq for Mali.

	  Using the devfreq framework and, by default, the simpleondemand
	  governor, the frequency of Mali will be dynamically selected from the
	  available OPPs.

config MALI_DMA_FENCE
	bool "DMA_BUF fence support for Mali"
	depends on MALI_MIDGARD
	default n
	help
	  Support DMA_BUF fences for Mali.

	  This option should only be enabled if the Linux Kernel has built in
	  support for DMA_BUF fences.

config MALI_PLATFORM_NAME
	depends on MALI_MIDGARD
	string "Platform name"
	default "hisilicon" if PLATFORM_HIKEY960
	default "hisilicon" if PLATFORM_HIKEY970
	default "devicetree"
	help
	  Enter the name of the desired platform configuration directory to
	  include in the build. 'platform/$(MALI_PLATFORM_NAME)/Kbuild' must
	  exist.

	  When PLATFORM_CUSTOM is set, this needs to be set manually to
	  pick up the desired platform files.

# MALI_EXPERT configuration options

menuconfig MALI_EXPERT
	depends on MALI_MIDGARD
	bool "Enable Expert Settings"
	default y
	help
	  Enabling this option and modifying the default settings may produce a driver with performance or
	  other limitations.

config MALI_CORESTACK
	bool "Support controlling power to the GPU core stack"
	depends on MALI_MIDGARD && MALI_EXPERT
	default n
	help
	  Enabling this feature on supported GPUs will let the driver powering
	  on/off the GPU core stack independently without involving the Power
	  Domain Controller. This should only be enabled on platforms which
	  integration of the PDC to the Mali GPU is known to be problematic.
	  This feature is currently only supported on t-Six and t-HEx GPUs.

	  If unsure, say N.

config MALI_PLATFORM_POWER_DOWN_ONLY
	bool "Support disabling the power down of individual cores"
	depends on MALI_MIDGARD && MALI_EXPERT
	default n
	help
	  Enabling this feature will let the driver avoid power down of the
	  shader cores, the tiler, and the L2 cache.
	  The entire GPU would be powered down at once through the platform
	  specific code.
	  This may be required for certain platform configurations only.
	  This also limits the available power policies.

	  If unsure, say N.

config MALI_DEBUG
	bool "Debug build"
	depends on MALI_MIDGARD && MALI_EXPERT
	default y if DEBUG
	default n
	help
	  Select this option for increased checking and reporting of errors.

config MALI_FENCE_DEBUG
	bool "Debug sync fence usage"
	depends on MALI_MIDGARD && MALI_EXPERT
	default y if MALI_DEBUG
	help
	  Select this option to enable additional checking and reporting on the
	  use of sync fences in the Mali driver.

	  This will add a 3s timeout to all sync fence waits in the Mali
	  driver, so that when work for Mali has been waiting on a sync fence
	  for a long time a debug message will be printed, detailing what fence
	  is causing the block, and which dependent Mali atoms are blocked as a
	  result of this.

	  The timeout can be changed at runtime through the js_soft_timeout
	  device attribute, where the timeout is specified in milliseconds.

choice
	prompt "Error injection level"
	default MALI_ERROR_INJECT_NONE
	help
	  Enables insertion of errors to test module failure and recovery mechanisms.

config MALI_ERROR_INJECT_NONE
	bool "disabled"
	help
	  Error injection is disabled.

config MALI_ERROR_INJECT_TRACK_LIST
	bool "error track list"
	depends on MALI_MIDGARD && MALI_EXPERT && NO_MALI
	help
	  Errors to inject are pre-configured by the user.

config MALI_ERROR_INJECT_RANDOM
	bool "random error injection"
	depends on MALI_MIDGARD && MALI_EXPERT && NO_MALI
	help
	  Injected errors are random, rather than user-driven.

endchoice

config MALI_ERROR_INJECT_ON
	string
	default "0" if MALI_ERROR_INJECT_NONE
	default "1" if MALI_ERROR_INJECT_TRACK_LIST
	default "2" if MALI_ERROR_INJECT_RANDOM

config MALI_ERROR_INJECT
	bool
	default y if !MALI_ERROR_INJECT_NONE

config MALI_SYSTEM_TRACE
	bool "Enable system event tracing support"
	depends on MALI_MIDGARD && MALI_EXPERT
	default n
	help
	  Choose this option to enable system trace events for each
	  kbase event.	This is typically used for debugging but has
	  minimal overhead when not in use. Enable only if you know what
	  you are doing.

config MALI_2MB_ALLOC
	bool "Attempt to allocate 2MB pages"
	depends on MALI_MIDGARD && MALI_EXPERT
	default n
	help
	  Rather than allocating all GPU memory page-by-page, attempt to
	  allocate 2MB pages from the kernel. This reduces TLB pressure and
	  helps to prevent memory fragmentation.

	  If in doubt, say N

config MALI_PWRSOFT_765
	bool "PWRSOFT-765 ticket"
	depends on MALI_MIDGARD && MALI_EXPERT
	default n
	help
	  PWRSOFT-765 fixes devfreq cooling devices issues. However, they are
	  not merged in mainline kernel yet. So this define helps to guard those
	  parts of the code.

config MALI_MEMORY_FULLY_BACKED
	bool "Memory fully physically-backed"
	default n
	help
	  This option enables full backing of all virtual memory allocations
	  for the kernel. This only affects grow-on-GPU-page-fault memory.

config MALI_DMA_BUF_MAP_ON_DEMAND
	bool "Map imported dma-bufs on demand"
	depends on MALI_MIDGARD
	default n
	default y if !DMA_BUF_SYNC_IOCTL_SUPPORTED
	help
	  This option caused kbase to set up the GPU mapping of imported
	  dma-buf when needed to run atoms.  This is the legacy behaviour.

config MALI_DMA_BUF_LEGACY_COMPAT
	bool "Enable legacy compatibility cache flush on dma-buf map"
	depends on MALI_MIDGARD && !MALI_DMA_BUF_MAP_ON_DEMAND
	default y
	help
	  This option enables compatibility with legacy dma-buf mapping
	  behavior, then the dma-buf is mapped on import, by adding cache
	  maintenance where MALI_DMA_BUF_MAP_ON_DEMAND would do the mapping,
	  including a cache flush.

config MALI_REAL_HW
	bool
	default y
	default n if NO_MALI

# Instrumentation options.

# config MALI_JOB_DUMP exists in the Kernel Kconfig but is configured using CINSTR_JOB_DUMP in Mconfig.
# config MALI_PRFCNT_SET_SECONDARY exists in the Kernel Kconfig but is configured using CINSTR_SECONDARY_HWC in Mconfig.

source "kernel/drivers/gpu/arm/midgard/tests/Mconfig"