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

Commit a755c585 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: Correct max threshold bandwidth selection logic"

parents ef5ee28f 4481d17d
Loading
Loading
Loading
Loading
+3 −5
Original line number Original line Diff line number Diff line
@@ -1405,15 +1405,13 @@ static int mdss_mdp_set_threshold_max_bandwidth(struct mdss_mdp_ctl *ctl)
	pr_debug("final mode = %d, bw_mode_bitmap = %d\n", mode,
	pr_debug("final mode = %d, bw_mode_bitmap = %d\n", mode,
			ctl->mdata->bw_mode_bitmap);
			ctl->mdata->bw_mode_bitmap);


	/* Select BW mode with smallest limit */
	/* Return minimum bandwidth limit */
	while (mode) {
	for (i = 0; i < ctl->mdata->max_bw_settings_cnt; i++) {
		if (mode & BIT(0)) {
		if (max_bw_settings[i].mdss_max_bw_mode & mode) {
			threshold = max_bw_settings[i].mdss_max_bw_val;
			threshold = max_bw_settings[i].mdss_max_bw_val;
			if (threshold < max)
			if (threshold < max)
				max = threshold;
				max = threshold;
		}
		}
		mode >>= 1;
		i++;
	}
	}


	return max;
	return max;