diff options
author | Donghan Ryu <dryu@nvidia.com> | 2014-05-20 09:59:24 +0900 |
---|---|---|
committer | Riham Haidar <rhaidar@nvidia.com> | 2014-06-13 17:59:32 -0700 |
commit | 149519c89c838a15c1f2726095829eeebfc3bdb9 (patch) | |
tree | 800663bd1b3e0521dd7f53a27d9aee14d7c4c482 | |
parent | f63af1fbad39f882d1fa3c2126fb96e14bf3702f (diff) |
arm: tegra: tweak cpu-emc ratio
the old cpu-emc ratio is probably not very optimal
for newer CPUs with higher max CPU and EMC frequencies.
It would be better if have a table of these per CPU
architecture but tuning this hard-coded value for now
won't make things any worse.
Also, much lower CPU_AVG_ACT_THRESHOLD is used for
tegra12x and tegra13x
Bug 1455015
Bug 1473244
Bug 1497785
Bug 1500639
Bug 1504328
Bug 200004223
Change-Id: I96d4d4d36474c1d7f1d62762666e944fbd04b03e
Signed-off-by: Donghan Ryu <dryu@nvidia.com>
Reviewed-on: http://git-master/r/411700
Reviewed-by: Riham Haidar <rhaidar@nvidia.com>
Tested-by: Riham Haidar <rhaidar@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/tegra12_clocks.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-tegra/tegra3_actmon.c | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/tegra12_clocks.c b/arch/arm/mach-tegra/tegra12_clocks.c index b21ee9e4a29c..c2312637633a 100644 --- a/arch/arm/mach-tegra/tegra12_clocks.c +++ b/arch/arm/mach-tegra/tegra12_clocks.c @@ -9339,11 +9339,11 @@ unsigned long tegra_emc_to_cpu_ratio(unsigned long cpu_rate) if (cpu_rate >= 1300000) return emc_max_rate; /* cpu >= 1.3GHz, emc max */ else if (cpu_rate >= 975000) - return 400000000; /* cpu >= 975 MHz, emc 400 MHz */ + return 550000000; /* cpu >= 975 MHz, emc 550 MHz */ else if (cpu_rate >= 725000) - return 200000000; /* cpu >= 725 MHz, emc 200 MHz */ + return 350000000; /* cpu >= 725 MHz, emc 350 MHz */ else if (cpu_rate >= 500000) - return 100000000; /* cpu >= 500 MHz, emc 100 MHz */ + return 150000000; /* cpu >= 500 MHz, emc 150 MHz */ else if (cpu_rate >= 275000) return 50000000; /* cpu >= 275 MHz, emc 50 MHz */ else diff --git a/arch/arm/mach-tegra/tegra3_actmon.c b/arch/arm/mach-tegra/tegra3_actmon.c index 83e96ba24dda..11517b040ec5 100644 --- a/arch/arm/mach-tegra/tegra3_actmon.c +++ b/arch/arm/mach-tegra/tegra3_actmon.c @@ -601,8 +601,11 @@ static struct actmon_dev actmon_dev_avp = { }, }; - +#if defined(CONFIG_ARCH_TEGRA_12x_SOC) || defined(CONFIG_ARCH_TEGRA_13x_SOC) +#define CPU_AVG_ACT_THRESHOLD 2000 +#else #define CPU_AVG_ACT_THRESHOLD 50000 +#endif /* EMC-cpu activity monitor: frequency sampling device: * activity counter is incremented every 256 memory transactions, and * each transaction takes 2 EMC clocks; count_weight = 512 on Tegra3. |