diff options
author | Sivaram Nair <sivaramn@nvidia.com> | 2013-05-27 17:20:20 +0300 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 13:15:55 -0700 |
commit | 89efa878a00724d017235d4676e01eec4edd9ea5 (patch) | |
tree | 75b13e480896ed755b3b1a9ad6a447cfe76c18a5 /drivers/edp | |
parent | 7de31b0fe5715da1085a89f14046d99fc0ebbd87 (diff) |
EDP: tegra: compensate for performance reductions
While calculating the CPU freq cap for a given AP+DRAM power budget (the
allowed E-state level), performance is lost in two places.
(1) after applying the gain factor: since the E-state level
multiplied by the gain factor does not exactly match a row
in the AP+DRAM table (resulting in the selection of a lower
value).
(2) while looking up in the cpu power limit table: some delta mW
is lost as in the above case (since there is no exact match, we
are choosing a lower level)
(1) is fixed by adding the delta amount to cpu power
(2) is fixed by choosing a ceiling value (this is OK since in almost all
cases, we have some battery cap remaining).
Bug 1293353
Change-Id: I6584bfa385d8af15457d8c3faaa0d4a3169c4624
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: http://git-master/r/233596
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Diffstat (limited to 'drivers/edp')
-rw-r--r-- | drivers/edp/tegra_core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/edp/tegra_core.c b/drivers/edp/tegra_core.c index fa9895e037bc..21bbc854f899 100644 --- a/drivers/edp/tegra_core.c +++ b/drivers/edp/tegra_core.c @@ -42,7 +42,8 @@ static struct tegra_sysedp_corecap *cur_corecap; static struct clk *emc_cap_clk; static struct clk *gpu_cap_clk; static struct pm_qos_request cpufreq_qos; -static unsigned int cpu_power_offset; +static unsigned int cpu_power_offset = 499; +static unsigned int cpu_power_balance; static unsigned int force_gpu_pri; static struct delayed_work core_work; static unsigned int *core_edp_states; @@ -118,6 +119,7 @@ static void apply_caps(struct tegra_sysedp_devcap *devcap) int r; core_policy.cpu = get_cpufreq_lim(devcap->cpu_power + + cpu_power_balance + cpu_power_offset); core_policy.gpu = devcap->gpufreq; core_policy.emc = devcap->emcfreq; @@ -183,6 +185,7 @@ static void update_cur_corecap(void) for (; i >= 0; i--, cap--) { if (cap->power <= power) { cur_corecap = cap; + cpu_power_balance = power - cap->power; return; } } |