From 61598093bbdd283a7edc367d900f223070ead8d2 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Fri, 10 May 2024 07:43:03 +0000
Subject: [PATCH] add ax88772C AX88772C_eeprom_tools

---
 kernel/drivers/gpu/arm/bifrost/Kconfig |   97 +++++++++++++++++++++++++++---------------------
 1 files changed, 54 insertions(+), 43 deletions(-)

diff --git a/kernel/drivers/gpu/arm/bifrost/Kconfig b/kernel/drivers/gpu/arm/bifrost/Kconfig
index 39dca10..ca3da57 100644
--- a/kernel/drivers/gpu/arm/bifrost/Kconfig
+++ b/kernel/drivers/gpu/arm/bifrost/Kconfig
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
 #
-# (C) COPYRIGHT 2012-2021 ARM Limited. All rights reserved.
+# (C) COPYRIGHT 2012-2023 ARM Limited. All rights reserved.
 #
 # This program is free software and is provided to you under the terms of the
 # GNU General Public License version 2 as published by the Free Software
@@ -22,8 +22,7 @@
 	tristate "Mali Bifrost series support"
 	select GPU_TRACEPOINTS if ANDROID
 	select DMA_SHARED_BUFFER
-	select PM_DEVFREQ
-	select DEVFREQ_THERMAL
+	select FW_LOADER
 	default n
 	help
 	  Enable this option to build support for a ARM Mali Bifrost GPU.
@@ -39,20 +38,40 @@
 	default "devicetree"
 	help
 	  Enter the name of the desired platform configuration directory to
-	  include in the build. 'platform/$(MALI_PLATFORM_NAME)/Makefile' must
+	  include in the build. 'platform/$(MALI_PLATFORM_NAME)/Kbuild' must
 	  exist.
 
-config MALI_REAL_HW
+choice
+	prompt "Mali HW backend"
 	depends on MALI_BIFROST
-	def_bool !MALI_BIFROST_NO_MALI
+	default MALI_REAL_HW
+
+config MALI_REAL_HW
+	bool "Enable build of Mali kernel driver for real HW"
+	depends on MALI_BIFROST
+	help
+	  This is the default HW backend.
+
+config MALI_BIFROST_NO_MALI
+	bool "Enable build of Mali kernel driver for No Mali"
+	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
+	help
+	  This can be used to test the driver in a simulated environment
+	  whereby the hardware is not physically present. If the hardware is physically
+	  present it will not be used. This can be used to test the majority of the
+	  driver without needing actual hardware or for software benchmarking.
+	  All calls to the simulated hardware will complete immediately as if the hardware
+	  completed the task.
+
+
+endchoice
 
 menu "Platform specific options"
-source "drivers/gpu/arm/midgard/platform/Kconfig"
+source "drivers/gpu/arm/bifrost/platform/Kconfig"
 endmenu
 
 config MALI_CSF_SUPPORT
 	bool "Enable Mali CSF based GPU support"
-	depends on MALI_BIFROST=m
 	default n
 	help
 	  Enables support for CSF based GPUs.
@@ -93,16 +112,6 @@
 	  Enables tracing in kbase. Trace log available through
 	  the "mali_trace" debugfs file, when the CONFIG_DEBUG_FS is enabled
 
-config MALI_BIFROST_DMA_FENCE
-	bool "Enable DMA_BUF fence support for Mali"
-	depends on MALI_BIFROST
-	default n
-	help
-	  Support DMA_BUF fences for Mali.
-
-	  This option should only be enabled if the Linux Kernel has built in
-	  support for DMA_BUF fences.
-
 config MALI_ARBITER_SUPPORT
 	bool "Enable arbiter support for Mali"
 	depends on MALI_BIFROST && !MALI_CSF_SUPPORT
@@ -119,7 +128,7 @@
 	depends on MALI_BIFROST
 	default n
 	help
-	  This option caused kbase to set up the GPU mapping of imported
+	  This option will cause kbase to set up the GPU mapping of imported
 	  dma-buf when needed to run atoms. This is the legacy behavior.
 
 	  This is intended for testing and the option will get removed in the
@@ -139,6 +148,11 @@
 	  flushes in other drivers. This only has an effect for clients using
 	  UK 11.18 or older. For later UK versions it is not possible.
 
+config MALI_CORESIGHT
+	depends on MALI_BIFROST && MALI_CSF_SUPPORT && !MALI_BIFROST_NO_MALI
+	bool "Enable Kbase CoreSight tracing support"
+	default n
+
 menuconfig MALI_BIFROST_EXPERT
 	depends on MALI_BIFROST
 	bool "Enable Expert Settings"
@@ -149,7 +163,19 @@
 
 if MALI_BIFROST_EXPERT
 
-config MALI_2MB_ALLOC
+config LARGE_PAGE_ALLOC_OVERRIDE
+	bool "Override default setting of 2MB pages"
+	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
+	default n
+	help
+	  An override config for LARGE_PAGE_ALLOC config.
+	  When LARGE_PAGE_ALLOC_OVERRIDE is Y, 2MB page allocation will be
+	  enabled by LARGE_PAGE_ALLOC. When this is N, the feature will be
+	  enabled when GPU HW satisfies requirements.
+
+	  If in doubt, say N
+
+config LARGE_PAGE_ALLOC
 	bool "Attempt to allocate 2MB pages"
 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
 	default n
@@ -157,6 +183,10 @@
 	  Rather than allocating all GPU memory page-by-page, attempt to
 	  allocate 2MB pages from the kernel. This reduces TLB pressure and
 	  helps to prevent memory fragmentation.
+
+	  Note this config applies only when LARGE_PAGE_ALLOC_OVERRIDE config
+	  is enabled and enabling this on a GPU HW that does not satisfy
+	  requirements can cause serious problem.
 
 	  If in doubt, say N
 
@@ -186,32 +216,12 @@
 comment "Platform options"
 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
 
-config MALI_BIFROST_NO_MALI
-	bool "Enable No Mali"
-	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
-	default n
-	help
-	  This can be used to test the driver in a simulated environment
-	  whereby the hardware is not physically present. If the hardware is physically
-	  present it will not be used. This can be used to test the majority of the
-	  driver without needing actual hardware or for software benchmarking.
-	  All calls to the simulated hardware will complete immediately as if the hardware
-	  completed the task.
-
 config MALI_BIFROST_ERROR_INJECT
 	bool "Enable No Mali error injection"
 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT && MALI_BIFROST_NO_MALI
 	default n
 	help
 	  Enables insertion of errors to test module failure and recovery mechanisms.
-
-config MALI_GEM5_BUILD
-	bool "Enable build of Mali kernel driver for GEM5"
-	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
-	default n
-	help
-	  This option is to do a Mali GEM5 build.
-	  If unsure, say N.
 
 comment "Debug options"
 	depends on MALI_BIFROST && MALI_BIFROST_EXPERT
@@ -225,7 +235,7 @@
 
 config MALI_BIFROST_FENCE_DEBUG
 	bool "Enable debug sync fence usage"
-	depends on MALI_BIFROST && MALI_BIFROST_EXPERT && (SYNC || SYNC_FILE)
+	depends on MALI_BIFROST && MALI_BIFROST_EXPERT && SYNC_FILE
 	default y if MALI_BIFROST_DEBUG
 	help
 	  Select this option to enable additional checking and reporting on the
@@ -365,7 +375,7 @@
 endif
 
 config MALI_ARBITRATION
-	bool "Enable Virtualization reference code"
+	tristate "Enable Virtualization reference code"
 	depends on MALI_BIFROST
 	default n
 	help
@@ -373,6 +383,7 @@
 	  virtualization setup for Mali
 	  If unsure, say N.
 
-source "drivers/gpu/arm/midgard/tests/Kconfig"
+
+# source "drivers/gpu/arm/bifrost/tests/Kconfig"
 
 endif

--
Gitblit v1.6.2