Skip to content

Commit

Permalink
interconnect: qcom: Ensure that the floor bandwidth value is enforced
Browse files Browse the repository at this point in the history
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 <akashast@codeaurora.org>
Link: https://lore.kernel.org/r/20201021155938.9223-1-georgi.djakov@linaro.org
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
  • Loading branch information
Georgi Djakov committed Oct 22, 2020
1 parent 5998095 commit 266cd33
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/interconnect/qcom/icc-rpmh.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ EXPORT_SYMBOL_GPL(qcom_icc_aggregate);
int qcom_icc_set(struct icc_node *src, struct icc_node *dst)
{
struct qcom_icc_provider *qp;
struct qcom_icc_node *qn;
struct icc_node *node;

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

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

qn->sum_avg[QCOM_ICC_BUCKET_AMC] = max_t(u64, qn->sum_avg[QCOM_ICC_BUCKET_AMC],
node->avg_bw);
qn->max_peak[QCOM_ICC_BUCKET_AMC] = max_t(u64, qn->max_peak[QCOM_ICC_BUCKET_AMC],
node->peak_bw);

qcom_icc_bcm_voter_commit(qp->voter);

Expand Down

0 comments on commit 266cd33

Please sign in to comment.