Skip to content

Commit 266cd33

Browse files
author
Georgi Djakov
committed
interconnect: qcom: Ensure that the floor bandwidth value is enforced
Take into account the initial bandwidth from the framework and update the internal sum and max values before committing if needed. This will ensure that the floor bandwidth values are enforced until the providers get into sync state. Fixes: 7d3b0b0 ("interconnect: qcom: Use icc_sync_state") Tested-by: Akash Asthana <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Georgi Djakov <[email protected]>
1 parent 5998095 commit 266cd33

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/interconnect/qcom/icc-rpmh.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ EXPORT_SYMBOL_GPL(qcom_icc_aggregate);
7979
int qcom_icc_set(struct icc_node *src, struct icc_node *dst)
8080
{
8181
struct qcom_icc_provider *qp;
82+
struct qcom_icc_node *qn;
8283
struct icc_node *node;
8384

8485
if (!src)
@@ -87,6 +88,12 @@ int qcom_icc_set(struct icc_node *src, struct icc_node *dst)
8788
node = src;
8889

8990
qp = to_qcom_provider(node->provider);
91+
qn = node->data;
92+
93+
qn->sum_avg[QCOM_ICC_BUCKET_AMC] = max_t(u64, qn->sum_avg[QCOM_ICC_BUCKET_AMC],
94+
node->avg_bw);
95+
qn->max_peak[QCOM_ICC_BUCKET_AMC] = max_t(u64, qn->max_peak[QCOM_ICC_BUCKET_AMC],
96+
node->peak_bw);
9097

9198
qcom_icc_bcm_voter_commit(qp->voter);
9299

0 commit comments

Comments
 (0)