Skip to content

Commit 73606ba

Browse files
Mike TiptonGeorgi Djakov
authored andcommitted
interconnect: Always call pre_aggregate before aggregate
The pre_aggregate callback isn't called in all cases before calling aggregate. Add the missing calls so providers can rely on consistent framework behavior. Fixes: d3703b3 ("interconnect: Aggregate before setting initial bandwidth") Signed-off-by: Mike Tipton <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Georgi Djakov <[email protected]>
1 parent 456a9da commit 73606ba

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/interconnect/core.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,9 +973,14 @@ void icc_node_add(struct icc_node *node, struct icc_provider *provider)
973973
}
974974
node->avg_bw = node->init_avg;
975975
node->peak_bw = node->init_peak;
976+
977+
if (provider->pre_aggregate)
978+
provider->pre_aggregate(node);
979+
976980
if (provider->aggregate)
977981
provider->aggregate(node, 0, node->init_avg, node->init_peak,
978982
&node->avg_bw, &node->peak_bw);
983+
979984
provider->set(node, node);
980985
node->avg_bw = 0;
981986
node->peak_bw = 0;

0 commit comments

Comments
 (0)