diff options
author | Antti P Miettinen <amiettinen@nvidia.com> | 2011-12-27 12:28:21 +0200 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2012-01-19 16:16:42 -0800 |
commit | 3dc66d7569cc6065bd1be8f58fae195a5c7451f4 (patch) | |
tree | 016528adadd551db8293bf57c8128ffd9fec0378 /kernel | |
parent | de61a4105470839963926316a3c64f33222d924d (diff) |
PM QoS: Add CPU frequency min/max as PM QoS params
Add minimum and maximum CPU frequency as PM QoS parameters.
Bug 888312
Change-Id: I18abddded35a044a6ad8365035e31d1a2213a329
Reviewed-on: http://git-master/r/72206
Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/75883
Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/pm_qos_params.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/kernel/pm_qos_params.c b/kernel/pm_qos_params.c index 06e74202a8b9..f798df9b2b0d 100644 --- a/kernel/pm_qos_params.c +++ b/kernel/pm_qos_params.c @@ -114,12 +114,36 @@ static struct pm_qos_object max_online_cpus_pm_qos = { }; +static BLOCKING_NOTIFIER_HEAD(cpu_freq_min_notifier); +static struct pm_qos_object cpu_freq_min_pm_qos = { + .requests = PLIST_HEAD_INIT(cpu_freq_min_pm_qos.requests, pm_qos_lock), + .notifiers = &cpu_freq_min_notifier, + .name = "cpu_freq_min", + .target_value = PM_QOS_CPU_FREQ_MIN_DEFAULT_VALUE, + .default_value = PM_QOS_CPU_FREQ_MIN_DEFAULT_VALUE, + .type = PM_QOS_MAX, +}; + + +static BLOCKING_NOTIFIER_HEAD(cpu_freq_max_notifier); +static struct pm_qos_object cpu_freq_max_pm_qos = { + .requests = PLIST_HEAD_INIT(cpu_freq_max_pm_qos.requests, pm_qos_lock), + .notifiers = &cpu_freq_max_notifier, + .name = "cpu_freq_max", + .target_value = PM_QOS_CPU_FREQ_MAX_DEFAULT_VALUE, + .default_value = PM_QOS_CPU_FREQ_MAX_DEFAULT_VALUE, + .type = PM_QOS_MIN, +}; + + static struct pm_qos_object *pm_qos_array[] = { &null_pm_qos, &cpu_dma_pm_qos, &network_lat_pm_qos, &network_throughput_pm_qos, - &max_online_cpus_pm_qos + &max_online_cpus_pm_qos, + &cpu_freq_min_pm_qos, + &cpu_freq_max_pm_qos }; static ssize_t pm_qos_power_write(struct file *filp, const char __user *buf, |