Skip to content

Commit

Permalink
Merge tag 'icc-5.10-rc2' of https://git.linaro.org/people/georgi.djak…
Browse files Browse the repository at this point in the history
…ov/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 <[email protected]>

* 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
  • Loading branch information
gregkh committed Oct 30, 2020
2 parents 8062426 + fce52ad commit d1b35d6
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 13 deletions.
3 changes: 3 additions & 0 deletions drivers/interconnect/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
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
6 changes: 3 additions & 3 deletions drivers/interconnect/qcom/sc7180.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions drivers/interconnect/qcom/sdm845.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ DEFINE_QBCM(bcm_mc0, "MC0", true, &ebi);
DEFINE_QBCM(bcm_sh0, "SH0", true, &qns_llcc);
DEFINE_QBCM(bcm_mm0, "MM0", false, &qns_mem_noc_hf);
DEFINE_QBCM(bcm_sh1, "SH1", false, &qns_apps_io);
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);
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);
DEFINE_QBCM(bcm_sh2, "SH2", false, &qns_memnoc_snoc);
DEFINE_QBCM(bcm_mm2, "MM2", false, &qns2_mem_noc);
DEFINE_QBCM(bcm_sh3, "SH3", false, &acm_tcu);
Expand Down Expand Up @@ -489,6 +489,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;

Expand All @@ -512,9 +515,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;
Expand Down
7 changes: 4 additions & 3 deletions drivers/interconnect/qcom/sm8150.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,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;

Expand All @@ -574,9 +577,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;
Expand Down Expand Up @@ -627,6 +627,7 @@ static struct platform_driver qnoc_driver = {
.driver = {
.name = "qnoc-sm8150",
.of_match_table = qnoc_of_match,
.sync_state = icc_sync_state,
},
};
module_platform_driver(qnoc_driver);
Expand Down
7 changes: 4 additions & 3 deletions drivers/interconnect/qcom/sm8250.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,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;

Expand All @@ -590,9 +593,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;
Expand Down Expand Up @@ -643,6 +643,7 @@ static struct platform_driver qnoc_driver = {
.driver = {
.name = "qnoc-sm8250",
.of_match_table = qnoc_of_match,
.sync_state = icc_sync_state,
},
};
module_platform_driver(qnoc_driver);
Expand Down

0 comments on commit d1b35d6

Please sign in to comment.