Skip to content

Commit d1b35d6

Browse files
committed
Merge tag 'icc-5.10-rc2' of https://git.linaro.org/people/georgi.djakov/linux into char-misc-linus
Georgi writes: interconnect fixes for v5.10 This contains one core fix and a few driver fixes. - Fix the core to perform also aggregation when setting the initial bandwidth with sync_state. - Fixes in some drivers to make sure the correct sequence is used for initialization when we use sync_state. - Fix in the sdm845 driver to prevent a board hang that was hit when bandwidth scaling for display and multimedia was enabled. Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org> * tag 'icc-5.10-rc2' of https://git.linaro.org/people/georgi.djakov/linux: interconnect: qcom: use icc_sync state for sm8[12]50 interconnect: qcom: Ensure that the floor bandwidth value is enforced interconnect: qcom: sc7180: Init BCMs before creating the nodes interconnect: qcom: sdm845: Init BCMs before creating the nodes interconnect: Aggregate before setting initial bandwidth interconnect: qcom: sdm845: Enable keepalive for the MM1 BCM
2 parents 8062426 + fce52ad commit d1b35d6

6 files changed

Lines changed: 25 additions & 13 deletions

File tree

drivers/interconnect/core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,9 @@ void icc_node_add(struct icc_node *node, struct icc_provider *provider)
971971
}
972972
node->avg_bw = node->init_avg;
973973
node->peak_bw = node->init_peak;
974+
if (provider->aggregate)
975+
provider->aggregate(node, 0, node->init_avg, node->init_peak,
976+
&node->avg_bw, &node->peak_bw);
974977
provider->set(node, node);
975978
node->avg_bw = 0;
976979
node->peak_bw = 0;

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

drivers/interconnect/qcom/sc7180.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,9 @@ static int qnoc_probe(struct platform_device *pdev)
553553
return ret;
554554
}
555555

556+
for (i = 0; i < qp->num_bcms; i++)
557+
qcom_icc_bcm_init(qp->bcms[i], &pdev->dev);
558+
556559
for (i = 0; i < num_nodes; i++) {
557560
size_t j;
558561

@@ -576,9 +579,6 @@ static int qnoc_probe(struct platform_device *pdev)
576579
}
577580
data->num_nodes = num_nodes;
578581

579-
for (i = 0; i < qp->num_bcms; i++)
580-
qcom_icc_bcm_init(qp->bcms[i], &pdev->dev);
581-
582582
platform_set_drvdata(pdev, qp);
583583

584584
return 0;

drivers/interconnect/qcom/sdm845.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ DEFINE_QBCM(bcm_mc0, "MC0", true, &ebi);
151151
DEFINE_QBCM(bcm_sh0, "SH0", true, &qns_llcc);
152152
DEFINE_QBCM(bcm_mm0, "MM0", false, &qns_mem_noc_hf);
153153
DEFINE_QBCM(bcm_sh1, "SH1", false, &qns_apps_io);
154-
DEFINE_QBCM(bcm_mm1, "MM1", false, &qxm_camnoc_hf0_uncomp, &qxm_camnoc_hf1_uncomp, &qxm_camnoc_sf_uncomp, &qxm_camnoc_hf0, &qxm_camnoc_hf1, &qxm_mdp0, &qxm_mdp1);
154+
DEFINE_QBCM(bcm_mm1, "MM1", true, &qxm_camnoc_hf0_uncomp, &qxm_camnoc_hf1_uncomp, &qxm_camnoc_sf_uncomp, &qxm_camnoc_hf0, &qxm_camnoc_hf1, &qxm_mdp0, &qxm_mdp1);
155155
DEFINE_QBCM(bcm_sh2, "SH2", false, &qns_memnoc_snoc);
156156
DEFINE_QBCM(bcm_mm2, "MM2", false, &qns2_mem_noc);
157157
DEFINE_QBCM(bcm_sh3, "SH3", false, &acm_tcu);
@@ -489,6 +489,9 @@ static int qnoc_probe(struct platform_device *pdev)
489489
return ret;
490490
}
491491

492+
for (i = 0; i < qp->num_bcms; i++)
493+
qcom_icc_bcm_init(qp->bcms[i], &pdev->dev);
494+
492495
for (i = 0; i < num_nodes; i++) {
493496
size_t j;
494497

@@ -512,9 +515,6 @@ static int qnoc_probe(struct platform_device *pdev)
512515
}
513516
data->num_nodes = num_nodes;
514517

515-
for (i = 0; i < qp->num_bcms; i++)
516-
qcom_icc_bcm_init(qp->bcms[i], &pdev->dev);
517-
518518
platform_set_drvdata(pdev, qp);
519519

520520
return 0;

drivers/interconnect/qcom/sm8150.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,9 @@ static int qnoc_probe(struct platform_device *pdev)
551551
return ret;
552552
}
553553

554+
for (i = 0; i < qp->num_bcms; i++)
555+
qcom_icc_bcm_init(qp->bcms[i], &pdev->dev);
556+
554557
for (i = 0; i < num_nodes; i++) {
555558
size_t j;
556559

@@ -574,9 +577,6 @@ static int qnoc_probe(struct platform_device *pdev)
574577
}
575578
data->num_nodes = num_nodes;
576579

577-
for (i = 0; i < qp->num_bcms; i++)
578-
qcom_icc_bcm_init(qp->bcms[i], &pdev->dev);
579-
580580
platform_set_drvdata(pdev, qp);
581581

582582
return 0;
@@ -627,6 +627,7 @@ static struct platform_driver qnoc_driver = {
627627
.driver = {
628628
.name = "qnoc-sm8150",
629629
.of_match_table = qnoc_of_match,
630+
.sync_state = icc_sync_state,
630631
},
631632
};
632633
module_platform_driver(qnoc_driver);

drivers/interconnect/qcom/sm8250.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,9 @@ static int qnoc_probe(struct platform_device *pdev)
567567
return ret;
568568
}
569569

570+
for (i = 0; i < qp->num_bcms; i++)
571+
qcom_icc_bcm_init(qp->bcms[i], &pdev->dev);
572+
570573
for (i = 0; i < num_nodes; i++) {
571574
size_t j;
572575

@@ -590,9 +593,6 @@ static int qnoc_probe(struct platform_device *pdev)
590593
}
591594
data->num_nodes = num_nodes;
592595

593-
for (i = 0; i < qp->num_bcms; i++)
594-
qcom_icc_bcm_init(qp->bcms[i], &pdev->dev);
595-
596596
platform_set_drvdata(pdev, qp);
597597

598598
return 0;
@@ -643,6 +643,7 @@ static struct platform_driver qnoc_driver = {
643643
.driver = {
644644
.name = "qnoc-sm8250",
645645
.of_match_table = qnoc_of_match,
646+
.sync_state = icc_sync_state,
646647
},
647648
};
648649
module_platform_driver(qnoc_driver);

0 commit comments

Comments
 (0)