From 17a0a90d8bf9461b10a22dd5908f1dcdaf66e2d1 Mon Sep 17 00:00:00 2001 From: Jaejoon Yoo Date: Tue, 5 Jul 2016 12:54:10 +0900 Subject: [PATCH] [COMMON] power: qos: added intcam qos handle for devfreq intcam dvfs domain is added first in 8895. I added new pm qos handle for intcam domain to be able to manage frequencies requested from the domain. Change-Id: Id40afe1001e1ef603ee9629496871d72545476b6 Signed-off-by: Jaejoon Yoo --- include/linux/pm_qos.h | 4 ++++ kernel/power/qos.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h index 289e71669058..032d4d824ee5 100644 --- a/include/linux/pm_qos.h +++ b/include/linux/pm_qos.h @@ -15,8 +15,10 @@ enum { PM_QOS_CPU_DMA_LATENCY, PM_QOS_NETWORK_LATENCY, PM_QOS_DEVICE_THROUGHPUT, + PM_QOS_INTCAM_THROUGHPUT, #ifdef CONFIG_ARM_EXYNOS_DEVFREQ_DEBUG PM_QOS_DEVICE_THROUGHPUT_MAX, + PM_QOS_INTCAM_THROUGHPUT_MAX, #endif PM_QOS_BUS_THROUGHPUT, PM_QOS_BUS_THROUGHPUT_MAX, @@ -47,8 +49,10 @@ enum pm_qos_flags_status { #define PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) #define PM_QOS_NETWORK_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) #define PM_QOS_DEVICE_THROUGHPUT_DEFAULT_VALUE 0 +#define PM_QOS_INTCAM_THROUGHPUT_DEFAULT_VALUE 0 #ifdef CONFIG_ARM_EXYNOS_DEVFREQ_DEBUG #define PM_QOS_DEVICE_THROUGHPUT_MAX_DEFAULT_VALUE INT_MAX +#define PM_QOS_INTCAM_THROUGHPUT_MAX_DEFAULT_VALUE INT_MAX #endif #define PM_QOS_BUS_THROUGHPUT_DEFAULT_VALUE 0 #define PM_QOS_BUS_THROUGHPUT_MAX_DEFAULT_VALUE INT_MAX diff --git a/kernel/power/qos.c b/kernel/power/qos.c index 0863d732ba18..0135a63515b8 100644 --- a/kernel/power/qos.c +++ b/kernel/power/qos.c @@ -120,6 +120,34 @@ static struct pm_qos_object device_throughput_max_pm_qos = { }; #endif +static BLOCKING_NOTIFIER_HEAD(intcam_throughput_notifier); +static struct pm_qos_constraints intcam_tput_constraints = { + .list = PLIST_HEAD_INIT(intcam_tput_constraints.list), + .target_value = PM_QOS_INTCAM_THROUGHPUT_DEFAULT_VALUE, + .default_value = PM_QOS_INTCAM_THROUGHPUT_DEFAULT_VALUE, + .type = PM_QOS_FORCE_MAX, + .notifiers = &intcam_throughput_notifier, +}; +static struct pm_qos_object intcam_throughput_pm_qos = { + .constraints = &intcam_tput_constraints, + .name = "intcam_throughput", +}; + +#ifdef CONFIG_ARM_EXYNOS_DEVFREQ_DEBUG +static BLOCKING_NOTIFIER_HEAD(intcam_throughput_max_notifier); +static struct pm_qos_constraints intcam_tput_max_constraints = { + .list = PLIST_HEAD_INIT(intcam_tput_max_constraints.list), + .target_value = PM_QOS_INTCAM_THROUGHPUT_MAX_DEFAULT_VALUE, + .default_value = PM_QOS_INTCAM_THROUGHPUT_MAX_DEFAULT_VALUE, + .type = PM_QOS_MIN, + .notifiers = &intcam_throughput_max_notifier, +}; +static struct pm_qos_object intcam_throughput_max_pm_qos = { + .constraints = &intcam_tput_max_constraints, + .name = "intcam_throughput_max", +}; +#endif + static BLOCKING_NOTIFIER_HEAD(bus_throughput_notifier); static struct pm_qos_constraints bus_tput_constraints = { .list = PLIST_HEAD_INIT(bus_tput_constraints.list), @@ -237,8 +265,10 @@ static struct pm_qos_object *pm_qos_array[] = { &cpu_dma_pm_qos, &network_lat_pm_qos, &device_throughput_pm_qos, + &intcam_throughput_pm_qos, #ifdef CONFIG_ARM_EXYNOS_DEVFREQ_DEBUG &device_throughput_max_pm_qos, + &intcam_throughput_max_pm_qos, #endif &bus_throughput_pm_qos, &bus_throughput_max_pm_qos, -- 2.20.1