mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-21 20:04:01 +00:00
PM / devfreq: bimc-bwmon: Reduce margin for HW workaround
The HW workaround margin being too high reduces the effectiveness of the interrupt. Try using a margin only when the measured bandwidth is too small and risks the counter wrapping around multiple times before it's read. Change-Id: Ic1e88ad360b2348dfb9ad314c42c1b0218010c1d Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
This commit is contained in:
parent
169417fed7
commit
67616a640e
1 changed files with 5 additions and 2 deletions
|
@ -163,8 +163,11 @@ static unsigned long meas_bw_and_set_irq(struct bw_hwmon *hw,
|
|||
|
||||
mbps = mon_get_count(m);
|
||||
mbps = bytes_to_mbps(mbps, us);
|
||||
/* + 1024 is to workaround HW design issue. Needs further tuning. */
|
||||
limit = mbps_to_bytes(mbps + 1024, sample_ms, tol);
|
||||
/*
|
||||
* The fudging of mbps when calculating limit is to workaround a HW
|
||||
* design issue. Needs further tuning.
|
||||
*/
|
||||
limit = mbps_to_bytes(max(mbps, 400UL), sample_ms, tol);
|
||||
mon_set_limit(m, limit);
|
||||
|
||||
mon_clear(m);
|
||||
|
|
Loading…
Reference in a new issue