xref: /OK3568_Linux_fs/kernel/drivers/gpu/arm/midgard/Kconfig (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun#
2*4882a593Smuzhiyun# (C) COPYRIGHT 2012-2015 ARM Limited. All rights reserved.
3*4882a593Smuzhiyun#
4*4882a593Smuzhiyun# This program is free software and is provided to you under the terms of the
5*4882a593Smuzhiyun# GNU General Public License version 2 as published by the Free Software
6*4882a593Smuzhiyun# Foundation, and any use by you of this program is subject to the terms
7*4882a593Smuzhiyun# of such GNU licence.
8*4882a593Smuzhiyun#
9*4882a593Smuzhiyun# A copy of the licence is included with the program, and can also be obtained
10*4882a593Smuzhiyun# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
11*4882a593Smuzhiyun# Boston, MA  02110-1301, USA.
12*4882a593Smuzhiyun#
13*4882a593Smuzhiyun#
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun
17*4882a593Smuzhiyunmenuconfig MALI_MIDGARD
18*4882a593Smuzhiyun	tristate "Mali Midgard series support"
19*4882a593Smuzhiyun	select GPU_TRACEPOINTS if ANDROID
20*4882a593Smuzhiyun	default n
21*4882a593Smuzhiyun	help
22*4882a593Smuzhiyun	  Enable this option to build support for a ARM Mali Midgard GPU.
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun	  To compile this driver as a module, choose M here:
25*4882a593Smuzhiyun	  this will generate a single module, called mali_kbase.
26*4882a593Smuzhiyun
27*4882a593Smuzhiyunconfig MALI_GATOR_SUPPORT
28*4882a593Smuzhiyun	bool "Streamline support via Gator"
29*4882a593Smuzhiyun	depends on MALI_MIDGARD
30*4882a593Smuzhiyun	default n
31*4882a593Smuzhiyun	help
32*4882a593Smuzhiyun	  Adds diagnostic support for use with the ARM Streamline Performance Analyzer.
33*4882a593Smuzhiyun	  You will need the Gator device driver already loaded before loading this driver when enabling
34*4882a593Smuzhiyun	  Streamline debug support.
35*4882a593Smuzhiyun	  This is a legacy interface required by older versions of Streamline.
36*4882a593Smuzhiyun
37*4882a593Smuzhiyunconfig MALI_MIDGARD_DVFS
38*4882a593Smuzhiyun	bool "Enable legacy DVFS"
39*4882a593Smuzhiyun	depends on MALI_MIDGARD && !MALI_DEVFREQ && !MALI_PLATFORM_DEVICETREE
40*4882a593Smuzhiyun	default n
41*4882a593Smuzhiyun	help
42*4882a593Smuzhiyun	  Choose this option to enable legacy DVFS in the Mali Midgard DDK.
43*4882a593Smuzhiyun
44*4882a593Smuzhiyunconfig MALI_MIDGARD_ENABLE_TRACE
45*4882a593Smuzhiyun	bool "Enable kbase tracing"
46*4882a593Smuzhiyun	depends on MALI_MIDGARD
47*4882a593Smuzhiyun	default n
48*4882a593Smuzhiyun	help
49*4882a593Smuzhiyun	  Enables tracing in kbase.  Trace log available through
50*4882a593Smuzhiyun	  the "mali_trace" debugfs file, when the CONFIG_DEBUG_FS is enabled
51*4882a593Smuzhiyun
52*4882a593Smuzhiyunconfig MALI_DEVFREQ
53*4882a593Smuzhiyun	bool "devfreq support for Mali"
54*4882a593Smuzhiyun	depends on MALI_MIDGARD && PM_DEVFREQ
55*4882a593Smuzhiyun	select DEVFREQ_GOV_SIMPLE_ONDEMAND
56*4882a593Smuzhiyun	help
57*4882a593Smuzhiyun	  Support devfreq for Mali.
58*4882a593Smuzhiyun
59*4882a593Smuzhiyun	  Using the devfreq framework and, by default, the simpleondemand
60*4882a593Smuzhiyun	  governor, the frequency of Mali will be dynamically selected from the
61*4882a593Smuzhiyun	  available OPPs.
62*4882a593Smuzhiyun
63*4882a593Smuzhiyunconfig MALI_DMA_FENCE
64*4882a593Smuzhiyun	bool "DMA_BUF fence support for Mali"
65*4882a593Smuzhiyun	depends on MALI_MIDGARD && !KDS
66*4882a593Smuzhiyun	default n
67*4882a593Smuzhiyun	help
68*4882a593Smuzhiyun	  Support DMA_BUF fences for Mali.
69*4882a593Smuzhiyun
70*4882a593Smuzhiyun	  This option should only be enabled if KDS is not present and
71*4882a593Smuzhiyun	  the Linux Kernel has built in support for DMA_BUF fences.
72*4882a593Smuzhiyun
73*4882a593Smuzhiyun# MALI_EXPERT configuration options
74*4882a593Smuzhiyun
75*4882a593Smuzhiyunmenuconfig MALI_EXPERT
76*4882a593Smuzhiyun	depends on MALI_MIDGARD
77*4882a593Smuzhiyun	bool "Enable Expert Settings"
78*4882a593Smuzhiyun	default n
79*4882a593Smuzhiyun	help
80*4882a593Smuzhiyun	  Enabling this option and modifying the default settings may produce a driver with performance or
81*4882a593Smuzhiyun	  other limitations.
82*4882a593Smuzhiyun
83*4882a593Smuzhiyunconfig MALI_CORESTACK
84*4882a593Smuzhiyun	bool "Support controlling power to the GPU core stack"
85*4882a593Smuzhiyun	depends on MALI_MIDGARD && MALI_EXPERT
86*4882a593Smuzhiyun	default n
87*4882a593Smuzhiyun	help
88*4882a593Smuzhiyun	  Enabling this feature on supported GPUs will let the driver powering
89*4882a593Smuzhiyun	  on/off the GPU core stack independently without involving the Power
90*4882a593Smuzhiyun	  Domain Controller. This should only be enabled on platforms which
91*4882a593Smuzhiyun	  integration of the PDC to the Mali GPU is known to be problematic.
92*4882a593Smuzhiyun	  This feature is currently only supported on t-Six and t-HEx GPUs.
93*4882a593Smuzhiyun
94*4882a593Smuzhiyun	  If unsure, say N.
95*4882a593Smuzhiyun
96*4882a593Smuzhiyunconfig MALI_PRFCNT_SET_SECONDARY
97*4882a593Smuzhiyun	bool "Use secondary set of performance counters"
98*4882a593Smuzhiyun	depends on MALI_MIDGARD && MALI_EXPERT
99*4882a593Smuzhiyun	default n
100*4882a593Smuzhiyun	help
101*4882a593Smuzhiyun	  Select this option to use secondary set of performance counters. Kernel
102*4882a593Smuzhiyun	  features that depend on an access to the primary set of counters may
103*4882a593Smuzhiyun	  become unavailable. Enabling this option will prevent power management
104*4882a593Smuzhiyun	  from working optimally and may cause instrumentation tools to return
105*4882a593Smuzhiyun	  bogus results.
106*4882a593Smuzhiyun
107*4882a593Smuzhiyun	  If unsure, say N.
108*4882a593Smuzhiyun
109*4882a593Smuzhiyunconfig MALI_PLATFORM_FAKE
110*4882a593Smuzhiyun	bool "Enable fake platform device support"
111*4882a593Smuzhiyun	depends on MALI_MIDGARD && MALI_EXPERT
112*4882a593Smuzhiyun	default n
113*4882a593Smuzhiyun	help
114*4882a593Smuzhiyun	  When you start to work with the Mali Midgard series device driver the platform-specific code of
115*4882a593Smuzhiyun	  the Linux kernel for your platform may not be complete. In this situation the kernel device driver
116*4882a593Smuzhiyun	  supports creating the platform device outside of the Linux platform-specific code.
117*4882a593Smuzhiyun	  Enable this option if would like to use a platform device configuration from within the device driver.
118*4882a593Smuzhiyun
119*4882a593Smuzhiyunchoice
120*4882a593Smuzhiyun	prompt "Platform configuration"
121*4882a593Smuzhiyun	depends on MALI_MIDGARD && MALI_EXPERT
122*4882a593Smuzhiyun	default MALI_PLATFORM_DEVICETREE
123*4882a593Smuzhiyun	help
124*4882a593Smuzhiyun	  Select the SOC platform that contains a Mali Midgard GPU
125*4882a593Smuzhiyun
126*4882a593Smuzhiyunconfig MALI_PLATFORM_DEVICETREE
127*4882a593Smuzhiyun	bool "Device Tree platform"
128*4882a593Smuzhiyun	depends on OF
129*4882a593Smuzhiyun	help
130*4882a593Smuzhiyun	  Select this option to use Device Tree with the Mali driver.
131*4882a593Smuzhiyun
132*4882a593Smuzhiyun	  When using this option the Mali driver will get the details of the
133*4882a593Smuzhiyun	  GPU hardware from the Device Tree. This means that the same driver
134*4882a593Smuzhiyun	  binary can run on multiple platforms as long as all the GPU hardware
135*4882a593Smuzhiyun	  details are described in the device tree.
136*4882a593Smuzhiyun
137*4882a593Smuzhiyun	  Device Tree is the recommended method for the Mali driver platform
138*4882a593Smuzhiyun	  integration.
139*4882a593Smuzhiyun
140*4882a593Smuzhiyunconfig MALI_PLATFORM_VEXPRESS
141*4882a593Smuzhiyun	depends on ARCH_VEXPRESS && (ARCH_VEXPRESS_CA9X4 || ARCH_VEXPRESS_CA15X4)
142*4882a593Smuzhiyun	bool "Versatile Express"
143*4882a593Smuzhiyunconfig MALI_PLATFORM_VEXPRESS_VIRTEX7_40MHZ
144*4882a593Smuzhiyun	depends on ARCH_VEXPRESS && (ARCH_VEXPRESS_CA9X4 || ARCH_VEXPRESS_CA15X4)
145*4882a593Smuzhiyun	bool "Versatile Express w/Virtex7 @ 40Mhz"
146*4882a593Smuzhiyunconfig MALI_PLATFORM_GOLDFISH
147*4882a593Smuzhiyun	depends on ARCH_GOLDFISH
148*4882a593Smuzhiyun	bool "Android Goldfish virtual CPU"
149*4882a593Smuzhiyunconfig MALI_PLATFORM_PBX
150*4882a593Smuzhiyun	depends on ARCH_REALVIEW && REALVIEW_EB_A9MP && MACH_REALVIEW_PBX
151*4882a593Smuzhiyun	bool "Realview PBX-A9"
152*4882a593Smuzhiyunconfig MALI_PLATFORM_THIRDPARTY
153*4882a593Smuzhiyun	bool "Third Party Platform"
154*4882a593Smuzhiyunendchoice
155*4882a593Smuzhiyun
156*4882a593Smuzhiyunconfig MALI_PLATFORM_THIRDPARTY_NAME
157*4882a593Smuzhiyun	depends on MALI_MIDGARD && MALI_PLATFORM_THIRDPARTY && MALI_EXPERT
158*4882a593Smuzhiyun	string "Third party platform name"
159*4882a593Smuzhiyun	help
160*4882a593Smuzhiyun	  Enter the name of a third party platform that is supported. The third part configuration
161*4882a593Smuzhiyun	  file must be in midgard/config/tpip/mali_kbase_config_xxx.c where xxx is the name
162*4882a593Smuzhiyun	  specified here.
163*4882a593Smuzhiyun
164*4882a593Smuzhiyunconfig MALI_DEBUG
165*4882a593Smuzhiyun	bool "Debug build"
166*4882a593Smuzhiyun	depends on MALI_MIDGARD && MALI_EXPERT
167*4882a593Smuzhiyun	default n
168*4882a593Smuzhiyun	help
169*4882a593Smuzhiyun	  Select this option for increased checking and reporting of errors.
170*4882a593Smuzhiyun
171*4882a593Smuzhiyunconfig MALI_FENCE_DEBUG
172*4882a593Smuzhiyun	bool "Debug sync fence usage"
173*4882a593Smuzhiyun	depends on MALI_MIDGARD && MALI_EXPERT && (SYNC || SYNC_FILE)
174*4882a593Smuzhiyun	default y if MALI_DEBUG
175*4882a593Smuzhiyun	help
176*4882a593Smuzhiyun	  Select this option to enable additional checking and reporting on the
177*4882a593Smuzhiyun	  use of sync fences in the Mali driver.
178*4882a593Smuzhiyun
179*4882a593Smuzhiyun	  This will add a 3s timeout to all sync fence waits in the Mali
180*4882a593Smuzhiyun	  driver, so that when work for Mali has been waiting on a sync fence
181*4882a593Smuzhiyun	  for a long time a debug message will be printed, detailing what fence
182*4882a593Smuzhiyun	  is causing the block, and which dependent Mali atoms are blocked as a
183*4882a593Smuzhiyun	  result of this.
184*4882a593Smuzhiyun
185*4882a593Smuzhiyun	  The timeout can be changed at runtime through the js_soft_timeout
186*4882a593Smuzhiyun	  device attribute, where the timeout is specified in milliseconds.
187*4882a593Smuzhiyun
188*4882a593Smuzhiyunconfig MALI_NO_MALI
189*4882a593Smuzhiyun	bool "No Mali"
190*4882a593Smuzhiyun	depends on MALI_MIDGARD && MALI_EXPERT
191*4882a593Smuzhiyun	default n
192*4882a593Smuzhiyun	help
193*4882a593Smuzhiyun	  This can be used to test the driver in a simulated environment
194*4882a593Smuzhiyun	  whereby the hardware is not physically present. If the hardware is physically
195*4882a593Smuzhiyun	  present it will not be used. This can be used to test the majority of the
196*4882a593Smuzhiyun	  driver without needing actual hardware or for software benchmarking.
197*4882a593Smuzhiyun	  All calls to the simulated hardware will complete immediately as if the hardware
198*4882a593Smuzhiyun	  completed the task.
199*4882a593Smuzhiyun
200*4882a593Smuzhiyunconfig MALI_ERROR_INJECT
201*4882a593Smuzhiyun	bool "Error injection"
202*4882a593Smuzhiyun	depends on MALI_MIDGARD && MALI_EXPERT && MALI_NO_MALI
203*4882a593Smuzhiyun	default n
204*4882a593Smuzhiyun	help
205*4882a593Smuzhiyun	  Enables insertion of errors to test module failure and recovery mechanisms.
206*4882a593Smuzhiyun
207*4882a593Smuzhiyunconfig MALI_TRACE_TIMELINE
208*4882a593Smuzhiyun	bool "Timeline tracing"
209*4882a593Smuzhiyun	depends on MALI_MIDGARD && MALI_EXPERT
210*4882a593Smuzhiyun	default n
211*4882a593Smuzhiyun	help
212*4882a593Smuzhiyun	  Enables timeline tracing through the kernel tracepoint system.
213*4882a593Smuzhiyun
214*4882a593Smuzhiyunconfig MALI_SYSTEM_TRACE
215*4882a593Smuzhiyun	bool "Enable system event tracing support"
216*4882a593Smuzhiyun	depends on MALI_MIDGARD && MALI_EXPERT
217*4882a593Smuzhiyun	default n
218*4882a593Smuzhiyun	help
219*4882a593Smuzhiyun	  Choose this option to enable system trace events for each
220*4882a593Smuzhiyun	  kbase event.	This is typically used for debugging but has
221*4882a593Smuzhiyun	  minimal overhead when not in use. Enable only if you know what
222*4882a593Smuzhiyun	  you are doing.
223*4882a593Smuzhiyun
224*4882a593Smuzhiyunconfig MALI_GPU_MMU_AARCH64
225*4882a593Smuzhiyun	bool "Use AArch64 page tables"
226*4882a593Smuzhiyun	depends on MALI_MIDGARD && MALI_EXPERT
227*4882a593Smuzhiyun	default n
228*4882a593Smuzhiyun	help
229*4882a593Smuzhiyun	  Use AArch64 format page tables for the GPU instead of LPAE-style.
230*4882a593Smuzhiyun	  The two formats have the same functionality and performance but a
231*4882a593Smuzhiyun	  future GPU may deprecate or remove the legacy LPAE-style format.
232*4882a593Smuzhiyun
233*4882a593Smuzhiyun	  The LPAE-style format is supported on all Midgard and current Bifrost
234*4882a593Smuzhiyun	  GPUs. Enabling AArch64 format restricts the driver to only supporting
235*4882a593Smuzhiyun	  Bifrost GPUs.
236*4882a593Smuzhiyun
237*4882a593Smuzhiyun	  If in doubt, say N.
238*4882a593Smuzhiyun
239*4882a593Smuzhiyunconfig MALI_PWRSOFT_765
240*4882a593Smuzhiyun	bool "PWRSOFT-765 ticket"
241*4882a593Smuzhiyun	depends on MALI_MIDGARD && MALI_EXPERT
242*4882a593Smuzhiyun	default n
243*4882a593Smuzhiyun	help
244*4882a593Smuzhiyun	  PWRSOFT-765 fixes devfreq cooling devices issues. However, they are
245*4882a593Smuzhiyun	  not merged in mainline kernel yet. So this define helps to guard those
246*4882a593Smuzhiyun	  parts of the code.
247*4882a593Smuzhiyun
248*4882a593Smuzhiyunsource "drivers/gpu/arm/midgard/platform/Kconfig"
249*4882a593Smuzhiyunsource "drivers/gpu/arm/midgard/tests/Kconfig"
250