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

Commit 84fe898c 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: Make sure regulators are ON before GPU clocks are forced on"

parents 09878820 b3b23ddb
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1004,6 +1004,8 @@ static void __force_on(struct kgsl_device *device, int flag, int on)
	if (on) {
		switch (flag) {
		case KGSL_PWRFLAGS_CLK_ON:
			/* make sure pwrrail is ON before enabling clocks */
			kgsl_pwrctrl_pwrrail(device, KGSL_PWRFLAGS_ON);
			kgsl_pwrctrl_clk(device, KGSL_PWRFLAGS_ON,
				KGSL_STATE_ACTIVE);
			break;
@@ -1830,7 +1832,12 @@ static int kgsl_pwrctrl_pwrrail(struct kgsl_device *device, int state)
	struct kgsl_pwrctrl *pwr = &device->pwrctrl;
	int status = 0;

	if (test_bit(KGSL_PWRFLAGS_POWER_ON, &pwr->ctrl_flags))
	/*
	 * Disabling the regulator means also disabling dependent clocks.
	 * Hence don't disable it if force clock ON is set.
	 */
	if (test_bit(KGSL_PWRFLAGS_POWER_ON, &pwr->ctrl_flags) ||
		test_bit(KGSL_PWRFLAGS_CLK_ON, &pwr->ctrl_flags))
		return 0;

	if (state == KGSL_PWRFLAGS_OFF) {