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

Commit bb997b07 authored by Kyle Piefer's avatar Kyle Piefer Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Retry reset only on older GPUs



If the first reset fails, it is highly unlikely that
a subsequent retry of reset will work. Stop doing
the reset retry loop on newer GPUs to prevent log
spam from repeated reset failures.

Change-Id: Ica5b49252669c3c6d54772c17868be3cde69429c
Signed-off-by: default avatarKyle Piefer <kpiefer@codeaurora.org>
parent 5cd75ce7
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -2218,13 +2218,17 @@ int adreno_reset(struct kgsl_device *device, int fault)
		/* since device is officially off now clear start bit */
		clear_bit(ADRENO_DEVICE_STARTED, &adreno_dev->priv);

		/* Keep trying to start the device until it works */
		/* Try to reset the device */
		ret = adreno_start(device, 0);

		/* On some GPUS, keep trying until it works */
		if (ret && ADRENO_GPUREV(adreno_dev) < 600) {
			for (i = 0; i < NUM_TIMES_RESET_RETRY; i++) {
				msleep(20);
				ret = adreno_start(device, 0);
				if (!ret)
					break;

			msleep(20);
			}
		}
	}
	if (ret)
+2 −2
Original line number Diff line number Diff line
@@ -171,8 +171,8 @@
#define KGSL_END_OF_PROFILE_IDENTIFIER	0x2DEFADE2
#define KGSL_PWRON_FIXUP_IDENTIFIER	0x2AFAFAFA

/* Number of times to try hard reset */
#define NUM_TIMES_RESET_RETRY 5
/* Number of times to try hard reset for pre-a6xx GPUs */
#define NUM_TIMES_RESET_RETRY 4

/* Number of times to poll the AHB fence in ISR */
#define FENCE_RETRY_MAX 100