msm: kgsl: suspend device when the display does off
This change saves leakage current when the display is
off. In scenerios where a user is listening to an mp3
this feature stops the GPU as soon as the display goes
off. The GPU is started again when the display comes
back. The feature also avoids the GPU resuming when a
email sync happens while the device is suspended.
The change also disables NAP when the display is off.
It wakes 3d core to process user space requests when in
slumber
Change-Id: I65d17e937079a27b14d08be0a975d7ecf80b18ab
CRs-fixed: 316579
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
diff --git a/drivers/gpu/msm/kgsl_pwrctrl.h b/drivers/gpu/msm/kgsl_pwrctrl.h
index 127a19b..17dab76 100644
--- a/drivers/gpu/msm/kgsl_pwrctrl.h
+++ b/drivers/gpu/msm/kgsl_pwrctrl.h
@@ -56,6 +56,7 @@
const char *src_clk_name;
s64 time;
struct kgsl_busy busy;
+ unsigned int restore_slumber;
};
void kgsl_pwrctrl_clk(struct kgsl_device *device, int state);