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: Nitheesh Muthuraj <nmuthuraj@codeaurora.org>
This commit is contained in:
Nitheesh Muthuraj 2020-08-20 15:33:00 -07:00
commit 277697890b

View file

@ -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;