Message ID | 20201013135913.29059-1-georgi.djakov@linaro.org (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | [1/3] interconnect: Aggregate before setting initial bandwidth | expand |
On Tue, Oct 13, 2020 at 6:59 AM Georgi Djakov <georgi.djakov@linaro.org> wrote: > > When setting the initial bandwidth, make sure to call the aggregate() > function (if such is implemented for the current provider), to handle > cases when data needs to be aggregated first. > > Fixes: b1d681d8d324 ("interconnect: Add sync state support") > Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org> > --- > drivers/interconnect/core.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c > index eea47b4c84aa..974a66725d09 100644 > --- a/drivers/interconnect/core.c > +++ b/drivers/interconnect/core.c > @@ -971,6 +971,9 @@ 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->aggregate) > + provider->aggregate(node, 0, node->init_avg, node->init_peak, > + &node->avg_bw, &node->peak_bw); > provider->set(node, node); > node->avg_bw = 0; > node->peak_bw = 0; Acked-by: Saravana Kannan <saravanak@google.com> -Saravana
On Tue, Oct 13, 2020 at 6:59 AM Georgi Djakov <georgi.djakov@linaro.org> wrote: > > Currently if we use sync_state, by default the bandwidth is maxed out, > but in order to set this in hardware, the BCMs (Bus Clock Managers) need > to be initialized first. Move the BCM initialization before creating the > nodes to fix this. > > Fixes: 7d3b0b0d8184 ("interconnect: qcom: Use icc_sync_state") > Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org> > --- > drivers/interconnect/qcom/sc7180.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/interconnect/qcom/sc7180.c b/drivers/interconnect/qcom/sc7180.c > index bf11b82ed55c..8d9044ed18ab 100644 > --- a/drivers/interconnect/qcom/sc7180.c > +++ b/drivers/interconnect/qcom/sc7180.c > @@ -553,6 +553,9 @@ static int qnoc_probe(struct platform_device *pdev) > return ret; > } > > + for (i = 0; i < qp->num_bcms; i++) > + qcom_icc_bcm_init(qp->bcms[i], &pdev->dev); > + > for (i = 0; i < num_nodes; i++) { > size_t j; > > @@ -576,9 +579,6 @@ static int qnoc_probe(struct platform_device *pdev) > } > data->num_nodes = num_nodes; > > - for (i = 0; i < qp->num_bcms; i++) > - qcom_icc_bcm_init(qp->bcms[i], &pdev->dev); > - > platform_set_drvdata(pdev, qp); > > return 0; Acked-by: Saravana Kannan <saravanak@google.com> -Saravana
diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c index eea47b4c84aa..974a66725d09 100644 --- a/drivers/interconnect/core.c +++ b/drivers/interconnect/core.c @@ -971,6 +971,9 @@ 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->aggregate) + provider->aggregate(node, 0, node->init_avg, node->init_peak, + &node->avg_bw, &node->peak_bw); provider->set(node, node); node->avg_bw = 0; node->peak_bw = 0;
When setting the initial bandwidth, make sure to call the aggregate() function (if such is implemented for the current provider), to handle cases when data needs to be aggregated first. Fixes: b1d681d8d324 ("interconnect: Add sync state support") Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org> --- drivers/interconnect/core.c | 3 +++ 1 file changed, 3 insertions(+)