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

Commit bbf46794 authored by Kyle Piefer's avatar Kyle Piefer Committed by Carter Cooper
Browse files

msm: kgsl: Move OPP disabling after probe



Since we cannot manipulate the OPP table during probe
due to the use of a mutex, move the disabling of
unused OPP levels to the first time we are
powering up.

Change-Id: I19dd4e038a2380bfb9f18560f8456f84ec3027d2
Signed-off-by: default avatarKyle Piefer <kpiefer@codeaurora.org>
Signed-off-by: default avatarOleg Perelet <operelet@codeaurora.org>
Signed-off-by: default avatarCarter Cooper <ccooper@codeaurora.org>
parent 93b0e1f1
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -2290,8 +2290,6 @@ int kgsl_pwrctrl_init(struct kgsl_device *device)
			pwr->pwrlevels[i].gpu_freq = freq;
	}

	kgsl_pwrctrl_disable_unused_opp(device);

	kgsl_clk_set_rate(device, pwr->num_pwrlevels - 1);

	if (pwr->grp_clks[6] != NULL)
@@ -2582,6 +2580,7 @@ static int kgsl_pwrctrl_enable(struct kgsl_device *device)
{
	struct kgsl_pwrctrl *pwr = &device->pwrctrl;
	int level, status;
	static bool disable_opp_done;

	if (pwr->wakeup_maxpwrlevel) {
		level = pwr->max_pwrlevel;
@@ -2592,6 +2591,11 @@ static int kgsl_pwrctrl_enable(struct kgsl_device *device)
		level = pwr->default_pwrlevel;
	}

	if (!disable_opp_done) {
		kgsl_pwrctrl_disable_unused_opp(device);
		disable_opp_done = true;
	}

	kgsl_pwrctrl_pwrlevel_change(device, level);

	if (kgsl_gmu_isenabled(device)) {