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