[COMMON] power: qos: Add new qos class for devfreq
authorSoomin Kim <sm8326.kim@samsung.com>
Mon, 22 May 2017 05:35:58 +0000 (14:35 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:09:03 +0000 (17:09 +0900)
Change-Id: I16d41ed16242fe4abc8c11301af5ca41eaa13ef8
Signed-off-by: Soomin Kim <sm8326.kim@samsung.com>
include/linux/pm_qos.h
kernel/power/qos.c

index 032d4d824ee5a4bde3859387fe21595717545080..7b2919afe017200ab413f0cf9c60ea56677e5f9f 100644 (file)
@@ -29,10 +29,17 @@ enum {
        PM_QOS_DISPLAY_THROUGHPUT_MAX,
 #endif
        PM_QOS_CAM_THROUGHPUT,
+       PM_QOS_AUD_THROUGHPUT,
+       PM_QOS_IVA_THROUGHPUT,
+       PM_QOS_SCORE_THROUGHPUT,
+       PM_QOS_FSYS0_THROUGHPUT,
 #ifdef CONFIG_ARM_EXYNOS_DEVFREQ_DEBUG
        PM_QOS_CAM_THROUGHPUT_MAX,
+       PM_QOS_AUD_THROUGHPUT_MAX,
+       PM_QOS_IVA_THROUGHPUT_MAX,
+       PM_QOS_SCORE_THROUGHPUT_MAX,
+       PM_QOS_FSYS0_THROUGHPUT_MAX,
 #endif
-
        /* insert new class ID */
        PM_QOS_NUM_CLASSES,
 };
@@ -61,8 +68,16 @@ enum pm_qos_flags_status {
 #define PM_QOS_DISPLAY_THROUGHPUT_MAX_DEFAULT_VALUE    INT_MAX
 #endif
 #define PM_QOS_CAM_THROUGHPUT_DEFAULT_VALUE    0
+#define PM_QOS_AUD_THROUGHPUT_DEFAULT_VALUE    0
+#define PM_QOS_IVA_THROUGHPUT_DEFAULT_VALUE    0
+#define PM_QOS_SCORE_THROUGHPUT_DEFAULT_VALUE  0
+#define PM_QOS_FSYS0_THROUGHPUT_DEFAULT_VALUE  0
 #ifdef CONFIG_ARM_EXYNOS_DEVFREQ_DEBUG
-#define PM_QOS_CAM_THROUGHPUT_MAX_DEFAULT_VALUE        INT_MAX
+#define PM_QOS_CAM_THROUGHPUT_MAX_DEFAULT_VALUE                INT_MAX
+#define PM_QOS_AUD_THROUGHPUT_MAX_DEFAULT_VALUE                INT_MAX
+#define PM_QOS_IVA_THROUGHPUT_MAX_DEFAULT_VALUE                INT_MAX
+#define PM_QOS_SCORE_THROUGHPUT_MAX_DEFAULT_VALUE      INT_MAX
+#define PM_QOS_FSYS0_THROUGHPUT_MAX_DEFAULT_VALUE      INT_MAX
 #endif
 #define PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE        0
 #define PM_QOS_MEMORY_BANDWIDTH_DEFAULT_VALUE  0
index 0135a63515b89f193556d8a06b9db5dd15aa3212..c63e1c5ee1a55128d7058c6c6b09a65b61ce2f83 100644 (file)
@@ -245,6 +245,58 @@ static struct pm_qos_object cam_throughput_pm_qos = {
        .name = "cam_throughput",
 };
 
+static BLOCKING_NOTIFIER_HEAD(aud_throughput_notifier);
+static struct pm_qos_constraints aud_tput_constraints = {
+       .list = PLIST_HEAD_INIT(aud_tput_constraints.list),
+       .target_value = PM_QOS_AUD_THROUGHPUT_DEFAULT_VALUE,
+       .default_value = PM_QOS_AUD_THROUGHPUT_DEFAULT_VALUE,
+       .type = PM_QOS_MAX,
+       .notifiers = &aud_throughput_notifier,
+};
+static struct pm_qos_object aud_throughput_pm_qos = {
+       .constraints = &aud_tput_constraints,
+       .name = "aud_throughput",
+};
+
+static BLOCKING_NOTIFIER_HEAD(iva_throughput_notifier);
+static struct pm_qos_constraints iva_tput_constraints = {
+       .list = PLIST_HEAD_INIT(iva_tput_constraints.list),
+       .target_value = PM_QOS_IVA_THROUGHPUT_DEFAULT_VALUE,
+       .default_value = PM_QOS_IVA_THROUGHPUT_DEFAULT_VALUE,
+       .type = PM_QOS_MAX,
+       .notifiers = &iva_throughput_notifier,
+};
+static struct pm_qos_object iva_throughput_pm_qos = {
+       .constraints = &iva_tput_constraints,
+       .name = "iva_throughput",
+};
+
+static BLOCKING_NOTIFIER_HEAD(score_throughput_notifier);
+static struct pm_qos_constraints score_tput_constraints = {
+       .list = PLIST_HEAD_INIT(score_tput_constraints.list),
+       .target_value = PM_QOS_SCORE_THROUGHPUT_DEFAULT_VALUE,
+       .default_value = PM_QOS_SCORE_THROUGHPUT_DEFAULT_VALUE,
+       .type = PM_QOS_MAX,
+       .notifiers = &score_throughput_notifier,
+};
+static struct pm_qos_object score_throughput_pm_qos = {
+       .constraints = &score_tput_constraints,
+       .name = "score_throughput",
+};
+
+static BLOCKING_NOTIFIER_HEAD(fsys0_throughput_notifier);
+static struct pm_qos_constraints fsys0_tput_constraints = {
+       .list = PLIST_HEAD_INIT(fsys0_tput_constraints.list),
+       .target_value = PM_QOS_FSYS0_THROUGHPUT_DEFAULT_VALUE,
+       .default_value = PM_QOS_FSYS0_THROUGHPUT_DEFAULT_VALUE,
+       .type = PM_QOS_MAX,
+       .notifiers = &fsys0_throughput_notifier,
+};
+static struct pm_qos_object fsys0_throughput_pm_qos = {
+       .constraints = &fsys0_tput_constraints,
+       .name = "fsys0_throughput",
+};
+
 #ifdef CONFIG_ARM_EXYNOS_DEVFREQ_DEBUG
 static BLOCKING_NOTIFIER_HEAD(cam_throughput_max_notifier);
 static struct pm_qos_constraints cam_tput_max_constraints = {
@@ -258,6 +310,58 @@ static struct pm_qos_object cam_throughput_max_pm_qos = {
        .constraints = &cam_tput_max_constraints,
        .name = "cam_throughput_max",
 };
+
+static BLOCKING_NOTIFIER_HEAD(aud_throughput_max_notifier);
+static struct pm_qos_constraints aud_tput_max_constraints = {
+       .list = PLIST_HEAD_INIT(aud_tput_max_constraints.list),
+       .target_value = PM_QOS_AUD_THROUGHPUT_MAX_DEFAULT_VALUE,
+       .default_value = PM_QOS_AUD_THROUGHPUT_MAX_DEFAULT_VALUE,
+       .type = PM_QOS_MIN,
+       .notifiers = &aud_throughput_max_notifier,
+};
+static struct pm_qos_object aud_throughput_max_pm_qos = {
+       .constraints = &aud_tput_max_constraints,
+       .name = "aud_throughput_max",
+};
+
+static BLOCKING_NOTIFIER_HEAD(iva_throughput_max_notifier);
+static struct pm_qos_constraints iva_tput_max_constraints = {
+       .list = PLIST_HEAD_INIT(iva_tput_max_constraints.list),
+       .target_value = PM_QOS_IVA_THROUGHPUT_MAX_DEFAULT_VALUE,
+       .default_value = PM_QOS_IVA_THROUGHPUT_MAX_DEFAULT_VALUE,
+       .type = PM_QOS_MIN,
+       .notifiers = &iva_throughput_max_notifier,
+};
+static struct pm_qos_object iva_throughput_max_pm_qos = {
+       .constraints = &iva_tput_max_constraints,
+       .name = "iva_throughput_max",
+};
+
+static BLOCKING_NOTIFIER_HEAD(score_throughput_max_notifier);
+static struct pm_qos_constraints score_tput_max_constraints = {
+       .list = PLIST_HEAD_INIT(score_tput_max_constraints.list),
+       .target_value = PM_QOS_SCORE_THROUGHPUT_MAX_DEFAULT_VALUE,
+       .default_value = PM_QOS_SCORE_THROUGHPUT_MAX_DEFAULT_VALUE,
+       .type = PM_QOS_MIN,
+       .notifiers = &score_throughput_max_notifier,
+};
+static struct pm_qos_object score_throughput_max_pm_qos = {
+       .constraints = &score_tput_max_constraints,
+       .name = "score_throughput_max",
+};
+
+static BLOCKING_NOTIFIER_HEAD(fsys0_throughput_max_notifier);
+static struct pm_qos_constraints fsys0_tput_max_constraints = {
+       .list = PLIST_HEAD_INIT(fsys0_tput_max_constraints.list),
+       .target_value = PM_QOS_FSYS0_THROUGHPUT_MAX_DEFAULT_VALUE,
+       .default_value = PM_QOS_FSYS0_THROUGHPUT_MAX_DEFAULT_VALUE,
+       .type = PM_QOS_MIN,
+       .notifiers = &fsys0_throughput_max_notifier,
+};
+static struct pm_qos_object fsys0_throughput_max_pm_qos = {
+       .constraints = &fsys0_tput_max_constraints,
+       .name = "fsys0_throughput_max",
+};
 #endif
 
 static struct pm_qos_object *pm_qos_array[] = {
@@ -279,8 +383,16 @@ static struct pm_qos_object *pm_qos_array[] = {
        &display_throughput_max_pm_qos,
 #endif
        &cam_throughput_pm_qos,
+       &aud_throughput_pm_qos,
+       &iva_throughput_pm_qos,
+       &score_throughput_pm_qos,
+       &fsys0_throughput_pm_qos,
 #ifdef CONFIG_ARM_EXYNOS_DEVFREQ_DEBUG
        &cam_throughput_max_pm_qos,
+       &aud_throughput_max_pm_qos,
+       &iva_throughput_max_pm_qos,
+       &score_throughput_max_pm_qos,
+       &fsys0_throughput_max_pm_qos,
 #endif
 };