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

Commit 27769789 authored by Nitheesh Muthuraj's avatar Nitheesh Muthuraj
Browse files

msm: kgsl: Fix overflow issue to gpu_busy



gpu_busy is an unsigned 64 bit int and accumulates overtime
while running gpu intensive application(no slumber)
which eventually results in overflow.

Change-Id: Ifda376918ac58fa393a1958101d3d4b161bdd3c0
Signed-off-by: default avatarNitheesh Muthuraj <nmuthuraj@codeaurora.org>
parent 1e4aef37
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3456,7 +3456,7 @@ static void adreno_power_stats(struct kgsl_device *device,

	if (busy->gpu_busy)
		gpu_busy = (val >= busy->gpu_busy) ? val - busy->gpu_busy :
			(~0UL - busy->gpu_busy) + val;
			(UINT_MAX - busy->gpu_busy) + val;

	busy->gpu_busy = val;