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

Commit ef8cd99f authored by Lucille Sylvester's avatar Lucille Sylvester
Browse files

msm: kgsl: Remove the frequency stepping work-around



In older hardware variants while running at GPU frequency x,
there was a .5x-2x limitation on changing it while the GPU was
active.  Therefore all frequency changes were stepped to avoid
stability issues.  This limitation is no longer in effect, so
remove the work-around.

Change-Id: I9716ba4cb40148d4db5ac1478b512a93707d88a1
CRs-fixed: 598694
Signed-off-by: default avatarLucille Sylvester <lsylvest@codeaurora.org>
parent 16103798
Loading
Loading
Loading
Loading
+3 −19
Original line number Diff line number Diff line
@@ -151,7 +151,6 @@ void kgsl_pwrctrl_pwrlevel_change(struct kgsl_device *device,
{
	struct kgsl_pwrctrl *pwr = &device->pwrctrl;
	struct kgsl_pwrlevel *pwrlevel;
	int delta, level;

	/* Adjust the power level to the current constraints */
	new_level = _adjust_pwrlevel(pwr, new_level);
@@ -159,12 +158,8 @@ void kgsl_pwrctrl_pwrlevel_change(struct kgsl_device *device,
	if (new_level == pwr->active_pwrlevel)
		return;

	delta = new_level < pwr->active_pwrlevel ? -1 : 1;

	update_clk_statistics(device, true);

	level = pwr->active_pwrlevel;

	/*
	 * Set the active powerlevel first in case the clocks are off - if we
	 * don't do this then the pwrlevel change won't take effect when the
@@ -178,20 +173,9 @@ void kgsl_pwrctrl_pwrlevel_change(struct kgsl_device *device,
	kgsl_pwrctrl_buslevel_update(device, true);

	if (test_bit(KGSL_PWRFLAGS_CLK_ON, &pwr->power_flags) ||
		(device->state == KGSL_STATE_NAP)) {

		/*
		 * Don't shift by more than one level at a time to
		 * avoid glitches.
		 */

		while (level != new_level) {
			level += delta;

		(device->state == KGSL_STATE_NAP))
		clk_set_rate(pwr->grp_clks[0],
				pwr->pwrlevels[level].gpu_freq);
		}
	}
				pwr->pwrlevels[new_level].gpu_freq);


	trace_kgsl_pwrlevel(device, pwr->active_pwrlevel, pwrlevel->gpu_freq);