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

Commit f7d38697 authored by Abhilash Kumar's avatar Abhilash Kumar Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Reset busy data after soft reset



GPU perfcounters gets reset after a soft reset. Currently
GPU busy stats is using previous values after a soft reset.
This might lead to invalid GPU busy calculations. Start GPU
stats from the scratch after a soft reset to get valid GPU
busy calculations.

Change-Id: Ia38c18ad59f438d724ff4710ee2b350853b3810d
Signed-off-by: default avatarAbhilash Kumar <krabhi@codeaurora.org>
parent 19a2db2c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2200,6 +2200,11 @@ static int adreno_soft_reset(struct kgsl_device *device)
	/* Reset the GPU */
	_soft_reset(adreno_dev);

	/* Clear the busy_data stats - we're starting over from scratch */
	adreno_dev->busy_data.gpu_busy = 0;
	adreno_dev->busy_data.vbif_ram_cycles = 0;
	adreno_dev->busy_data.vbif_starved_ram = 0;

	/* Set the page table back to the default page table */
	adreno_ringbuffer_set_global(adreno_dev, 0);
	kgsl_mmu_set_pt(&device->mmu, device->mmu.defaultpagetable);