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

Commit da2a0248 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Save and restore the power ctrl_flags during recovery"

parents 1ea919cd e562c600
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -2477,6 +2477,14 @@ int adreno_reset(struct kgsl_device *device, int fault)
		}
	}
	if (ret) {
		unsigned long flags = device->pwrctrl.ctrl_flags;

		/*
		 * Clear ctrl_flags to ensure clocks and regulators are
		 * turned off
		 */
		device->pwrctrl.ctrl_flags = 0;

		/* If soft reset failed/skipped, then pull the power */
		kgsl_pwrctrl_change_state(device, KGSL_STATE_INIT);
		/* since device is officially off now clear start bit */
@@ -2494,6 +2502,8 @@ int adreno_reset(struct kgsl_device *device, int fault)
					break;
			}
		}

		device->pwrctrl.ctrl_flags = flags;
	}
	if (ret)
		return ret;
+6 −0
Original line number Diff line number Diff line
@@ -1136,11 +1136,15 @@ static int a6xx_reset(struct kgsl_device *device, int fault)
{
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
	int ret;
	unsigned long flags = device->pwrctrl.ctrl_flags;

	/* Use the regular reset sequence for No GMU */
	if (!gmu_core_isenabled(device))
		return adreno_reset(device, fault);

	/* Clear ctrl_flags to ensure clocks and regulators are turned off */
	device->pwrctrl.ctrl_flags = 0;

	/* Transition from ACTIVE to RESET state */
	kgsl_pwrctrl_change_state(device, KGSL_STATE_RESET);

@@ -1153,6 +1157,8 @@ static int a6xx_reset(struct kgsl_device *device, int fault)

	kgsl_pwrctrl_change_state(device, KGSL_STATE_ACTIVE);

	device->pwrctrl.ctrl_flags = flags;

	/*
	 * If active_cnt is zero, there is no need to keep the GPU active. So,
	 * we should transition to SLUMBER.