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

Commit 1402b064 authored by Carter Cooper's avatar Carter Cooper Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Poll for the correct GMU start signature



0xBABEFACE is no longer used to determine when the GMU is
operational. Use the correct new signature going forward.

Change-Id: I72e42187beef37c3c910310f3a9112684a60571b
Signed-off-by: default avatarCarter Cooper <ccooper@codeaurora.org>
parent 341d20f2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -124,6 +124,8 @@
#define ADRENO_ACD BIT(17)
/* ECP enabled GMU */
#define ADRENO_ECP BIT(18)
/* Cooperative reset enabled GMU */
#define ADRENO_COOP_RESET BIT(19)

/*
 * Adreno GPU quirks - control bits for various workarounds
+9 −3
Original line number Diff line number Diff line
@@ -314,6 +314,14 @@ static void a6xx_gmu_power_config(struct kgsl_device *device)
static int a6xx_gmu_start(struct kgsl_device *device)
{
	struct gmu_device *gmu = KGSL_GMU_DEVICE(device);
	u32 val = 0x00000100;
	u32 mask = 0x000001FF;

	/* Check for 0xBABEFACE on legacy targets */
	if (!ADRENO_FEATURE(ADRENO_DEVICE(device), ADRENO_COOP_RESET)) {
		val = 0xBABEFACE;
		mask = 0xFFFFFFFF;
	}

	kgsl_regwrite(device, A6XX_GMU_CX_GMU_WFI_CONFIG, 0x0);

@@ -321,9 +329,7 @@ static int a6xx_gmu_start(struct kgsl_device *device)
	gmu_core_regwrite(device, A6XX_GMU_CM3_SYSRESET, 0);
	if (timed_poll_check(device,
			A6XX_GMU_CM3_FW_INIT_RESULT,
			0xBABEFACE,
			GMU_START_TIMEOUT,
			0xFFFFFFFF)) {
			val, GMU_START_TIMEOUT, mask)) {
		dev_err(&gmu->pdev->dev, "GMU doesn't boot\n");
		return -ETIMEDOUT;
	}