summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoren Huang <b02279@freescale.com>2013-06-04 15:08:15 +0800
committerRichard Liu <r66033@freescale.com>2013-06-08 10:43:19 +0800
commiteaa3930c8e752e8d75a0e1b50ec5cacee020293f (patch)
tree94c9db4c5d7618e504d4a2274281323cb7e41638
parent41f0553746777fe3d1bf7ad77678db2eb0ffa3e9 (diff)
ENGR00265465 gpu:Add global value for minimum 3D clock export
Add global value gpu3DMinClock so that minimum 3D clock can be change by user. When gpu min clock is too low, it may cause IPU starvation issue in certain case. Use echo x > /sys/module/galcore/parameters/gpu3DMinClock to change it. Signed-off-by: Loren Huang <b02279@freescale.com> Acked-by: Lily Zhang
-rw-r--r--drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c6
-rw-r--r--drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c b/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c
index 3829999b51be..ebd36fec29e2 100644
--- a/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c
+++ b/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c
@@ -36,6 +36,7 @@ typedef struct _gcsiDEBUG_REGISTERS
}
gcsiDEBUG_REGISTERS;
+extern int gpu3DMinClock;
/******************************************************************************\
********************************* Support Code *********************************
\******************************************************************************/
@@ -4630,7 +4631,10 @@ gckHARDWARE_GetFscaleValue(
)
{
*FscaleValue = Hardware->powerOnFscaleVal;
- *MinFscaleValue = 1;
+ if ((gpu3DMinClock > 0) && (gpu3DMinClock <= 64) && (Hardware->core == gcvCORE_MAJOR))
+ *MinFscaleValue = gpu3DMinClock;
+ else
+ *MinFscaleValue = 1;
*MaxFscaleValue = 64;
return gcvSTATUS_OK;
diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c
index 963527f6cec4..34438f7f6f7b 100644
--- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c
+++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c
@@ -146,6 +146,9 @@ module_param(logFileSize,uint, 0644);
static int showArgs = 0;
module_param(showArgs, int, 0644);
+int gpu3DMinClock = 0;
+module_param(gpu3DMinClock, int, 0644);
+
#if ENABLE_GPU_CLOCK_BY_DRIVER
unsigned long coreClock = 156000000;
module_param(coreClock, ulong, 0644);