diff options
-rw-r--r-- | drivers/input/input-cfboost.c | 14 | ||||
-rw-r--r-- | include/trace/events/input_cfboost.h | 11 |
2 files changed, 19 insertions, 6 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); } diff --git a/include/trace/events/input_cfboost.h b/include/trace/events/input_cfboost.h index 40bb39add3b4..ddc3b678f003 100644 --- a/include/trace/events/input_cfboost.h +++ b/include/trace/events/input_cfboost.h @@ -24,20 +24,23 @@ #include <linux/tracepoint.h> TRACE_EVENT(input_cfboost_params, - TP_PROTO(const char *name, unsigned int freq, unsigned long time), - TP_ARGS(name, freq, time), + TP_PROTO(const char *name, unsigned int freq, unsigned int emc, + unsigned long time), + TP_ARGS(name, freq, emc, time), TP_STRUCT__entry( __field(const char *, name) __field(unsigned int, freq) + __field(unsigned int, emc) __field(unsigned long, time) ), TP_fast_assign( __entry->name = name; __entry->freq = freq; + __entry->emc = emc; __entry->time = time; ), - TP_printk("name=%s freq=%u time=%lu", - __entry->name, __entry->freq, __entry->time) + TP_printk("name=%s freq=%u emc=%u time=%lu", + __entry->name, __entry->freq, __entry->emc, __entry->time) ); TRACE_EVENT(input_cfboost_event, |