Permalink
Browse files

cpu-tegra: add CONFIG_ASUS_OVERCLOCK_MODES to allow the kernel to be

built in generic mode or Asus mode.  Generic mode can be used with
non-stock Asus ROMs that don't have the 3 performance
modes set.

From a non-stock ROM, the following should be done within the ROM init
scripts:
#!/bin/sh -x
# Generic kernel settings
echo 1300 /sys/kernel/tegra_cap/core_cap_level
echo 0 > /sys/kernel/tegra_cap/core_cap_state
echo 0 > /sys/devices/platform/tegra_grhost/enable_3d_scaling
echo 10 > /sys/module/cpu_tegra3/parameters/mp_overhead
echo 9999999 > /sys/module/cpu_tegra/parameters/pwr_cap_limit_1
echo 9999999 > /sys/module/cpu_tegra/parameters/pwr_cap_limit_2
echo 9999999 > /sys/module/cpu_tegra/parameters/pwr_cap_limit_3
echo 9999999 > /sys/module/cpu_tegra/parameters/pwr_cap_limit_4
setprop power.saving.mode 1
setprop persist.tegra.NV_FPSLIMIT 0
setprop persist.sys.NV_FPSLIMIT 0
setprop persist.sys.NV_POWERMODE 0

To default to a lower CPU speed on boot, to say 1.6GHz, add this to the
init:
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1600000
  • Loading branch information...
1 parent 1104699 commit b791dd34bfbe78a58e1a244ab74326549442c949 @motley-git committed Apr 21, 2012
Showing with 787 additions and 395 deletions.
  1. +9 −0 arch/arm/mach-tegra/Kconfig
  2. +778 −395 arch/arm/mach-tegra/cpu-tegra.c
@@ -458,5 +458,14 @@ config TEGRA_WDT_RECOVERY
config ASUS_EDP_POLICY
bool "ASUS EDP init regulator policy"
default y
+
+config ASUS_OVERCLOCK_MODES
+ bool "Use ASUS OC performance modes"
+ default y
+ help
+ When enabled, the kernel will use the 3 Asus performance modes.
+ When disabled, the kernel will behave like a stock kernel for
+ standard ROMs without the 3 distinct performance modes.
+
endif
Oops, something went wrong.

0 comments on commit b791dd3

Please sign in to comment.