13d0407baSopenharmony_ci# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
23d0407baSopenharmony_ci#
33d0407baSopenharmony_ci# (C) COPYRIGHT 2012-2021 ARM Limited. All rights reserved.
43d0407baSopenharmony_ci#
53d0407baSopenharmony_ci# This program is free software and is provided to you under the terms of the
63d0407baSopenharmony_ci# GNU General Public License version 2 as published by the Free Software
73d0407baSopenharmony_ci# Foundation, and any use by you of this program is subject to the terms
83d0407baSopenharmony_ci# of such GNU license.
93d0407baSopenharmony_ci#
103d0407baSopenharmony_ci# This program is distributed in the hope that it will be useful,
113d0407baSopenharmony_ci# but WITHOUT ANY WARRANTY; without even the implied warranty of
123d0407baSopenharmony_ci# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
133d0407baSopenharmony_ci# GNU General Public License for more details.
143d0407baSopenharmony_ci#
153d0407baSopenharmony_ci# You should have received a copy of the GNU General Public License
163d0407baSopenharmony_ci# along with this program; if not, you can access it online at
173d0407baSopenharmony_ci# http://www.gnu.org/licenses/gpl-2.0.html.
183d0407baSopenharmony_ci#
193d0407baSopenharmony_ci#
203d0407baSopenharmony_ci
213d0407baSopenharmony_cimenuconfig MALI_BIFROST
223d0407baSopenharmony_ci	tristate "Mali Bifrost series support"
233d0407baSopenharmony_ci	select GPU_TRACEPOINTS if ANDROID
243d0407baSopenharmony_ci	select DMA_SHARED_BUFFER
253d0407baSopenharmony_ci	select PM_DEVFREQ
263d0407baSopenharmony_ci	select DEVFREQ_THERMAL
273d0407baSopenharmony_ci	select FW_LOADER
283d0407baSopenharmony_ci	default n
293d0407baSopenharmony_ci	help
303d0407baSopenharmony_ci	  Enable this option to build support for a ARM Mali Bifrost GPU.
313d0407baSopenharmony_ci
323d0407baSopenharmony_ci	  To compile this driver as a module, choose M here:
333d0407baSopenharmony_ci	  this will generate a single module, called mali_kbase.
343d0407baSopenharmony_ci
353d0407baSopenharmony_ciif MALI_BIFROST
363d0407baSopenharmony_ci
373d0407baSopenharmony_ciconfig MALI_PLATFORM_NAME
383d0407baSopenharmony_ci	depends on MALI_BIFROST
393d0407baSopenharmony_ci	string "Platform name"
403d0407baSopenharmony_ci	default "devicetree"
413d0407baSopenharmony_ci	help
423d0407baSopenharmony_ci	  Enter the name of the desired platform configuration directory to
433d0407baSopenharmony_ci	  include in the build. 'platform/$(MALI_PLATFORM_NAME)/Kbuild' must
443d0407baSopenharmony_ci	  exist.
453d0407baSopenharmony_ci
463d0407baSopenharmony_ciconfig MALI_REAL_HW
473d0407baSopenharmony_ci	depends on MALI_BIFROST
483d0407baSopenharmony_ci	def_bool !MALI_BIFROST_NO_MALI
493d0407baSopenharmony_ci
503d0407baSopenharmony_cimenu "Platform specific options"
513d0407baSopenharmony_cisource "vendor/drivers/gpu/arm/bifrost/platform/Kconfig"
523d0407baSopenharmony_ciendmenu
533d0407baSopenharmony_ci
543d0407baSopenharmony_ciconfig MALI_CSF_SUPPORT
553d0407baSopenharmony_ci	bool "Enable Mali CSF based GPU support"
563d0407baSopenharmony_ci	default n
573d0407baSopenharmony_ci	help
583d0407baSopenharmony_ci	  Enables support for CSF based GPUs.
593d0407baSopenharmony_ci
603d0407baSopenharmony_ciconfig MALI_BIFROST_DEVFREQ
613d0407baSopenharmony_ci	bool "Enable devfreq support for Mali"
623d0407baSopenharmony_ci	depends on MALI_BIFROST && PM_DEVFREQ
633d0407baSopenharmony_ci	select DEVFREQ_GOV_SIMPLE_ONDEMAND
643d0407baSopenharmony_ci	default y
653d0407baSopenharmony_ci	help
663d0407baSopenharmony_ci	  Support devfreq for Mali.
673d0407baSopenharmony_ci
683d0407baSopenharmony_ci	  Using the devfreq framework and, by default, the simple on-demand
693d0407baSopenharmony_ci	  governor, the frequency of Mali will be dynamically selected from the
703d0407baSopenharmony_ci	  available OPPs.
713d0407baSopenharmony_ci
723d0407baSopenharmony_ciconfig MALI_BIFROST_DVFS
733d0407baSopenharmony_ci	bool "Enable legacy DVFS"
743d0407baSopenharmony_ci	depends on MALI_BIFROST && !MALI_BIFROST_DEVFREQ
753d0407baSopenharmony_ci	default n
763d0407baSopenharmony_ci	help
773d0407baSopenharmony_ci	  Choose this option to enable legacy DVFS in the Mali Midgard DDK.
783d0407baSopenharmony_ci
793d0407baSopenharmony_ciconfig MALI_BIFROST_GATOR_SUPPORT
803d0407baSopenharmony_ci	bool "Enable Streamline tracing support"
813d0407baSopenharmony_ci	depends on MALI_BIFROST
823d0407baSopenharmony_ci	default y
833d0407baSopenharmony_ci	help
843d0407baSopenharmony_ci	  Enables kbase tracing used by the Arm Streamline Performance Analyzer.
853d0407baSopenharmony_ci	  The tracepoints are used to derive GPU activity charts in Streamline.
863d0407baSopenharmony_ci
873d0407baSopenharmony_ciconfig MALI_BIFROST_ENABLE_TRACE
883d0407baSopenharmony_ci	bool "Enable kbase tracing"
893d0407baSopenharmony_ci	depends on MALI_BIFROST
903d0407baSopenharmony_ci	default y if MALI_BIFROST_DEBUG
913d0407baSopenharmony_ci	default n
923d0407baSopenharmony_ci	help
933d0407baSopenharmony_ci	  Enables tracing in kbase. Trace log available through
943d0407baSopenharmony_ci	  the "mali_trace" debugfs file, when the CONFIG_DEBUG_FS is enabled
953d0407baSopenharmony_ci
963d0407baSopenharmony_ciconfig MALI_BIFROST_DMA_FENCE
973d0407baSopenharmony_ci	bool "Enable DMA_BUF fence support for Mali"
983d0407baSopenharmony_ci	depends on MALI_BIFROST
993d0407baSopenharmony_ci	default n
1003d0407baSopenharmony_ci	help
1013d0407baSopenharmony_ci	  Support DMA_BUF fences for Mali.
1023d0407baSopenharmony_ci
1033d0407baSopenharmony_ci	  This option should only be enabled if the Linux Kernel has built in
1043d0407baSopenharmony_ci	  support for DMA_BUF fences.
1053d0407baSopenharmony_ci
1063d0407baSopenharmony_ciconfig MALI_ARBITER_SUPPORT
1073d0407baSopenharmony_ci	bool "Enable arbiter support for Mali"
1083d0407baSopenharmony_ci	depends on MALI_BIFROST && !MALI_CSF_SUPPORT
1093d0407baSopenharmony_ci	default n
1103d0407baSopenharmony_ci	help
1113d0407baSopenharmony_ci	  Enable support for the arbiter interface in the driver.
1123d0407baSopenharmony_ci	  This allows an external arbiter to manage driver access
1133d0407baSopenharmony_ci	  to GPU hardware in a virtualized environment
1143d0407baSopenharmony_ci
1153d0407baSopenharmony_ci	  If unsure, say N.
1163d0407baSopenharmony_ci
1173d0407baSopenharmony_ciconfig MALI_DMA_BUF_MAP_ON_DEMAND
1183d0407baSopenharmony_ci	bool "Enable map imported dma-bufs on demand"
1193d0407baSopenharmony_ci	depends on MALI_BIFROST
1203d0407baSopenharmony_ci	default n
1213d0407baSopenharmony_ci	help
1223d0407baSopenharmony_ci	  This option caused kbase to set up the GPU mapping of imported
1233d0407baSopenharmony_ci	  dma-buf when needed to run atoms. This is the legacy behavior.
1243d0407baSopenharmony_ci
1253d0407baSopenharmony_ci	  This is intended for testing and the option will get removed in the
1263d0407baSopenharmony_ci	  future.
1273d0407baSopenharmony_ci
1283d0407baSopenharmony_ciconfig MALI_DMA_BUF_LEGACY_COMPAT
1293d0407baSopenharmony_ci	bool "Enable legacy compatibility cache flush on dma-buf map"
1303d0407baSopenharmony_ci	depends on MALI_BIFROST && !MALI_DMA_BUF_MAP_ON_DEMAND
1313d0407baSopenharmony_ci	default n
1323d0407baSopenharmony_ci	help
1333d0407baSopenharmony_ci	  This option enables compatibility with legacy dma-buf mapping
1343d0407baSopenharmony_ci	  behavior, then the dma-buf is mapped on import, by adding cache
1353d0407baSopenharmony_ci	  maintenance where MALI_DMA_BUF_MAP_ON_DEMAND would do the mapping,
1363d0407baSopenharmony_ci	  including a cache flush.
1373d0407baSopenharmony_ci
1383d0407baSopenharmony_ci	  This option might work-around issues related to missing cache
1393d0407baSopenharmony_ci	  flushes in other drivers. This only has an effect for clients using
1403d0407baSopenharmony_ci	  UK 11.18 or older. For later UK versions it is not possible.
1413d0407baSopenharmony_ci
1423d0407baSopenharmony_cimenuconfig MALI_BIFROST_EXPERT
1433d0407baSopenharmony_ci	depends on MALI_BIFROST
1443d0407baSopenharmony_ci	bool "Enable Expert Settings"
1453d0407baSopenharmony_ci	default n
1463d0407baSopenharmony_ci	help
1473d0407baSopenharmony_ci	  Enabling this option and modifying the default settings may produce
1483d0407baSopenharmony_ci	  a driver with performance or other limitations.
1493d0407baSopenharmony_ci
1503d0407baSopenharmony_ciif MALI_BIFROST_EXPERT
1513d0407baSopenharmony_ci
1523d0407baSopenharmony_ciconfig MALI_2MB_ALLOC
1533d0407baSopenharmony_ci	bool "Attempt to allocate 2MB pages"
1543d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
1553d0407baSopenharmony_ci	default n
1563d0407baSopenharmony_ci	help
1573d0407baSopenharmony_ci	  Rather than allocating all GPU memory page-by-page, attempt to
1583d0407baSopenharmony_ci	  allocate 2MB pages from the kernel. This reduces TLB pressure and
1593d0407baSopenharmony_ci	  helps to prevent memory fragmentation.
1603d0407baSopenharmony_ci
1613d0407baSopenharmony_ci	  If in doubt, say N
1623d0407baSopenharmony_ci
1633d0407baSopenharmony_ciconfig MALI_MEMORY_FULLY_BACKED
1643d0407baSopenharmony_ci	bool "Enable memory fully physically-backed"
1653d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
1663d0407baSopenharmony_ci	default n
1673d0407baSopenharmony_ci	help
1683d0407baSopenharmony_ci	  This option enables full physical backing of all virtual
1693d0407baSopenharmony_ci	  memory allocations in the kernel. Notice that this build
1703d0407baSopenharmony_ci	  option only affects allocations of grow-on-GPU-page-fault
1713d0407baSopenharmony_ci	  memory.
1723d0407baSopenharmony_ci
1733d0407baSopenharmony_ciconfig MALI_CORESTACK
1743d0407baSopenharmony_ci	bool "Enable support of GPU core stack power control"
1753d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
1763d0407baSopenharmony_ci	default n
1773d0407baSopenharmony_ci	help
1783d0407baSopenharmony_ci	  Enabling this feature on supported GPUs will let the driver powering
1793d0407baSopenharmony_ci	  on/off the GPU core stack independently without involving the Power
1803d0407baSopenharmony_ci	  Domain Controller. This should only be enabled on platforms which
1813d0407baSopenharmony_ci	  integration of the PDC to the Mali GPU is known to be problematic.
1823d0407baSopenharmony_ci	  This feature is currently only supported on t-Six and t-HEx GPUs.
1833d0407baSopenharmony_ci
1843d0407baSopenharmony_ci	  If unsure, say N.
1853d0407baSopenharmony_ci
1863d0407baSopenharmony_cicomment "Platform options"
1873d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
1883d0407baSopenharmony_ci
1893d0407baSopenharmony_ciconfig MALI_BIFROST_NO_MALI
1903d0407baSopenharmony_ci	bool "Enable No Mali"
1913d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
1923d0407baSopenharmony_ci	default n
1933d0407baSopenharmony_ci	help
1943d0407baSopenharmony_ci	  This can be used to test the driver in a simulated environment
1953d0407baSopenharmony_ci	  whereby the hardware is not physically present. If the hardware is physically
1963d0407baSopenharmony_ci	  present it will not be used. This can be used to test the majority of the
1973d0407baSopenharmony_ci	  driver without needing actual hardware or for software benchmarking.
1983d0407baSopenharmony_ci	  All calls to the simulated hardware will complete immediately as if the hardware
1993d0407baSopenharmony_ci	  completed the task.
2003d0407baSopenharmony_ci
2013d0407baSopenharmony_ciconfig MALI_BIFROST_ERROR_INJECT
2023d0407baSopenharmony_ci	bool "Enable No Mali error injection"
2033d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT && MALI_BIFROST_NO_MALI
2043d0407baSopenharmony_ci	default n
2053d0407baSopenharmony_ci	help
2063d0407baSopenharmony_ci	  Enables insertion of errors to test module failure and recovery mechanisms.
2073d0407baSopenharmony_ci
2083d0407baSopenharmony_ciconfig MALI_GEM5_BUILD
2093d0407baSopenharmony_ci	bool "Enable build of Mali kernel driver for GEM5"
2103d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
2113d0407baSopenharmony_ci	default n
2123d0407baSopenharmony_ci	help
2133d0407baSopenharmony_ci	  This option is to do a Mali GEM5 build.
2143d0407baSopenharmony_ci	  If unsure, say N.
2153d0407baSopenharmony_ci
2163d0407baSopenharmony_cicomment "Debug options"
2173d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
2183d0407baSopenharmony_ci
2193d0407baSopenharmony_ciconfig MALI_BIFROST_DEBUG
2203d0407baSopenharmony_ci	bool "Enable debug build"
2213d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
2223d0407baSopenharmony_ci	default n
2233d0407baSopenharmony_ci	help
2243d0407baSopenharmony_ci	  Select this option for increased checking and reporting of errors.
2253d0407baSopenharmony_ci
2263d0407baSopenharmony_ciconfig MALI_BIFROST_FENCE_DEBUG
2273d0407baSopenharmony_ci	bool "Enable debug sync fence usage"
2283d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT && (SYNC || SYNC_FILE)
2293d0407baSopenharmony_ci	default y if MALI_BIFROST_DEBUG
2303d0407baSopenharmony_ci	help
2313d0407baSopenharmony_ci	  Select this option to enable additional checking and reporting on the
2323d0407baSopenharmony_ci	  use of sync fences in the Mali driver.
2333d0407baSopenharmony_ci
2343d0407baSopenharmony_ci	  This will add a 3s timeout to all sync fence waits in the Mali
2353d0407baSopenharmony_ci	  driver, so that when work for Mali has been waiting on a sync fence
2363d0407baSopenharmony_ci	  for a long time a debug message will be printed, detailing what fence
2373d0407baSopenharmony_ci	  is causing the block, and which dependent Mali atoms are blocked as a
2383d0407baSopenharmony_ci	  result of this.
2393d0407baSopenharmony_ci
2403d0407baSopenharmony_ci	  The timeout can be changed at runtime through the js_soft_timeout
2413d0407baSopenharmony_ci	  device attribute, where the timeout is specified in milliseconds.
2423d0407baSopenharmony_ci
2433d0407baSopenharmony_ciconfig MALI_BIFROST_SYSTEM_TRACE
2443d0407baSopenharmony_ci	bool "Enable system event tracing support"
2453d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
2463d0407baSopenharmony_ci	default y if MALI_BIFROST_DEBUG
2473d0407baSopenharmony_ci	default n
2483d0407baSopenharmony_ci	help
2493d0407baSopenharmony_ci	  Choose this option to enable system trace events for each
2503d0407baSopenharmony_ci	  kbase event. This is typically used for debugging but has
2513d0407baSopenharmony_ci	  minimal overhead when not in use. Enable only if you know what
2523d0407baSopenharmony_ci	  you are doing.
2533d0407baSopenharmony_ci
2543d0407baSopenharmony_cicomment "Instrumentation options"
2553d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
2563d0407baSopenharmony_ci
2573d0407baSopenharmony_cichoice
2583d0407baSopenharmony_ci	prompt "Select Performance counters set"
2593d0407baSopenharmony_ci	default MALI_PRFCNT_SET_PRIMARY
2603d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
2613d0407baSopenharmony_ci
2623d0407baSopenharmony_ciconfig MALI_PRFCNT_SET_PRIMARY
2633d0407baSopenharmony_ci	bool "Primary"
2643d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
2653d0407baSopenharmony_ci	help
2663d0407baSopenharmony_ci	  Select this option to use primary set of performance counters.
2673d0407baSopenharmony_ci
2683d0407baSopenharmony_ciconfig MALI_BIFROST_PRFCNT_SET_SECONDARY
2693d0407baSopenharmony_ci	bool "Secondary"
2703d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
2713d0407baSopenharmony_ci	help
2723d0407baSopenharmony_ci	  Select this option to use secondary set of performance counters. Kernel
2733d0407baSopenharmony_ci	  features that depend on an access to the primary set of counters may
2743d0407baSopenharmony_ci	  become unavailable. Enabling this option will prevent power management
2753d0407baSopenharmony_ci	  from working optimally and may cause instrumentation tools to return
2763d0407baSopenharmony_ci	  bogus results.
2773d0407baSopenharmony_ci
2783d0407baSopenharmony_ci	  If unsure, use MALI_PRFCNT_SET_PRIMARY.
2793d0407baSopenharmony_ci
2803d0407baSopenharmony_ciconfig MALI_PRFCNT_SET_TERTIARY
2813d0407baSopenharmony_ci	bool "Tertiary"
2823d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
2833d0407baSopenharmony_ci	help
2843d0407baSopenharmony_ci	  Select this option to use tertiary set of performance counters. Kernel
2853d0407baSopenharmony_ci	  features that depend on an access to the primary set of counters may
2863d0407baSopenharmony_ci	  become unavailable. Enabling this option will prevent power management
2873d0407baSopenharmony_ci	  from working optimally and may cause instrumentation tools to return
2883d0407baSopenharmony_ci	  bogus results.
2893d0407baSopenharmony_ci
2903d0407baSopenharmony_ci	  If unsure, use MALI_PRFCNT_SET_PRIMARY.
2913d0407baSopenharmony_ci
2923d0407baSopenharmony_ciendchoice
2933d0407baSopenharmony_ci
2943d0407baSopenharmony_ciconfig MALI_PRFCNT_SET_SELECT_VIA_DEBUG_FS
2953d0407baSopenharmony_ci	bool "Enable runtime selection of performance counters set via debugfs"
2963d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT && DEBUG_FS
2973d0407baSopenharmony_ci	default n
2983d0407baSopenharmony_ci	help
2993d0407baSopenharmony_ci	  Select this option to make the secondary set of performance counters
3003d0407baSopenharmony_ci	  available at runtime via debugfs. Kernel features that depend on an
3013d0407baSopenharmony_ci	  access to the primary set of counters may become unavailable.
3023d0407baSopenharmony_ci
3033d0407baSopenharmony_ci	  If no runtime debugfs option is set, the build time counter set
3043d0407baSopenharmony_ci	  choice will be used.
3053d0407baSopenharmony_ci
3063d0407baSopenharmony_ci	  This feature is unsupported and unstable, and may break at any time.
3073d0407baSopenharmony_ci	  Enabling this option will prevent power management from working
3083d0407baSopenharmony_ci	  optimally and may cause instrumentation tools to return bogus results.
3093d0407baSopenharmony_ci
3103d0407baSopenharmony_ci	  No validation is done on the debugfs input. Invalid input could cause
3113d0407baSopenharmony_ci	  performance counter errors. Valid inputs are the values accepted by
3123d0407baSopenharmony_ci	  the SET_SELECT bits of the PRFCNT_CONFIG register as defined in the
3133d0407baSopenharmony_ci	  architecture specification.
3143d0407baSopenharmony_ci
3153d0407baSopenharmony_ci	  If unsure, say N.
3163d0407baSopenharmony_ci
3173d0407baSopenharmony_ciconfig MALI_JOB_DUMP
3183d0407baSopenharmony_ci	bool "Enable system level support needed for job dumping"
3193d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
3203d0407baSopenharmony_ci	default n
3213d0407baSopenharmony_ci	help
3223d0407baSopenharmony_ci	  Choose this option to enable system level support needed for
3233d0407baSopenharmony_ci	  job dumping. This is typically used for instrumentation but has
3243d0407baSopenharmony_ci	  minimal overhead when not in use. Enable only if you know what
3253d0407baSopenharmony_ci	  you are doing.
3263d0407baSopenharmony_ci
3273d0407baSopenharmony_cicomment "Workarounds"
3283d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
3293d0407baSopenharmony_ci
3303d0407baSopenharmony_ciconfig MALI_PWRSOFT_765
3313d0407baSopenharmony_ci	bool "Enable workaround for PWRSOFT-765"
3323d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
3333d0407baSopenharmony_ci	default n
3343d0407baSopenharmony_ci	help
3353d0407baSopenharmony_ci	  PWRSOFT-765 fixes devfreq cooling devices issues. The fix was merged
3363d0407baSopenharmony_ci	  in kernel v4.10, however if backported into the kernel then this
3373d0407baSopenharmony_ci	  option must be manually selected.
3383d0407baSopenharmony_ci
3393d0407baSopenharmony_ci	  If using kernel >= v4.10 then say N, otherwise if devfreq cooling
3403d0407baSopenharmony_ci	  changes have been backported say Y to avoid compilation errors.
3413d0407baSopenharmony_ci
3423d0407baSopenharmony_ciconfig MALI_HW_ERRATA_1485982_NOT_AFFECTED
3433d0407baSopenharmony_ci	bool "Disable workaround for BASE_HW_ISSUE_GPU2017_1336"
3443d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
3453d0407baSopenharmony_ci	default n
3463d0407baSopenharmony_ci	help
3473d0407baSopenharmony_ci	  This option disables the default workaround for GPU2017-1336. The
3483d0407baSopenharmony_ci	  workaround keeps the L2 cache powered up except for powerdown and reset.
3493d0407baSopenharmony_ci
3503d0407baSopenharmony_ci	  The workaround introduces a limitation that will prevent the running of
3513d0407baSopenharmony_ci	  protected mode content on fully coherent platforms, as the switch to IO
3523d0407baSopenharmony_ci	  coherency mode requires the L2 to be turned off.
3533d0407baSopenharmony_ci
3543d0407baSopenharmony_ciconfig MALI_HW_ERRATA_1485982_USE_CLOCK_ALTERNATIVE
3553d0407baSopenharmony_ci	bool "Use alternative workaround for BASE_HW_ISSUE_GPU2017_1336"
3563d0407baSopenharmony_ci	depends on MALI_BIFROST && MALI_BIFROST_EXPERT && !MALI_HW_ERRATA_1485982_NOT_AFFECTED
3573d0407baSopenharmony_ci	default n
3583d0407baSopenharmony_ci	help
3593d0407baSopenharmony_ci	  This option uses an alternative workaround for GPU2017-1336. Lowering
3603d0407baSopenharmony_ci	  the GPU clock to a, platform specific, known good frequency before
3613d0407baSopenharmony_ci	  powering down the L2 cache. The clock can be specified in the device
3623d0407baSopenharmony_ci	  tree using the property, opp-mali-errata-1485982. Otherwise the
3633d0407baSopenharmony_ci	  slowest clock will be selected.
3643d0407baSopenharmony_ci
3653d0407baSopenharmony_ciendif
3663d0407baSopenharmony_ci
3673d0407baSopenharmony_ciconfig MALI_ARBITRATION
3683d0407baSopenharmony_ci	tristate "Enable Virtualization reference code"
3693d0407baSopenharmony_ci	depends on MALI_BIFROST
3703d0407baSopenharmony_ci	default n
3713d0407baSopenharmony_ci	help
3723d0407baSopenharmony_ci	  Enables the build of several reference modules used in the reference
3733d0407baSopenharmony_ci	  virtualization setup for Mali
3743d0407baSopenharmony_ci	  If unsure, say N.
3753d0407baSopenharmony_ci
3763d0407baSopenharmony_ciif MALI_ARBITRATION
3773d0407baSopenharmony_cisource "vendor/drivers/gpu/arm/bifrost/arbitration/Kconfig"
3783d0407baSopenharmony_ciendif
3793d0407baSopenharmony_ci
3803d0407baSopenharmony_ci# source "vendro/drivers/gpu/arm/bifrost/tests/Kconfig"
3813d0407baSopenharmony_ci
3823d0407baSopenharmony_ciendif
383