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

Commit 3cfe62be authored by Harshdeep Dhatt's avatar Harshdeep Dhatt
Browse files

msm: kgsl: Count finished preemptions



Use preemption count sysfs node to track number of
completed preemptions and not number of triggered
preemptions.

Change-Id: I20dc1da5da4cf34d4c927686d497775e847cda2b
Signed-off-by: default avatarHarshdeep Dhatt <hdhatt@codeaurora.org>
parent 130b5c4c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -122,6 +122,8 @@ static void _a6xx_preemption_done(struct adreno_device *adreno_dev)
		return;
	}

	adreno_dev->preempt.count++;

	del_timer_sync(&adreno_dev->preempt.timer);

	adreno_readreg(adreno_dev, ADRENO_REG_CP_PREEMPT_LEVEL_STATUS, &status);
@@ -297,8 +299,6 @@ void a6xx_preemption_trigger(struct adreno_device *adreno_dev)
	kgsl_sharedmem_writel(device, &next->preemption_desc,
		PREEMPT_RECORD(wptr), next->wptr);

	preempt->count++;

	spin_unlock_irqrestore(&next->preempt_lock, flags);

	/* And write it to the smmu info */
@@ -400,6 +400,8 @@ void a6xx_preemption_callback(struct adreno_device *adreno_dev, int bit)
		return;
	}

	adreno_dev->preempt.count++;

	/*
	 * We can now safely clear the preemption keepalive bit, allowing
	 * power collapse to resume its regular activity.