Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d96df79b authored by Ingrid Gallardo's avatar Ingrid Gallardo Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarIngrid Gallardo <ingridg@codeaurora.org>
parent f265ab81
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2136,7 +2136,7 @@ int mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp)

		if (ctrl->mdss_util->bus_scale_set_quota)
			ctrl->mdss_util->bus_scale_set_quota(MDSS_DSI_RT,
								SZ_1M, SZ_1M);
								0, SZ_1M);

		if (ctrl->mdss_util->iommu_ctrl) {
			rc = ctrl->mdss_util->iommu_ctrl(1);
+15 −0
Original line number Diff line number Diff line
@@ -340,6 +340,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) {
@@ -379,6 +380,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;