summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-wandboard-3.0.35/0005-ENGR00264275-GPU-Correct-suspend-resume-calling-afte.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-wandboard-3.0.35/0005-ENGR00264275-GPU-Correct-suspend-resume-calling-afte.patch')
-rw-r--r--recipes-kernel/linux/linux-wandboard-3.0.35/0005-ENGR00264275-GPU-Correct-suspend-resume-calling-afte.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-wandboard-3.0.35/0005-ENGR00264275-GPU-Correct-suspend-resume-calling-afte.patch b/recipes-kernel/linux/linux-wandboard-3.0.35/0005-ENGR00264275-GPU-Correct-suspend-resume-calling-afte.patch
new file mode 100644
index 0000000..fa937e4
--- /dev/null
+++ b/recipes-kernel/linux/linux-wandboard-3.0.35/0005-ENGR00264275-GPU-Correct-suspend-resume-calling-afte.patch
@@ -0,0 +1,61 @@
1From a845abe4589366d3e37b5a646be6337984074b28 Mon Sep 17 00:00:00 2001
2From: Loren HUANG <b02279@freescale.com>
3Date: Wed, 22 May 2013 17:21:30 +0800
4Subject: [PATCH 5/6] ENGR00264275 [GPU]Correct suspend/resume calling after
5 adding runtime pm.
6
7After enabling runtime pm the suspend/resume entry is changed.
8
9-Add new entry for suspend/resume in runtime pm frame work.
10-Add static define for all runtime pm function.
11
12Upstream-Status: Backport [3.5.7-1.0.0]
13
14Signed-off-by: Loren HUANG <b02279@freescale.com>
15Acked-by: Lily Zhang
16---
17 .../gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c | 16 ++++++++++++++--
18 1 file changed, 14 insertions(+), 2 deletions(-)
19
20diff --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
21index 183000d..3632a6c 100644
22--- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c
23+++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c
24@@ -1252,20 +1252,32 @@ static const struct of_device_id mxs_gpu_dt_ids[] = {
25 MODULE_DEVICE_TABLE(of, mxs_gpu_dt_ids);
26
27 #ifdef CONFIG_PM
28-int gpu_runtime_suspend(struct device *dev)
29+static int gpu_runtime_suspend(struct device *dev)
30 {
31 release_bus_freq(BUS_FREQ_HIGH);
32 return 0;
33 }
34
35-int gpu_runtime_resume(struct device *dev)
36+static int gpu_runtime_resume(struct device *dev)
37 {
38 request_bus_freq(BUS_FREQ_HIGH);
39 return 0;
40 }
41
42+static int gpu_system_suspend(struct device *dev)
43+{
44+ pm_message_t state={0};
45+ return gpu_suspend(to_platform_device(dev), state);
46+}
47+
48+static int gpu_system_resume(struct device *dev)
49+{
50+ return gpu_resume(to_platform_device(dev));
51+}
52+
53 static const struct dev_pm_ops gpu_pm_ops = {
54 SET_RUNTIME_PM_OPS(gpu_runtime_suspend, gpu_runtime_resume, NULL)
55+ SET_SYSTEM_SLEEP_PM_OPS(gpu_system_suspend, gpu_system_resume)
56 };
57 #endif
58 #endif
59--
601.8.3.2
61