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

Commit 7af04afe authored by Ujwal Patel's avatar Ujwal Patel
Browse files

msm: mdss: remove additional vert decimation when per pipe BW exceeds



Currently if per pipe BW exceeds pre-defined limit, we add additional
vertical decimation to reduce BW. But this has inverse effect on quality.
To mitigate this issue, decimate further only if user has already
requested decimation else return an appropriate error which user can
detect and act upon it.

CRs-Fixed: 637971
Change-Id: I1c3b913036b7a1680d6c99b03d42f1204f71f89f
Signed-off-by: default avatarUjwal Patel <ujwalp@codeaurora.org>
parent 563010bc
Loading
Loading
Loading
Loading
+16 −3
Original line number Diff line number Diff line
@@ -357,9 +357,22 @@ static int __mdp_pipe_tune_perf(struct mdss_mdp_pipe *pipe)
	for (;;) {
		rc = mdss_mdp_perf_calc_pipe(pipe, &perf, NULL, true);

		if (!rc && (perf.mdp_clk_rate <= mdata->max_mdp_clk_rate) &&
			!mdss_mdp_perf_bw_check_pipe(&perf, pipe))
		if (!rc && (perf.mdp_clk_rate <= mdata->max_mdp_clk_rate)) {
			rc = mdss_mdp_perf_bw_check_pipe(&perf, pipe);
			if (!rc) {
				break;
			} else if ((rc == -E2BIG) && !pipe->vert_deci) {
				/*
				 * if per pipe BW exceeds the limit and user
				 * has not requested decimation then return
				 * -E2BIG error back to user else try more
				 * decimation.
				 */
				pr_debug("pipe%d exceeded per pipe BW\n",
					pipe->num);
				return rc;
			}
		}

		/*
		 * if decimation is available try to reduce minimum clock rate