diff options
| author | Hanumath Prasad <hpprasad@codeaurora.org> | 2015-05-14 20:22:11 +0530 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:04:18 -0700 |
| commit | 59aaf8f3cb2dd3531f75885479a0e7ffc3e05147 (patch) | |
| tree | 8960b7dad5e6768cf36ca23b6b112322445c5ac0 | |
| parent | c8817de47e2b6cd584b1f61b39596cacb6936ba7 (diff) | |
PM / devfreq: bimc-bwmon: set a floor_mbps for irq threshold
Interrupt storm happens when bwmon is enabled for GPU. This is mainly
due to constant low traffic observed with GPU while doing memory
read/write. So as the data rates read from counters are low and so the
threshold set for triggering the interrupt also set as low, which in
turn causes huge number of interrupts. Avoid this by setting a minimum
floor for the irq threshold.
Change-Id: I190fad5108bc24afcb67bec5809485380ee3662e
Signed-off-by: Hanumath Prasad <hpprasad@codeaurora.org>
| -rw-r--r-- | drivers/devfreq/bimc-bwmon.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/devfreq/bimc-bwmon.c b/drivers/devfreq/bimc-bwmon.c index de01fc24a0c4..f40899be539a 100644 --- a/drivers/devfreq/bimc-bwmon.c +++ b/drivers/devfreq/bimc-bwmon.c @@ -40,6 +40,13 @@ #define MON_MASK(m) ((m)->base + 0x298) #define MON_MATCH(m) ((m)->base + 0x29C) +/* + * Don't set the threshold lower than this value. This helps avoid + * threshold IRQs when the traffic is close to zero and even small + * changes can exceed the threshold percentage. + */ +#define FLOOR_MBPS 100UL + struct bwmon_spec { bool wrap_on_thres; bool overflow; @@ -195,7 +202,7 @@ static unsigned long meas_bw_and_set_irq(struct bw_hwmon *hw, * multiple times before the IRQ is processed. */ if (likely(!m->spec->wrap_on_thres)) - limit = mbps_to_bytes(mbps, sample_ms, tol); + limit = mbps_to_bytes(max(mbps, FLOOR_MBPS), sample_ms, tol); else limit = mbps_to_bytes(max(mbps, 400UL), sample_ms, tol); |
