diff options
author | Mike Tipton <mdtipton@codeaurora.org> | 2020-09-03 22:21:49 +0300 |
---|---|---|
committer | Georgi Djakov <georgi.djakov@linaro.org> | 2020-09-08 16:28:57 +0300 |
commit | cb30e0292db258a681f3e2334ebfb337c8863482 (patch) | |
tree | 2ebd5d2ce599a65237531b0eef4afecc215e18dc /drivers/interconnect/qcom/bcm-voter.c | |
parent | db474be2b6b8fa1b3e2c8eb388f8d1b5cfeae674 (diff) | |
download | linux-cb30e0292db258a681f3e2334ebfb337c8863482.tar.xz |
interconnect: qcom: Add support for per-BCM scaling factors
Currently, bcm-voter always assumes requests are made in KBps and that
BCM HW always wants them in Bps, so it always scales the requests by
1000. However, certain use cases and BCMs may use different units.
Thus, add support for BCM-specific scaling factors.
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
Link: https://lore.kernel.org/r/20200903192149.30385-7-mdtipton@codeaurora.org
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Diffstat (limited to 'drivers/interconnect/qcom/bcm-voter.c')
-rw-r--r-- | drivers/interconnect/qcom/bcm-voter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/interconnect/qcom/bcm-voter.c b/drivers/interconnect/qcom/bcm-voter.c index d58b08f1f495..887d13721e52 100644 --- a/drivers/interconnect/qcom/bcm-voter.c +++ b/drivers/interconnect/qcom/bcm-voter.c @@ -85,10 +85,10 @@ static void bcm_aggregate(struct qcom_icc_bcm *bcm) agg_peak[bucket] = max(agg_peak[bucket], temp); } - temp = agg_avg[bucket] * 1000ULL; + temp = agg_avg[bucket] * bcm->vote_scale; bcm->vote_x[bucket] = bcm_div(temp, bcm->aux_data.unit); - temp = agg_peak[bucket] * 1000ULL; + temp = agg_peak[bucket] * bcm->vote_scale; bcm->vote_y[bucket] = bcm_div(temp, bcm->aux_data.unit); } |