]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
input: cfboost: Explicitly turn on the GPU
authorArto Merilainen <amerilainen@nvidia.com>
Wed, 30 Apr 2014 07:54:58 +0000 (10:54 +0300)
committerMandar Padmawar <mpadmawar@nvidia.com>
Mon, 12 May 2014 07:10:24 +0000 (00:10 -0700)
Currently we inform the QoS that the GPU should be powered, however,
we need to also restore the state of the GPU. This patch adds explicit
pm_runtime_get/put_autosuspend() calls to ensure that the GPU is really
initialised immediately.

Bug 1506585

Change-Id: I1f08ca072f4a7ef038bb4e8e12323846480c6a12
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/403770
(cherry-picked from commit 22665ef35d4d70dda8763d83ad866bc4b145fd11)
Reviewed-on: http://git-master/r/405231
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
drivers/input/input-cfboost.c

index 024b5216c6aa99a6c50feb7b8c95f3ceba969294..c5596193a00154e23188223f9987249477d7342d 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/input.h>
 #include <linux/module.h>
 #include <linux/pm_qos.h>
+#include <linux/pm_runtime.h>
 #include <linux/sched/rt.h>
 
 #define CREATE_TRACE_POINTS
@@ -111,9 +112,12 @@ static void cfb_boost(struct kthread_work *w)
                pm_qos_update_request_timeout(&freq_req, boost_freq,
                                boost_time * 1000);
 
-       if (gpu_wakeup && gpu_device)
+       if (gpu_wakeup && gpu_device) {
                dev_pm_qos_update_request_timeout(&gpu_wakeup_req,
                                PM_QOS_FLAG_NO_POWER_OFF, boost_time);
+               pm_runtime_get(gpu_device);
+               pm_runtime_put_autosuspend(gpu_device);
+       }
 }
 
 static struct task_struct *boost_kthread;