summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2013-07-22 21:26:11 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-16 17:40:59 -0700
commit7bbccf97095392f73fa661290191e9cf57406529 (patch)
tree02af49bb97401c767bf8b814c85855793e922feb /kernel
parent485194b175a39aa658d9d695fdd64d430be237fb (diff)
PM QoS: Add GPU frequency limits to PM QoS
Added GPU frequency min/max as PM QoS classes. Bug 1330780 Change-Id: I2428c62748521c17e23b2df9ca409deda8b36160 Signed-off-by: Alex Frid <afrid@nvidia.com> Reviewed-on: http://git-master/r/267702 Reviewed-by: Ilan Aelion <iaelion@nvidia.com> Reviewed-by: Mitch Luban <mluban@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/power/qos.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/kernel/power/qos.c b/kernel/power/qos.c
index 15e108dde01b..1dcb9fd0a475 100644
--- a/kernel/power/qos.c
+++ b/kernel/power/qos.c
@@ -157,6 +157,31 @@ static struct pm_qos_object cpu_freq_max_pm_qos = {
.name = "cpu_freq_max",
};
+static BLOCKING_NOTIFIER_HEAD(gpu_freq_min_notifier);
+static struct pm_qos_constraints gpu_freq_min_constraints = {
+ .list = PLIST_HEAD_INIT(gpu_freq_min_constraints.list),
+ .target_value = PM_QOS_GPU_FREQ_MIN_DEFAULT_VALUE,
+ .default_value = PM_QOS_GPU_FREQ_MIN_DEFAULT_VALUE,
+ .type = PM_QOS_MAX,
+ .notifiers = &gpu_freq_min_notifier,
+};
+static struct pm_qos_object gpu_freq_min_pm_qos = {
+ .constraints = &gpu_freq_min_constraints,
+ .name = "gpu_freq_min",
+};
+
+static BLOCKING_NOTIFIER_HEAD(gpu_freq_max_notifier);
+static struct pm_qos_constraints gpu_freq_max_constraints = {
+ .list = PLIST_HEAD_INIT(gpu_freq_max_constraints.list),
+ .target_value = PM_QOS_GPU_FREQ_MAX_DEFAULT_VALUE,
+ .default_value = PM_QOS_GPU_FREQ_MAX_DEFAULT_VALUE,
+ .type = PM_QOS_MIN,
+ .notifiers = &gpu_freq_max_notifier,
+};
+static struct pm_qos_object gpu_freq_max_pm_qos = {
+ .constraints = &gpu_freq_max_constraints,
+ .name = "gpu_freq_max",
+};
static struct pm_qos_object *pm_qos_array[] = {
&null_pm_qos,
@@ -166,7 +191,9 @@ static struct pm_qos_object *pm_qos_array[] = {
&min_online_cpus_pm_qos,
&max_online_cpus_pm_qos,
&cpu_freq_min_pm_qos,
- &cpu_freq_max_pm_qos
+ &cpu_freq_max_pm_qos,
+ &gpu_freq_min_pm_qos,
+ &gpu_freq_max_pm_qos
};
static ssize_t pm_qos_power_write(struct file *filp, const char __user *buf,