Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) # SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) # (C) COPYRIGHT 2012-2022 ARM Limited. All rights reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) # This program is free software and is provided to you under the terms of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) # GNU General Public License version 2 as published by the Free Software
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) # Foundation, and any use by you of this program is subject to the terms
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) # of such GNU license.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) # This program is distributed in the hope that it will be useful,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) # but WITHOUT ANY WARRANTY; without even the implied warranty of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) # GNU General Public License for more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) # You should have received a copy of the GNU General Public License
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) # along with this program; if not, you can access it online at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) # http://www.gnu.org/licenses/gpl-2.0.html.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) menuconfig MALI_BIFROST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 	bool "Mali Midgard series support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 	default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	  Enable this option to build support for a ARM Mali Midgard GPU.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 	  To compile this driver as a module, choose M here:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 	  this will generate a single module, called mali_kbase.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) config MALI_PLATFORM_NAME
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 	depends on MALI_BIFROST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 	string "Platform name"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 	default "hisilicon" if PLATFORM_HIKEY960
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 	default "hisilicon" if PLATFORM_HIKEY970
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 	default "devicetree"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 	  Enter the name of the desired platform configuration directory to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 	  include in the build. 'platform/$(MALI_PLATFORM_NAME)/Kbuild' must
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 	  exist.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 	  When PLATFORM_CUSTOM is set, this needs to be set manually to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 	  pick up the desired platform files.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) config MALI_REAL_HW
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 	depends on MALI_BIFROST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	default n if NO_MALI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) config MALI_PLATFORM_DT_PIN_RST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 	bool "Enable Juno GPU Pin reset"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 	depends on MALI_BIFROST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 	default y if BUSLOG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 	  Enables support for GPUs pin reset on Juno platforms.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) config MALI_CSF_SUPPORT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 	bool "Enable Mali CSF based GPU support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	depends on MALI_BIFROST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	default y if GPU_HAS_CSF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	  Enables support for CSF based GPUs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) config MALI_BIFROST_DEVFREQ
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	bool "Enable devfreq support for Mali"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	depends on MALI_BIFROST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 	default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 	  Support devfreq for Mali.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	  Using the devfreq framework and, by default, the simple on-demand
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	  governor, the frequency of Mali will be dynamically selected from the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	  available OPPs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) config MALI_BIFROST_DVFS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	bool "Enable legacy DVFS"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	depends on MALI_BIFROST && !MALI_BIFROST_DEVFREQ
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	  Choose this option to enable legacy DVFS in the Mali Midgard DDK.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) config MALI_BIFROST_GATOR_SUPPORT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	bool "Enable Streamline tracing support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	depends on MALI_BIFROST && !BACKEND_USER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 	default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 	  Enables kbase tracing used by the Arm Streamline Performance Analyzer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	  The tracepoints are used to derive GPU activity charts in Streamline.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) config MALI_BIFROST_ENABLE_TRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 	bool "Enable kbase tracing"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 	depends on MALI_BIFROST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 	default y if MALI_BIFROST_DEBUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	  Enables tracing in kbase. Trace log available through
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	  the "mali_trace" debugfs file, when the CONFIG_DEBUG_FS is enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) config MALI_BIFROST_DMA_FENCE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	bool "Enable DMA_BUF fence support for Mali"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	depends on MALI_BIFROST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	  Support DMA_BUF fences for Mali.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	  This option should only be enabled if the Linux Kernel has built in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	  support for DMA_BUF fences.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) config MALI_ARBITER_SUPPORT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	bool "Enable arbiter support for Mali"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 	depends on MALI_BIFROST && !MALI_CSF_SUPPORT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	  Enable support for the arbiter interface in the driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 	  This allows an external arbiter to manage driver access
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	  to GPU hardware in a virtualized environment
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	  If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) config DMA_BUF_SYNC_IOCTL_SUPPORTED
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	bool "Enable Kernel DMA buffers support DMA_BUF_IOCTL_SYNC"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	depends on MALI_BIFROST && BACKEND_KERNEL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) config MALI_DMA_BUF_MAP_ON_DEMAND
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 	bool "Enable map imported dma-bufs on demand"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	depends on MALI_BIFROST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 	default y if !DMA_BUF_SYNC_IOCTL_SUPPORTED
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 	  This option caused kbase to set up the GPU mapping of imported
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 	  dma-buf when needed to run atoms. This is the legacy behavior.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	  This is intended for testing and the option will get removed in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	  future.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) config MALI_DMA_BUF_LEGACY_COMPAT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 	bool "Enable legacy compatibility cache flush on dma-buf map"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	depends on MALI_BIFROST && !MALI_DMA_BUF_MAP_ON_DEMAND
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 	  This option enables compatibility with legacy dma-buf mapping
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	  behavior, then the dma-buf is mapped on import, by adding cache
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	  maintenance where MALI_DMA_BUF_MAP_ON_DEMAND would do the mapping,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	  including a cache flush.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	  This option might work-around issues related to missing cache
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 	  flushes in other drivers. This only has an effect for clients using
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 	  UK 11.18 or older. For later UK versions it is not possible.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) menuconfig MALI_BIFROST_EXPERT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 	depends on MALI_BIFROST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	bool "Enable Expert Settings"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 	  Enabling this option and modifying the default settings may produce
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 	  a driver with performance or other limitations.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) config MALI_2MB_ALLOC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 	bool "Attempt to allocate 2MB pages"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 	  Rather than allocating all GPU memory page-by-page, attempt to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 	  allocate 2MB pages from the kernel. This reduces TLB pressure and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 	  helps to prevent memory fragmentation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 	  If in doubt, say N
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) config MALI_MEMORY_FULLY_BACKED
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 	bool "Enable memory fully physically-backed"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 	  This option enables full physical backing of all virtual
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	  memory allocations in the kernel. Notice that this build
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	  option only affects allocations of grow-on-GPU-page-fault
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	  memory.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) config MALI_CORESTACK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	bool "Enable support of GPU core stack power control"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 	  Enabling this feature on supported GPUs will let the driver powering
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 	  on/off the GPU core stack independently without involving the Power
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 	  Domain Controller. This should only be enabled on platforms which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 	  integration of the PDC to the Mali GPU is known to be problematic.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 	  This feature is currently only supported on t-Six and t-HEx GPUs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 	  If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) config MALI_FW_CORE_DUMP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 	bool "Enable support for FW core dump"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT && MALI_CSF_SUPPORT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 	  Adds ability to request firmware core dump
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 	  Example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 	  * To explicitly request core dump:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 		echo 1 >/sys/kernel/debug/mali0/fw_core_dump
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 	  * To output current core dump (after explicitly requesting a core dump,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 	    or kernel driver reported an internal firmware error):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206)                 cat /sys/kernel/debug/mali0/fw_core_dump
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) choice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 	prompt "Error injection level"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 	default MALI_ERROR_INJECT_NONE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 	  Enables insertion of errors to test module failure and recovery mechanisms.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) config MALI_ERROR_INJECT_NONE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 	bool "disabled"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 	  Error injection is disabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) config MALI_ERROR_INJECT_TRACK_LIST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 	bool "error track list"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT && NO_MALI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 	  Errors to inject are pre-configured by the user.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) config MALI_ERROR_INJECT_RANDOM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 	bool "random error injection"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT && NO_MALI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 	  Injected errors are random, rather than user-driven.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) endchoice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) config MALI_ERROR_INJECT_ON
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 	string
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) 	default "0" if MALI_ERROR_INJECT_NONE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 	default "1" if MALI_ERROR_INJECT_TRACK_LIST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) 	default "2" if MALI_ERROR_INJECT_RANDOM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) config MALI_BIFROST_ERROR_INJECT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) 	bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) 	default y if !MALI_ERROR_INJECT_NONE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) config MALI_GEM5_BUILD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) 	bool "Enable build of Mali kernel driver for GEM5"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) 	  This option is to do a Mali GEM5 build.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) 	  If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) config MALI_BIFROST_DEBUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 	bool "Enable debug build"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 	default y if DEBUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) 	  Select this option for increased checking and reporting of errors.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) config MALI_BIFROST_FENCE_DEBUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) 	bool "Enable debug sync fence usage"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) 	default y if MALI_BIFROST_DEBUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) 	  Select this option to enable additional checking and reporting on the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) 	  use of sync fences in the Mali driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) 	  This will add a 3s timeout to all sync fence waits in the Mali
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) 	  driver, so that when work for Mali has been waiting on a sync fence
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) 	  for a long time a debug message will be printed, detailing what fence
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) 	  is causing the block, and which dependent Mali atoms are blocked as a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) 	  result of this.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) 	  The timeout can be changed at runtime through the js_soft_timeout
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) 	  device attribute, where the timeout is specified in milliseconds.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) config MALI_BIFROST_SYSTEM_TRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) 	bool "Enable system event tracing support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) 	default y if MALI_BIFROST_DEBUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) 	  Choose this option to enable system trace events for each
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) 	  kbase event. This is typically used for debugging but has
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) 	  minimal overhead when not in use. Enable only if you know what
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) 	  you are doing.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) # Instrumentation options.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) # config MALI_PRFCNT_SET_PRIMARY exists in the Kernel Kconfig but is configured using CINSTR_PRIMARY_HWC in Mconfig.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) # config MALI_BIFROST_PRFCNT_SET_SECONDARY exists in the Kernel Kconfig but is configured using CINSTR_SECONDARY_HWC in Mconfig.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) # config MALI_PRFCNT_SET_TERTIARY exists in the Kernel Kconfig but is configured using CINSTR_TERTIARY_HWC in Mconfig.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) # config MALI_PRFCNT_SET_SELECT_VIA_DEBUG_FS exists in the Kernel Kconfig but is configured using CINSTR_HWC_SET_SELECT_VIA_DEBUG_FS in Mconfig.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) config MALI_JOB_DUMP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) 	bool "Enable system level support needed for job dumping"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) 	  Choose this option to enable system level support needed for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) 	  job dumping. This is typically used for instrumentation but has
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) 	  minimal overhead when not in use. Enable only if you know what
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) 	  you are doing.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) config MALI_PWRSOFT_765
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) 	bool "Enable workaround for PWRSOFT-765"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) 	  PWRSOFT-765 fixes devfreq cooling devices issues. The fix was merged
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) 	  in kernel v4.10, however if backported into the kernel then this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) 	  option must be manually selected.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) 	  If using kernel >= v4.10 then say N, otherwise if devfreq cooling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) 	  changes have been backported say Y to avoid compilation errors.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) config MALI_HW_ERRATA_1485982_NOT_AFFECTED
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) 	bool "Disable workaround for BASE_HW_ISSUE_GPU2017_1336"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) 	default y if PLATFORM_JUNO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) 	  This option disables the default workaround for GPU2017-1336. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) 	  workaround keeps the L2 cache powered up except for powerdown and reset.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) 	  The workaround introduces a limitation that will prevent the running of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) 	  protected mode content on fully coherent platforms, as the switch to IO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) 	  coherency mode requires the L2 to be turned off.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) config MALI_HW_ERRATA_1485982_USE_CLOCK_ALTERNATIVE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) 	bool "Use alternative workaround for BASE_HW_ISSUE_GPU2017_1336"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT && !MALI_HW_ERRATA_1485982_NOT_AFFECTED
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) 	  This option uses an alternative workaround for GPU2017-1336. Lowering
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) 	  the GPU clock to a, platform specific, known good frequeuncy before
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) 	  powering down the L2 cache. The clock can be specified in the device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) 	  tree using the property, opp-mali-errata-1485982. Otherwise the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) 	  slowest clock will be selected.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) source "kernel/drivers/gpu/arm/midgard/arbitration/Mconfig"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) source "kernel/drivers/gpu/arm/midgard/tests/Mconfig"