[COMMON] power: qos: added intcam qos handle for devfreq
authorJaejoon Yoo <joonyj7.yoo@samsung.com>
Tue, 5 Jul 2016 03:54:10 +0000 (12:54 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:09:02 +0000 (17:09 +0900)
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 <joonyj7.yoo@samsung.com>
include/linux/pm_qos.h
kernel/power/qos.c

index 289e716690587ae317f9152a53cb6f68af155752..032d4d824ee5a4bde3859387fe21595717545080 100644 (file)
@@ -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
index 0863d732ba182f4f450d1c8a4fc8676f9aa380d4..0135a63515b89f193556d8a06b9db5dd15aa3212 100644 (file)
@@ -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,