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