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

Commit b470e5d7 authored by Carter Cooper's avatar Carter Cooper
Browse files

msm: kgsl: Update OOB bits for A640



A640 had a minor update to which OOB bits do what.
Update them accordingly.

Change-Id: Id5fd0688af066857557b74cacde766106022bfff
Signed-off-by: default avatarCarter Cooper <ccooper@codeaurora.org>
parent bac0bb62
Loading
Loading
Loading
Loading
+23 −3
Original line number Diff line number Diff line
@@ -1588,8 +1588,19 @@ static int a6xx_oob_set(struct adreno_device *adreno_dev,
	if (!kgsl_gmu_isenabled(device))
		return 0;

	if (adreno_is_a640(adreno_dev)) {
		set = BIT(30 - req * 2);
		check = BIT(31 - req);

		if (req >= 6) {
			dev_err(&device->gmu.pdev->dev,
					"OOB_set(0x%x) invalid\n", set);
			return -EINVAL;
		}
	} else {
		set = BIT(req + 16);
		check = BIT(req + 24);
	}

	kgsl_gmu_regwrite(device, A6XX_GMU_HOST2GMU_INTR_SET, set);

@@ -1623,7 +1634,16 @@ static inline void a6xx_oob_clear(struct adreno_device *adreno_dev,
	if (!kgsl_gmu_isenabled(device))
		return;

	if (adreno_is_a640(adreno_dev)) {
		clear = BIT(31 - req * 2);
		if (req >= 6) {
			dev_err(&device->gmu.pdev->dev,
					"OOB_clear(0x%x) invalid\n", clear);
			return;
		}
	} else
		clear = BIT(req + 24);

	kgsl_gmu_regwrite(device, A6XX_GMU_HOST2GMU_INTR_SET, clear);
	trace_kgsl_gmu_oob_clear(clear);
}