summaryrefslogtreecommitdiff
path: root/drivers/mxc
diff options
context:
space:
mode:
authorLoren HUANG <b02279@freescale.com>2013-05-22 17:21:30 +0800
committerLoren HUANG <b02279@freescale.com>2013-05-27 11:22:27 +0800
commit9e5e9b61f2b0df290da2d9c5bd2a1af53d1d18a5 (patch)
treea48474ca4f7b17312208998c525d9c56f2dd48e0 /drivers/mxc
parent1e4a59e4c462f2222d311773067670e6fcaa1df7 (diff)
ENGR00264275 [GPU]Correct suspend/resume calling after adding runtime pm.
After enabling runtime pm the suspend/resume entry is changed. -Add new entry for suspend/resume in runtime pm frame work. -Add static define for all runtime pm function. Cherry-pick from 3.5.7 kernel branch. Signed-off-by: Loren HUANG <b02279@freescale.com> Acked-by: Lily Zhang
Diffstat (limited to 'drivers/mxc')
-rw-r--r--drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c
index 963527f6cec4..985a7da88f1b 100644
--- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c
+++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c
@@ -1241,20 +1241,32 @@ static const struct of_device_id mxs_gpu_dt_ids[] = {
MODULE_DEVICE_TABLE(of, mxs_gpu_dt_ids);
#ifdef CONFIG_PM
-int gpu_runtime_suspend(struct device *dev)
+static int gpu_runtime_suspend(struct device *dev)
{
release_bus_freq(BUS_FREQ_HIGH);
return 0;
}
-int gpu_runtime_resume(struct device *dev)
+static int gpu_runtime_resume(struct device *dev)
{
request_bus_freq(BUS_FREQ_HIGH);
return 0;
}
+static int gpu_system_suspend(struct device *dev)
+{
+ pm_message_t state={0};
+ return gpu_suspend(to_platform_device(dev), state);
+}
+
+static int gpu_system_resume(struct device *dev)
+{
+ return gpu_resume(to_platform_device(dev));
+}
+
static const struct dev_pm_ops gpu_pm_ops = {
SET_RUNTIME_PM_OPS(gpu_runtime_suspend, gpu_runtime_resume, NULL)
+ SET_SYSTEM_SLEEP_PM_OPS(gpu_system_suspend, gpu_system_resume)
};
#endif
#endif