linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] interconnect: qcom: Ensure that the floor bandwidth value is enforced
@ 2020-10-21 15:59 Georgi Djakov
  2020-10-22 10:57 ` Akash Asthana
  0 siblings, 1 reply; 2+ messages in thread
From: Georgi Djakov @ 2020-10-21 15:59 UTC (permalink / raw)
  To: linux-pm
  Cc: akashast, mdtipton, saravanak, bjorn.andersson, linux-kernel,
	georgi.djakov

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: 7d3b0b0d8184 ("interconnect: qcom: Use icc_sync_state")
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
---
 drivers/interconnect/qcom/icc-rpmh.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/interconnect/qcom/icc-rpmh.c b/drivers/interconnect/qcom/icc-rpmh.c
index cf10a4b9611b..bf01d09dba6c 100644
--- a/drivers/interconnect/qcom/icc-rpmh.c
+++ b/drivers/interconnect/qcom/icc-rpmh.c
@@ -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)
@@ -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);
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] interconnect: qcom: Ensure that the floor bandwidth value is enforced
  2020-10-21 15:59 [PATCH] interconnect: qcom: Ensure that the floor bandwidth value is enforced Georgi Djakov
@ 2020-10-22 10:57 ` Akash Asthana
  0 siblings, 0 replies; 2+ messages in thread
From: Akash Asthana @ 2020-10-22 10:57 UTC (permalink / raw)
  To: Georgi Djakov, linux-pm
  Cc: mdtipton, saravanak, bjorn.andersson, linux-kernel


On 10/21/2020 9:29 PM, Georgi Djakov wrote:
> 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: 7d3b0b0d8184 ("interconnect: qcom: Use icc_sync_state")
> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>

Thanks Georgi,
I removed proxy ICC BW votes for earlycon driver "qcom_geni" introduced by patch [1], trogdor chromium board booted up fine, which use to crash without this patch.

https://patchwork.kernel.org/project/linux-arm-msm/patch/1592908737-7068-3-git-send-email-akashast@codeaurora.org/ [1]

Tested-by: Akash Asthana <akashast@codeaurora.org>
>   

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-22 10:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-21 15:59 [PATCH] interconnect: qcom: Ensure that the floor bandwidth value is enforced Georgi Djakov
2020-10-22 10:57 ` Akash Asthana

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).