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

Commit 0647e63a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 7dd95c34 7af04afe
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