|
| 1 | +# |
| 2 | +# (C) COPYRIGHT 2012-2017 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 | + |
| 17 | +menuconfig MALI_BIFROST |
| 18 | + tristate "Mali Bifrost series support" |
| 19 | + select GPU_TRACEPOINTS if ANDROID |
| 20 | + default n |
| 21 | + help |
| 22 | + Enable this option to build support for a ARM Mali Bifrost GPU. |
| 23 | + |
| 24 | + To compile this driver as a module, choose M here: |
| 25 | + this will generate a single module, called mali_kbase. |
| 26 | + |
| 27 | +config MALI_BIFROST_GATOR_SUPPORT |
| 28 | + bool "Streamline support via Gator" |
| 29 | + depends on MALI_BIFROST |
| 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 | + |
| 37 | +config MALI_BIFROST_DVFS |
| 38 | + bool "Enable legacy DVFS" |
| 39 | + depends on MALI_BIFROST && !MALI_BIFROST_DEVFREQ |
| 40 | + default n |
| 41 | + help |
| 42 | + Choose this option to enable legacy DVFS in the Mali Midgard DDK. |
| 43 | + |
| 44 | +config MALI_BIFROST_ENABLE_TRACE |
| 45 | + bool "Enable kbase tracing" |
| 46 | + depends on MALI_BIFROST |
| 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 | + |
| 52 | +config MALI_BIFROST_DEVFREQ |
| 53 | + bool "devfreq support for Mali" |
| 54 | + depends on MALI_BIFROST && 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 | + |
| 62 | +config MALI_BIFROST_DMA_FENCE |
| 63 | + bool "DMA_BUF fence support for Mali" |
| 64 | + depends on MALI_BIFROST && !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 | +config MALI_PLATFORM_NAME |
| 73 | + depends on MALI_BIFROST |
| 74 | + string "Platform name" |
| 75 | + default "devicetree" |
| 76 | + help |
| 77 | + Enter the name of the desired platform configuration directory to |
| 78 | + include in the build. 'platform/$(MALI_PLATFORM_NAME)/Kbuild' must |
| 79 | + exist. |
| 80 | + |
| 81 | +# MALI_BIFROST_EXPERT configuration options |
| 82 | + |
| 83 | +menuconfig MALI_BIFROST_EXPERT |
| 84 | + depends on MALI_BIFROST |
| 85 | + bool "Enable Expert Settings" |
| 86 | + default n |
| 87 | + help |
| 88 | + Enabling this option and modifying the default settings may produce a driver with performance or |
| 89 | + other limitations. |
| 90 | + |
| 91 | +config MALI_CORESTACK |
| 92 | + bool "Support controlling power to the GPU core stack" |
| 93 | + depends on MALI_BIFROST && MALI_BIFROST_EXPERT |
| 94 | + default n |
| 95 | + help |
| 96 | + Enabling this feature on supported GPUs will let the driver powering |
| 97 | + on/off the GPU core stack independently without involving the Power |
| 98 | + Domain Controller. This should only be enabled on platforms which |
| 99 | + integration of the PDC to the Mali GPU is known to be problematic. |
| 100 | + This feature is currently only supported on t-Six and t-HEx GPUs. |
| 101 | + |
| 102 | + If unsure, say N. |
| 103 | + |
| 104 | +config MALI_BIFROST_PRFCNT_SET_SECONDARY |
| 105 | + bool "Use secondary set of performance counters" |
| 106 | + depends on MALI_BIFROST && MALI_BIFROST_EXPERT |
| 107 | + default n |
| 108 | + help |
| 109 | + Select this option to use secondary set of performance counters. Kernel |
| 110 | + features that depend on an access to the primary set of counters may |
| 111 | + become unavailable. Enabling this option will prevent power management |
| 112 | + from working optimally and may cause instrumentation tools to return |
| 113 | + bogus results. |
| 114 | + |
| 115 | + If unsure, say N. |
| 116 | + |
| 117 | +config MALI_BIFROST_DEBUG |
| 118 | + bool "Debug build" |
| 119 | + depends on MALI_BIFROST && MALI_BIFROST_EXPERT |
| 120 | + default n |
| 121 | + help |
| 122 | + Select this option for increased checking and reporting of errors. |
| 123 | + |
| 124 | +config MALI_BIFROST_FENCE_DEBUG |
| 125 | + bool "Debug sync fence usage" |
| 126 | + depends on MALI_BIFROST && MALI_BIFROST_EXPERT && (SYNC || SYNC_FILE) |
| 127 | + default y if MALI_BIFROST_DEBUG |
| 128 | + help |
| 129 | + Select this option to enable additional checking and reporting on the |
| 130 | + use of sync fences in the Mali driver. |
| 131 | + |
| 132 | + This will add a 3s timeout to all sync fence waits in the Mali |
| 133 | + driver, so that when work for Mali has been waiting on a sync fence |
| 134 | + for a long time a debug message will be printed, detailing what fence |
| 135 | + is causing the block, and which dependent Mali atoms are blocked as a |
| 136 | + result of this. |
| 137 | + |
| 138 | + The timeout can be changed at runtime through the js_soft_timeout |
| 139 | + device attribute, where the timeout is specified in milliseconds. |
| 140 | + |
| 141 | +config MALI_BIFROST_NO_MALI |
| 142 | + bool "No Mali" |
| 143 | + depends on MALI_BIFROST && MALI_BIFROST_EXPERT |
| 144 | + default n |
| 145 | + help |
| 146 | + This can be used to test the driver in a simulated environment |
| 147 | + whereby the hardware is not physically present. If the hardware is physically |
| 148 | + present it will not be used. This can be used to test the majority of the |
| 149 | + driver without needing actual hardware or for software benchmarking. |
| 150 | + All calls to the simulated hardware will complete immediately as if the hardware |
| 151 | + completed the task. |
| 152 | + |
| 153 | +config MALI_BIFROST_ERROR_INJECT |
| 154 | + bool "Error injection" |
| 155 | + depends on MALI_BIFROST && MALI_BIFROST_EXPERT && MALI_BIFROST_NO_MALI |
| 156 | + default n |
| 157 | + help |
| 158 | + Enables insertion of errors to test module failure and recovery mechanisms. |
| 159 | + |
| 160 | +config MALI_BIFROST_TRACE_TIMELINE |
| 161 | + bool "Timeline tracing" |
| 162 | + depends on MALI_BIFROST && MALI_BIFROST_EXPERT |
| 163 | + default n |
| 164 | + help |
| 165 | + Enables timeline tracing through the kernel tracepoint system. |
| 166 | + |
| 167 | +config MALI_BIFROST_SYSTEM_TRACE |
| 168 | + bool "Enable system event tracing support" |
| 169 | + depends on MALI_BIFROST && MALI_BIFROST_EXPERT |
| 170 | + default n |
| 171 | + help |
| 172 | + Choose this option to enable system trace events for each |
| 173 | + kbase event. This is typically used for debugging but has |
| 174 | + minimal overhead when not in use. Enable only if you know what |
| 175 | + you are doing. |
| 176 | + |
| 177 | +config MALI_2MB_ALLOC |
| 178 | + bool "Attempt to allocate 2MB pages" |
| 179 | + depends on MALI_BIFROST && MALI_BIFROST_EXPERT |
| 180 | + default n |
| 181 | + help |
| 182 | + Rather than allocating all GPU memory page-by-page, attempt to |
| 183 | + allocate 2MB pages from the kernel. This reduces TLB pressure and |
| 184 | + helps to prevent memory fragmentation. |
| 185 | + |
| 186 | + If in doubt, say N |
| 187 | + |
| 188 | +config MALI_PWRSOFT_765 |
| 189 | + bool "PWRSOFT-765 ticket" |
| 190 | + default n |
| 191 | + help |
| 192 | + PWRSOFT-765 fixes devfreq cooling devices issues. However, they are |
| 193 | + not merged in mainline kernel yet. So this define helps to guard those |
| 194 | + parts of the code. |
| 195 | + |
| 196 | +source "drivers/gpu/arm/bifrost/platform/Kconfig" |
| 197 | +# source "drivers/gpu/arm/bifrost/tests/Kconfig" |
0 commit comments