diff options
author | Li Li <lli5@nvidia.com> | 2014-04-17 14:29:00 -0700 |
---|---|---|
committer | Riham Haidar <rhaidar@nvidia.com> | 2014-05-16 12:01:40 -0700 |
commit | b3603d6d319edd2a1fa6505f4dca93e537106166 (patch) | |
tree | b4a69f9187288ac90c949ccd4160afcbbff855a3 /drivers | |
parent | d5a616d0b3bdc1f9eb36811cf51e348880c76047 (diff) |
input: cfboost: Add EMC boost
Change-Id: Id9b7ea216b8c93e291cc95d7522ba21d15701eeb
Reviewed-on: http://git-master/r/397838
Signed-off-by: Donghan Ryu <dryu@nvidia.com>
Reviewed-on: http://git-master/r/402485
Reviewed-by: Riham Haidar <rhaidar@nvidia.com>
Tested-by: Riham Haidar <rhaidar@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/input-cfboost.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/input/input-cfboost.c b/drivers/input/input-cfboost.c index d38bb956f073..f71d680f6471 100644 --- a/drivers/input/input-cfboost.c +++ b/drivers/input/input-cfboost.c @@ -46,7 +46,7 @@ MODULE_DESCRIPTION("Input event CPU frequency booster"); MODULE_LICENSE("GPL v2"); -static struct pm_qos_request freq_req, core_req; +static struct pm_qos_request freq_req, core_req, emc_req; static struct dev_pm_qos_request gpu_wakeup_req; static unsigned int boost_freq; /* kHz */ static int boost_freq_set(const char *arg, const struct kernel_param *kp) @@ -67,6 +67,8 @@ static struct kernel_param_ops boost_freq_ops = { .get = boost_freq_get, }; module_param_cb(boost_freq, &boost_freq_ops, &boost_freq, 0644); +static unsigned int boost_emc = 924000; /* kHz */ +module_param(boost_emc, uint, 0644); static unsigned long boost_time = 500; /* ms */ module_param(boost_time, ulong, 0644); static bool gpu_wakeup = 1; /* 1 = enabled */ @@ -107,13 +109,18 @@ EXPORT_SYMBOL(cfb_remove_device); static void cfb_boost(struct kthread_work *w) { - trace_input_cfboost_params("boost_params", boost_freq, boost_time); + trace_input_cfboost_params("boost_params", boost_freq, boost_emc, + boost_time); pm_qos_update_request_timeout(&core_req, 1, boost_time * 1000); if (boost_freq > 0) pm_qos_update_request_timeout(&freq_req, boost_freq, boost_time * 1000); + if (boost_emc > 0) + pm_qos_update_request_timeout(&emc_req, boost_emc, + boost_time * 1000); + if (gpu_wakeup && gpu_device) { dev_pm_qos_update_request_timeout(&gpu_wakeup_req, PM_QOS_FLAG_NO_POWER_OFF, boost_time); @@ -291,6 +298,8 @@ static int __init cfboost_init(void) PM_QOS_DEFAULT_VALUE); pm_qos_add_request(&freq_req, PM_QOS_CPU_FREQ_MIN, PM_QOS_DEFAULT_VALUE); + pm_qos_add_request(&emc_req, PM_QOS_EMC_FREQ_MIN, + PM_QOS_DEFAULT_VALUE); return 0; } @@ -300,6 +309,7 @@ static void __exit cfboost_exit(void) /* stop input events */ input_unregister_handler(&cfb_input_handler); kthread_stop(boost_kthread); + pm_qos_remove_request(&emc_req); pm_qos_remove_request(&freq_req); pm_qos_remove_request(&core_req); } |