mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
devfreq: Do not round up bandwidth on BWMON4 devices
Currently only BWMON5 devices increment the count for non-zero bandwidth while BWMON4 devices increment the count all the time. This results in a non-zero bandwidth report even when the count is zero for BWMON4 devices leading to unnecessarily higher bandwidth votes. Apply checks similar to BWMON5 devices for BWMON4 monitors as well. Change-Id: I0a2d1c0ed979973966668391a32f63bf2711f981 Signed-off-by: Rama Aparna Mallavarapu <aparnam@codeaurora.org>
This commit is contained in:
parent
3f6460328d
commit
9170b2bc7b
1 changed files with 4 additions and 3 deletions
|
|
@ -580,15 +580,16 @@ unsigned long get_zone_count(struct bwmon *m, unsigned int zone,
|
|||
WARN(1, "Invalid\n");
|
||||
return 0;
|
||||
case MON2:
|
||||
count = readl_relaxed(MON2_ZONE_MAX(m, zone)) + 1;
|
||||
count = readl_relaxed(MON2_ZONE_MAX(m, zone));
|
||||
break;
|
||||
case MON3:
|
||||
count = readl_relaxed(MON3_ZONE_MAX(m, zone));
|
||||
if (count)
|
||||
count++;
|
||||
break;
|
||||
}
|
||||
|
||||
if (count)
|
||||
count++;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue