diff options
author | Steve Rogers <srogers@nvidia.com> | 2014-02-20 10:38:57 -0600 |
---|---|---|
committer | Timo Alho <talho@nvidia.com> | 2014-02-24 12:34:56 -0800 |
commit | 4e7adb481aae50029bee5d7e3850e9ee6f1ad678 (patch) | |
tree | c1e24966d07e50c083a9f3f78bcef4c78af9d2e2 /drivers/edp | |
parent | 3c8ecdc582859da577fffdb97971fa95fd18083d (diff) |
arm: tegra: sysedp: Update pthrot per loop
Bug 1465408
Also fix the debugfs output for cap_method.
Change-Id: I1cce87ae08e81eee5b0b42dac8601764c5fad55b
Signed-off-by: Steve Rogers <srogers@nvidia.com>
Reviewed-on: http://git-master/r/370035
(cherry-picked from commmit 51b58d692653dd6075c3e728dd7f133968c99a5a)
Reviewed-on: http://git-master/r/373630
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Diffstat (limited to 'drivers/edp')
-rw-r--r-- | drivers/edp/sysedp_dynamic_capping.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/edp/sysedp_dynamic_capping.c b/drivers/edp/sysedp_dynamic_capping.c index 441f5f800f36..b0a276ad4d49 100644 --- a/drivers/edp/sysedp_dynamic_capping.c +++ b/drivers/edp/sysedp_dynamic_capping.c @@ -202,26 +202,26 @@ static void update_cur_corecap(void) i = capping_device_platdata->corecap_size - 1; cap = capping_device_platdata->corecap + i; - switch (cap_method) { - default: - pr_warn("%s: Unknown cap_method, %x! Assuming direct.\n", - __func__, cap_method); - cap_method = TEGRA_SYSEDP_CAP_METHOD_DIRECT; - /* intentional fall-through */ - case TEGRA_SYSEDP_CAP_METHOD_DIRECT: - relaxed_power = 0; - break; + for (; i >= 0; i--, cap--) { + switch (cap_method) { + default: + pr_warn("%s: Unknown cap_method, %x! Assuming direct.\n", + __func__, cap_method); + cap_method = TEGRA_SYSEDP_CAP_METHOD_DIRECT; + /* Intentional fall-through*/ + case TEGRA_SYSEDP_CAP_METHOD_DIRECT: + relaxed_power = 0; + break; - case TEGRA_SYSEDP_CAP_METHOD_SIGNAL: - relaxed_power = min(avail_oc_relax, cap->pthrot); - break; + case TEGRA_SYSEDP_CAP_METHOD_SIGNAL: + relaxed_power = min(avail_oc_relax, cap->pthrot); + break; - case TEGRA_SYSEDP_CAP_METHOD_RELAX: - relaxed_power = cap->pthrot; - break; - } + case TEGRA_SYSEDP_CAP_METHOD_RELAX: + relaxed_power = cap->pthrot; + break; + } - for (; i >= 0; i--, cap--) { if (cap->power <= power + relaxed_power) { cur_corecap = cap; cpu_power_balance = power + relaxed_power @@ -447,7 +447,7 @@ static int status_show(struct seq_file *file, void *data) seq_printf(file, "cpu cap : %u kHz\n", cur_caps.cpu); seq_printf(file, "gpu cap : %u kHz\n", cur_caps.gpu); seq_printf(file, "emc cap : %u kHz\n", cur_caps.emc); - seq_printf(file, "cc method : %u kHz\n", cap_method); + seq_printf(file, "cc method : %u\n", cap_method); mutex_unlock(&core_lock); return 0; |