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

Commit 0c186090 authored by Jordan Crouse's avatar Jordan Crouse
Browse files

msm: kgsl: Don't repeatedly call adreno_stop during reset



The driver attempts GPU reset several times if the first attempt
fails.  If adreno_start() fails it will clean itself up and turn
off the GPU so there is no reason to call adreno_stop again. In
fact, it is dangerous to do so as adreno_stop makes the assumption
that the GPU is on.

Change-Id: Ic0dedbad00aad38bad6b532f1a3266e0cad22352
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 5f0c3f08
Loading
Loading
Loading
Loading
+7 −12
Original line number Diff line number Diff line
@@ -1842,21 +1842,16 @@ int adreno_reset(struct kgsl_device *device)
			KGSL_DEV_ERR_ONCE(device, "Device soft reset failed\n");
	}
	if (ret) {
		for (i = 0; i < NUM_TIMES_RESET_RETRY; i++) {
		/* If soft reset failed/skipped, then pull the power */
			ret = adreno_stop(device);
			if (ret) {
				msleep(20);
				continue;
			}
		adreno_stop(device);

		/* Keep trying to start the device until it works */
		for (i = 0; i < NUM_TIMES_RESET_RETRY; i++) {
			ret = adreno_start(device);
			if (!ret)
				break;

			if (ret) {
			msleep(20);
				continue;
			}
			break;
		}
	}
	if (ret)