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

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

Merge "msm: kgsl: set the correct max_state"

parents 41db0ab8 c0d04ba2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ static int tz_get_target_freq(struct devfreq *devfreq, unsigned long *freq,
	if (val) {
		level += val;
		level = max(level, 0);
		level = min_t(int, level, devfreq->profile->max_state);
		level = min_t(int, level, devfreq->profile->max_state - 1);
		goto clear;
	}

+5 −1
Original line number Diff line number Diff line
@@ -447,7 +447,11 @@ int kgsl_pwrscale_init(struct device *dev, const char *governor)
	for (i = 0; i < (pwr->num_pwrlevels - 1); i++)
		pwrscale->freq_table[out++] = pwr->pwrlevels[i].gpu_freq;

	profile->max_state = pwr->num_pwrlevels - 2;
	/*
	 * Max_state is the number of valid power levels.
	 * The valid power levels range from 0 - (max_state - 1)
	 */
	profile->max_state = pwr->num_pwrlevels - 1;
	/* link storage array to the devfreq profile pointer */
	profile->freq_table = pwrscale->freq_table;