summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2013-09-20 23:22:29 -0700
committerAjay Nandakumar <anandakumarm@nvidia.com>2013-10-03 19:17:37 +0530
commit14e8e3bd4fa4b12029072cc0547d11938bd534a9 (patch)
tree1c0c18817a64bba8c19750f0b72ef435141312c5 /arch/arm
parentd2324dea6f3ccb23d06946e6b2c4ede6d7a5036f (diff)
ARM: tegra12: clock: Check thermal in GPU bus rate round
Accounted for voltage dependency on temperature when rounding cbus rate. Although cbus round rate operation is used for c2bus, c3bus, c4bus, and gbus, only the latter is actually affected by thermal check, since thermal dvfs is supported for GPU only. Bug 1273253 Change-Id: I5b25e4ba22adeb911eea586e2586ced273e12d3b Signed-off-by: Alex Frid <afrid@nvidia.com> Reviewed-on: http://git-master/r/278104 Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> (cherry picked from commit e092a9fd3bb4ef5b25dbc4f165a8d37d8d46087f) Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-tegra/tegra12_clocks.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/tegra12_clocks.c b/arch/arm/mach-tegra/tegra12_clocks.c
index 3fd6c70cb42d..6d089771eab3 100644
--- a/arch/arm/mach-tegra/tegra12_clocks.c
+++ b/arch/arm/mach-tegra/tegra12_clocks.c
@@ -5256,6 +5256,7 @@ static long tegra12_clk_cbus_round_updown(struct clk *c, unsigned long rate,
bool up)
{
int i;
+ const int *millivolts;
if (!c->dvfs) {
if (!c->min_rate)
@@ -5277,9 +5278,10 @@ static long tegra12_clk_cbus_round_updown(struct clk *c, unsigned long rate,
}
rate = max(rate, c->min_rate);
+ millivolts = tegra_dvfs_get_millivolts_pll(c->dvfs);
for (i = 0; ; i++) {
unsigned long f = c->dvfs->freqs[i];
- int mv = c->dvfs->millivolts[i];
+ int mv = millivolts[i];
if ((f >= rate) || (mv >= c->dvfs->max_millivolts) ||
((i + 1) >= c->dvfs->num_freqs)) {
if (!up && i && (f > rate))