mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
msm: kgsl: Skip state change in idle check, if requested state is NONE
After scheduling the idle work for transitioning to either NAP or SLUMBER it's possible that requested state can change to NONE if any new workload comes before kgsl_idle_check is executed or it gets the device mutex. If this happens, current code calls pwrctrl_change_state which fails as this is not a valid transition. To prevent this, skip calling pwrctrl_change_state if requested state is NONE. Change-Id: Iae535c6e2a3230f9e7e210712990eeb405822f4f Signed-off-by: Deepak Kumar <dkumar@codeaurora.org> Signed-off-by: Pankaj Gupta <gpankaj@codeaurora.org>
This commit is contained in:
parent
b5b61d0f51
commit
50379951c4
1 changed files with 12 additions and 0 deletions
|
|
@ -1601,6 +1601,18 @@ void kgsl_idle_check(struct work_struct *work)
|
|||
|
||||
mutex_lock(&device->mutex);
|
||||
|
||||
/*
|
||||
* After scheduling idle work for transitioning to either NAP or
|
||||
* SLUMBER, it's possible that requested state can change to NONE
|
||||
* if any new workload comes before kgsl_idle_check is executed or
|
||||
* it gets the device mutex. In such case, no need to change state
|
||||
* to NONE.
|
||||
*/
|
||||
if (device->requested_state == KGSL_STATE_NONE) {
|
||||
mutex_unlock(&device->mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
requested_state = device->requested_state;
|
||||
|
||||
if (device->state == KGSL_STATE_ACTIVE
|
||||
|
|
|
|||
Loading…
Reference in a new issue