msm: mdss: skip bw vote for same bw requests
If the bandwidth requested is the same as the one from the previous vote, skip the call to bus driver in order to avoid an overhead due unnecessary calls to bus driver. Change-Id: I5e90f04a186d9d259e28c70783840294c86fcc98 Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org> (cherry picked from commit 7337a9e3df25b2ce22005001d95866a51738429b ) [veeras@codeaurora.org: Resolve merge conflict in mdss_dsi_host.c] Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
This commit is contained in:
parent
40064f21be
commit
059322e52a
2 changed files with 16 additions and 1 deletions
|
@ -2024,7 +2024,7 @@ int mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp)
|
|||
ctrl->mdss_util->bus_bandwidth_ctrl(1);
|
||||
|
||||
if (ctrl->mdss_util->bus_scale_set_quota)
|
||||
ctrl->mdss_util->bus_scale_set_quota(MDSS_DSI_RT, SZ_1M, SZ_1M);
|
||||
ctrl->mdss_util->bus_scale_set_quota(MDSS_DSI_RT, 0, SZ_1M);
|
||||
|
||||
pr_debug("%s: from_mdp=%d pid=%d\n", __func__, from_mdp, current->pid);
|
||||
|
||||
|
|
|
@ -317,6 +317,7 @@ static int mdss_mdp_bus_scale_set_quota(u64 ab_quota_rt, u64 ab_quota_nrt,
|
|||
u32 nrt_axi_port_cnt = mdss_res->nrt_axi_port_cnt;
|
||||
u32 total_axi_port_cnt = mdss_res->axi_port_cnt;
|
||||
u32 rt_axi_port_cnt = total_axi_port_cnt - nrt_axi_port_cnt;
|
||||
int match_cnt = 0;
|
||||
|
||||
if (!bw_table || !total_axi_port_cnt ||
|
||||
total_axi_port_cnt > MAX_AXI_PORT_COUNT) {
|
||||
|
@ -357,6 +358,20 @@ static int mdss_mdp_bus_scale_set_quota(u64 ab_quota_rt, u64 ab_quota_nrt,
|
|||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < total_axi_port_cnt; i++) {
|
||||
vect = &bw_table->usecase
|
||||
[mdss_res->curr_bw_uc_idx].vectors[i];
|
||||
/* avoid performing updates for small changes */
|
||||
if ((ab_quota[i] == vect->ab) &&
|
||||
(ib_quota[i] == vect->ib))
|
||||
match_cnt++;
|
||||
}
|
||||
|
||||
if (match_cnt == total_axi_port_cnt) {
|
||||
pr_debug("skip BW vote\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
new_uc_idx = (mdss_res->curr_bw_uc_idx %
|
||||
(bw_table->num_usecases - 1)) + 1;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue