summaryrefslogtreecommitdiffstats
path: root/drivers/interconnect
diff options
context:
space:
mode:
authorGeorgi Djakov <georgi.djakov@linaro.org>2020-10-13 15:59:11 +0200
committerGeorgi Djakov <georgi.djakov@linaro.org>2020-10-15 08:24:00 +0200
commitd3703b3e255f56d543aac183f8aafdbfd7096559 (patch)
tree3499b4c25a41e7db4a262eb3868dfbfbed22f545 /drivers/interconnect
parentinterconnect: qcom: sdm845: Enable keepalive for the MM1 BCM (diff)
downloadlinux-d3703b3e255f56d543aac183f8aafdbfd7096559.tar.xz
linux-d3703b3e255f56d543aac183f8aafdbfd7096559.zip
interconnect: Aggregate before setting initial bandwidth
When setting the initial bandwidth, make sure to call the aggregate() function (if such is implemented for the current provider), to handle cases when data needs to be aggregated first. Fixes: b1d681d8d324 ("interconnect: Add sync state support") Acked-by: Saravana Kannan <saravanak@google.com> Link: https://lore.kernel.org/r/20201013135913.29059-1-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Diffstat (limited to 'drivers/interconnect')
-rw-r--r--drivers/interconnect/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
index eea47b4c84aa..974a66725d09 100644
--- a/drivers/interconnect/core.c
+++ b/drivers/interconnect/core.c
@@ -971,6 +971,9 @@ void icc_node_add(struct icc_node *node, struct icc_provider *provider)
}
node->avg_bw = node->init_avg;
node->peak_bw = node->init_peak;
+ if (provider->aggregate)
+ provider->aggregate(node, 0, node->init_avg, node->init_peak,
+ &node->avg_bw, &node->peak_bw);
provider->set(node, node);
node->avg_bw = 0;
node->peak_bw = 0;