Loading drivers/gpu/msm/kgsl_pwrctrl.c +21 −3 Original line number Diff line number Diff line Loading @@ -2334,21 +2334,39 @@ void kgsl_idle_check(struct work_struct *work) { struct kgsl_device *device = container_of(work, struct kgsl_device, idle_check_ws); int ret = 0; unsigned int requested_state; WARN_ON(device == NULL); if (device == NULL) return; mutex_lock(&device->mutex); requested_state = device->requested_state; if (device->state == KGSL_STATE_ACTIVE || device->state == KGSL_STATE_NAP || device->state == KGSL_STATE_DEEP_NAP) { if (!atomic_read(&device->active_cnt)) kgsl_pwrctrl_change_state(device, if (!atomic_read(&device->active_cnt)) { ret = kgsl_pwrctrl_change_state(device, device->requested_state); if (ret == -EBUSY) { /* * If the GPU is currently busy, restore * the requested state and reschedule * idle work. */ kgsl_pwrctrl_request_state(device, requested_state); kgsl_schedule_work(&device->idle_check_ws); } } if (!ret) kgsl_pwrctrl_request_state(device, KGSL_STATE_NONE); if (device->state == KGSL_STATE_ACTIVE) mod_timer(&device->idle_timer, jiffies + Loading Loading
drivers/gpu/msm/kgsl_pwrctrl.c +21 −3 Original line number Diff line number Diff line Loading @@ -2334,21 +2334,39 @@ void kgsl_idle_check(struct work_struct *work) { struct kgsl_device *device = container_of(work, struct kgsl_device, idle_check_ws); int ret = 0; unsigned int requested_state; WARN_ON(device == NULL); if (device == NULL) return; mutex_lock(&device->mutex); requested_state = device->requested_state; if (device->state == KGSL_STATE_ACTIVE || device->state == KGSL_STATE_NAP || device->state == KGSL_STATE_DEEP_NAP) { if (!atomic_read(&device->active_cnt)) kgsl_pwrctrl_change_state(device, if (!atomic_read(&device->active_cnt)) { ret = kgsl_pwrctrl_change_state(device, device->requested_state); if (ret == -EBUSY) { /* * If the GPU is currently busy, restore * the requested state and reschedule * idle work. */ kgsl_pwrctrl_request_state(device, requested_state); kgsl_schedule_work(&device->idle_check_ws); } } if (!ret) kgsl_pwrctrl_request_state(device, KGSL_STATE_NONE); if (device->state == KGSL_STATE_ACTIVE) mod_timer(&device->idle_timer, jiffies + Loading