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

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

Merge "msm: kgsl: Avoid out of bound register access for A6xx"

parents 24af5c26 b5e929b8
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -323,6 +323,7 @@ void a6xx_preemption_trigger(struct adreno_device *adreno_dev)
	 * free when the GPU is already powered on, whereas an OOB requires an
	 * unconditional handshake with the GMU.
	 */
	if (gmu_core_isenabled(device))
		gmu_core_regrmw(device, A6XX_GMU_AO_SPARE_CNTL, 0x0, 0x2);

	/*
@@ -404,8 +405,9 @@ void a6xx_preemption_callback(struct adreno_device *adreno_dev, int bit)
	 * We can now safely clear the preemption keepalive bit, allowing
	 * power collapse to resume its regular activity.
	 */
	gmu_core_regrmw(KGSL_DEVICE(adreno_dev), A6XX_GMU_AO_SPARE_CNTL, 0x2,
			0x0);
	if (gmu_core_isenabled(KGSL_DEVICE(adreno_dev)))
		gmu_core_regrmw(KGSL_DEVICE(adreno_dev),
				A6XX_GMU_AO_SPARE_CNTL, 0x2, 0x0);

	del_timer(&adreno_dev->preempt.timer);