Skip to content

Commit f84f5b6

Browse files
Mike TiptonGeorgi Djakov
authored andcommitted
interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate
We're only adding BCMs to the commit list in aggregate(), but there are cases where pre_aggregate() is called without subsequently calling aggregate(). In particular, in icc_sync_state() when a node with initial BW has zero requests. Since BCMs aren't added to the commit list in these cases, we don't actually send the zero BW request to HW. So the resources remain on unnecessarily. Add BCMs to the commit list in pre_aggregate() instead, which is always called even when there are no requests. Fixes: 976daac ("interconnect: qcom: Consolidate interconnect RPMh support") Signed-off-by: Mike Tipton <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Georgi Djakov <[email protected]>
1 parent ce5a595 commit f84f5b6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/interconnect/qcom/icc-rpmh.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,18 @@ void qcom_icc_pre_aggregate(struct icc_node *node)
2020
{
2121
size_t i;
2222
struct qcom_icc_node *qn;
23+
struct qcom_icc_provider *qp;
2324

2425
qn = node->data;
26+
qp = to_qcom_provider(node->provider);
2527

2628
for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++) {
2729
qn->sum_avg[i] = 0;
2830
qn->max_peak[i] = 0;
2931
}
32+
33+
for (i = 0; i < qn->num_bcms; i++)
34+
qcom_icc_bcm_voter_add(qp->voter, qn->bcms[i]);
3035
}
3136
EXPORT_SYMBOL_GPL(qcom_icc_pre_aggregate);
3237

@@ -44,10 +49,8 @@ int qcom_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw,
4449
{
4550
size_t i;
4651
struct qcom_icc_node *qn;
47-
struct qcom_icc_provider *qp;
4852

4953
qn = node->data;
50-
qp = to_qcom_provider(node->provider);
5154

5255
if (!tag)
5356
tag = QCOM_ICC_TAG_ALWAYS;
@@ -67,9 +70,6 @@ int qcom_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw,
6770
*agg_avg += avg_bw;
6871
*agg_peak = max_t(u32, *agg_peak, peak_bw);
6972

70-
for (i = 0; i < qn->num_bcms; i++)
71-
qcom_icc_bcm_voter_add(qp->voter, qn->bcms[i]);
72-
7373
return 0;
7474
}
7575
EXPORT_SYMBOL_GPL(qcom_icc_aggregate);

0 commit comments

Comments
 (0)