Merge changes I3454e773,I1e01dc35 into msm-3.0
* changes:
msm: kgsl: Make sure SLUMBER is the requested state
msm: kgsl: Clarify the circumstances to enable SLUMBER state
diff --git a/drivers/gpu/msm/kgsl.c b/drivers/gpu/msm/kgsl.c
index e9c3f08..34e83a0 100644
--- a/drivers/gpu/msm/kgsl.c
+++ b/drivers/gpu/msm/kgsl.c
@@ -497,8 +497,8 @@
struct kgsl_device, display_off);
KGSL_PWR_WARN(device, "early suspend start\n");
mutex_lock(&device->mutex);
- kgsl_pwrctrl_request_state(device, KGSL_STATE_SLUMBER);
kgsl_pwrctrl_stop_work(device);
+ kgsl_pwrctrl_request_state(device, KGSL_STATE_SLUMBER);
kgsl_pwrctrl_sleep(device);
mutex_unlock(&device->mutex);
KGSL_PWR_WARN(device, "early suspend end\n");
diff --git a/drivers/gpu/msm/kgsl_pwrctrl.c b/drivers/gpu/msm/kgsl_pwrctrl.c
index 6ab9534..60bd232 100644
--- a/drivers/gpu/msm/kgsl_pwrctrl.c
+++ b/drivers/gpu/msm/kgsl_pwrctrl.c
@@ -622,7 +622,10 @@
KGSL_PWR_INFO(device, "idle timer expired device %d\n", device->id);
if (device->requested_state == KGSL_STATE_NONE) {
- kgsl_pwrctrl_request_state(device, KGSL_STATE_SLEEP);
+ if (device->pwrctrl.restore_slumber)
+ kgsl_pwrctrl_request_state(device, KGSL_STATE_SLUMBER);
+ else
+ kgsl_pwrctrl_request_state(device, KGSL_STATE_SLEEP);
/* Have work run in a non-interrupt context. */
queue_work(device->work_queue, &device->idle_check_ws);
}
@@ -788,17 +791,10 @@
/* Work through the legal state transitions */
switch (device->requested_state) {
case KGSL_STATE_NAP:
- if (device->pwrctrl.restore_slumber) {
- kgsl_pwrctrl_request_state(device, KGSL_STATE_NONE);
- break;
- }
status = _nap(device);
break;
case KGSL_STATE_SLEEP:
- if (device->pwrctrl.restore_slumber)
- status = _slumber(device);
- else
- status = _sleep(device);
+ status = _sleep(device);
break;
case KGSL_STATE_SLUMBER:
status = _slumber(device);