summaryrefslogtreecommitdiff
path: root/drivers/devfreq
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-11-16 10:11:56 -0800
committerLinux Build Service Account <lnxbuild@localhost>2019-11-16 10:11:56 -0800
commitfeb565e67fc2b2f2a95890577120141be5886594 (patch)
treeb9057c7253ca0180b12d885d5a5140d5f90eb927 /drivers/devfreq
parent6ed4c5de4bb191a209c629463678e34f076fb417 (diff)
parent739a986440ba67d48277fd553a5fe32ab008666d (diff)
Merge 739a986440ba67d48277fd553a5fe32ab008666d on remote branch
Change-Id: Idd84f971e07f65aa635d7d499dde696b84b217b6
Diffstat (limited to 'drivers/devfreq')
-rw-r--r--drivers/devfreq/governor_msm_adreno_tz.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/devfreq/governor_msm_adreno_tz.c b/drivers/devfreq/governor_msm_adreno_tz.c
index f31089d63e0c..4c010654204c 100644
--- a/drivers/devfreq/governor_msm_adreno_tz.c
+++ b/drivers/devfreq/governor_msm_adreno_tz.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2010-2017, 2019 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -150,6 +150,8 @@ void compute_work_load(struct devfreq_dev_status *stats,
struct devfreq_msm_adreno_tz_data *priv,
struct devfreq *devfreq)
{
+ u64 busy;
+
spin_lock(&sample_lock);
/*
* Keep collecting the stats till the client
@@ -157,8 +159,10 @@ void compute_work_load(struct devfreq_dev_status *stats,
* is done when the entry is read
*/
acc_total += stats->total_time;
- acc_relative_busy += (stats->busy_time * stats->current_frequency) /
- devfreq->profile->freq_table[0];
+ busy = (u64)stats->busy_time * stats->current_frequency;
+ do_div(busy, devfreq->profile->freq_table[0]);
+ acc_relative_busy += busy;
+
spin_unlock(&sample_lock);
}