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

Commit 507aef89 authored by Venkateswara Rao Tadikonda's avatar Venkateswara Rao Tadikonda
Browse files

msm: kgsl: Fix a dead loop issue while changing gpu frequency



There is a dead loop in kgsl_devfreq_target(), while governor request
to change GPU frequency. In governor 'userspace' mode, If the requested
frequency (set_freq) is more than the configured frequency and max_freq
is also set to more than the configured frequency, then there is a dead
loop while changing target frequency.

Dead loop occurs due to comparing signed integer 'i' with unsigned integer
'max_pwrlevel'. Decrementing 'i' beyond zero will cause dead loop.
So, change the array index 'i' of pwrlevels[] to unsigned int, which can't
be decremented beyond zero. Also, changing loop condition to restrict 'i'
within permitted levels.

Change-Id: Ic82b7477d50d1abcd348b011f64246066887922c
Signed-off-by: default avatarVenkateswara Rao Tadikonda <vtadik@codeaurora.org>
parent 1a7276f0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment