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>
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJfm/D4AAoJEIDQzArG2BZjGLsP/3fH6VR4K/f5txu+uiqMpYu9
 AEQjVdN3dyBcZ+jO5yVRS+wm3TTSqhVlj3KYBrAb8WZZGgdtPe9SPimx/cnhva7D
 nWTk36LUu0foarzXBp3Medu54QAXKwu8pYFzMiNXNcgIMFV0DEPumxlCyDQx8cGH
 1KRiVhr2oEYF+Ujq5lQyYtOPfkkcG3Ajib9H4BmKdwBN2j0hwV5gC3YbV2cIMzWG
 tfETHrfvIWtt4Rxt24DklQCV2X2h3QKetcSf3LAwkLqrkENFZ5cLSouZQ4etC+Gh
 SW9rfOd9ICluKUjD1f8B5JBfzSaTSJCX6VbAdx5DHGLkYZ/5tzjIpIKsGLMCc/Jh
 wz632n3phIVmHlaR8jWwwgv2V6tGwcv2kVSVIYJox7GRTg9ybGGL5FnCf/VpvTdg
 5USCsK+yMzZXoD42/LbLILLJhDVe8QQQrD6iwBv4AEGqN5sp6oFePeVxbfAzaL8A
 Qcsw7TZ9O6QprcsunEaf7CFUlr07qRiKQkVbvw+o6WFuTgxzvyIy/KnpgZjv0/8J
 F5XvUFOmLCktBnjOH16aGwK0GDQ948BFCQNrBPnReX4dst4+4H1a51baHZaSXHG4
 SM7NI1LJTfMLD+VkJKxWaSOE4+gmK7PAc8vbLOiW88q5w2lxGbhg5vwmp/bX/JMc
 sPL7EVRpFIaY2oztCJZs
 =Z+xC
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Greg Kroah-Hartman 2020-10-30 13:25:58 +01:00
commit d1b35d66f4
6 changed files with 25 additions and 13 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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);
@ -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;
@ -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;

View File

@ -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;
@ -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;
@ -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);

View File

@ -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;
@ -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;
@ -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);