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

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

Merge "msm: kgsl: Retry reset only on older GPUs"

parents 57465a2a bb997b07
Loading
Loading
Loading
Loading
+11 −7
Original line number Original line 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 */
		/* since device is officially off now clear start bit */
		clear_bit(ADRENO_DEVICE_STARTED, &adreno_dev->priv);
		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++) {
			for (i = 0; i < NUM_TIMES_RESET_RETRY; i++) {
				msleep(20);
				ret = adreno_start(device, 0);
				ret = adreno_start(device, 0);
				if (!ret)
				if (!ret)
					break;
					break;

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


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


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