mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
interconnect: qcom: Don't vote using unrelated voters in sync_state
Currently, when sync_state re-votes to remove the init proxies, it re-votes each voter for each BCM. However, each BCM is associated with exactly one voter, so we only need to re-vote using the single voter associated with the BCM. Not only does this improve performance by removing unnecessary votes, but it can also fix stability issues when the voter RSC isn't available yet. Change-Id: Id2de6959ffb17b10c9e88d31308fd22964c3e456 Signed-off-by: Mike Tipton <[email protected]>
This commit is contained in:
parent
d1687a9807
commit
42af5540ed
1 changed files with 14 additions and 7 deletions
|
|
@ -1042,6 +1042,8 @@ static void qnoc_sync_state(struct device *dev)
|
|||
struct qcom_icc_provider *qp = platform_get_drvdata(pdev);
|
||||
struct icc_provider *provider = &qp->provider;
|
||||
struct qcom_icc_node *qnode;
|
||||
struct qcom_icc_bcm *bcm;
|
||||
struct bcm_voter *voter;
|
||||
struct icc_node *node;
|
||||
|
||||
mutex_lock(&probe_list_lock);
|
||||
|
|
@ -1064,17 +1066,22 @@ static void qnoc_sync_state(struct device *dev)
|
|||
}
|
||||
|
||||
list_for_each_entry(qp, &qnoc_probe_list, probe_list) {
|
||||
int i, j;
|
||||
|
||||
for (i = 0; i < qp->num_voters; i++) {
|
||||
for (j = 0; j < qp->num_bcms; j++)
|
||||
qcom_icc_bcm_voter_add(qp->voters[i],
|
||||
qp->bcms[j]);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < qp->num_voters; i++)
|
||||
qcom_icc_bcm_voter_clear_init(qp->voters[i]);
|
||||
qcom_icc_bcm_voter_commit(qp->voters[i]);
|
||||
|
||||
for (i = 0; i < qp->num_bcms; i++) {
|
||||
bcm = qp->bcms[i];
|
||||
if (!bcm->keepalive)
|
||||
continue;
|
||||
|
||||
voter = qp->voters[bcm->voter_idx];
|
||||
qcom_icc_bcm_voter_add(voter, bcm);
|
||||
qcom_icc_bcm_voter_commit(voter);
|
||||
}
|
||||
}
|
||||
|
||||
mutex_unlock(&probe_list_lock);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue