mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-08 14:13:53 +00:00
interconnect: Skip call into provider if initial bw is zero
Currently framework sets bw even when init bw requirements are zero during provider registration, thus resulting bulk of set bw to hw. Avoid this behaviour by skipping provider set bw calls if init bw is zero. Signed-off-by: Vivek Aknurwar <quic_viveka@quicinc.com> Link: https://lore.kernel.org/r/1673647679-15216-1-git-send-email-quic_viveka@quicinc.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
This commit is contained in:
parent
4658842abc
commit
558ea12354
@ -981,14 +981,17 @@ 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->pre_aggregate)
|
||||
provider->pre_aggregate(node);
|
||||
if (node->avg_bw || node->peak_bw) {
|
||||
if (provider->pre_aggregate)
|
||||
provider->pre_aggregate(node);
|
||||
|
||||
if (provider->aggregate)
|
||||
provider->aggregate(node, 0, node->init_avg, node->init_peak,
|
||||
&node->avg_bw, &node->peak_bw);
|
||||
if (provider->aggregate)
|
||||
provider->aggregate(node, 0, node->init_avg, node->init_peak,
|
||||
&node->avg_bw, &node->peak_bw);
|
||||
if (provider->set)
|
||||
provider->set(node, node);
|
||||
}
|
||||
|
||||
provider->set(node, node);
|
||||
node->avg_bw = 0;
|
||||
node->peak_bw = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user