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>
#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
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;