]> 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)
committerTony Ly <tly@nvidia.com>
Thu, 1 May 2014 23:01:46 +0000 (16:01 -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
Reviewed-by: Jonathan Mccaffrey <jmccaffrey@nvidia.com>
Tested-by: Jonathan Mccaffrey <jmccaffrey@nvidia.com>
Reviewed-by: Peter Zu <pzu@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
drivers/input/input-cfboost.c

index a081ddb5f4ddb5930e6c7e92aa1b3ea0967881ac..74500361b9d5b8be742247a45220a67662250ba3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * drivers/input/input-cfboost.c
  *
- * Copyright (c) 2012-2013, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2012-2014, NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -24,6 +24,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
@@ -122,9 +123,12 @@ static void cfb_boost(struct kthread_work *w)
                pm_qos_update_request_timeout(&emc_req, boost_emc,
                                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;