[COMMON] qos: Add chip config and remove qos.
authorChungwoo Park <cww.park@samsung.com>
Wed, 23 May 2018 01:07:40 +0000 (10:07 +0900)
committerChungwoo Park <cww.park@samsung.com>
Wed, 23 May 2018 10:52:15 +0000 (19:52 +0900)
Change-Id: I50e34b350cb7642c13a12ce6d56769b75ecb15e1
Signed-off-by: Chungwoo Park <cww.park@samsung.com>
include/linux/pm_qos.h
kernel/power/qos.c

index 58b13450c60303493b5b71b89da0be54c5373c85..e226d58d79e918ce207720484c56f02bb282b4cf 100644 (file)
@@ -32,18 +32,18 @@ enum {
        PM_QOS_DISPLAY_THROUGHPUT_MAX,
        PM_QOS_CAM_THROUGHPUT,
        PM_QOS_AUD_THROUGHPUT,
+#ifdef CONFIG_SOC_EXYNOS9810
        PM_QOS_IVA_THROUGHPUT,
        PM_QOS_SCORE_THROUGHPUT,
        PM_QOS_FSYS0_THROUGHPUT,
+#endif
        PM_QOS_CAM_THROUGHPUT_MAX,
        PM_QOS_AUD_THROUGHPUT_MAX,
+#ifdef CONFIG_SOC_EXYNOS9810
        PM_QOS_IVA_THROUGHPUT_MAX,
        PM_QOS_SCORE_THROUGHPUT_MAX,
        PM_QOS_FSYS0_THROUGHPUT_MAX,
-       PM_QOS_MFC_THROUGHPUT,
-       PM_QOS_NPU_THROUGHPUT,
-       PM_QOS_MFC_THROUGHPUT_MAX,
-       PM_QOS_NPU_THROUGHPUT_MAX,
+#endif
        /* insert new class ID */
        PM_QOS_NUM_CLASSES,
 };
@@ -69,18 +69,22 @@ enum pm_qos_flags_status {
 #define PM_QOS_DISPLAY_THROUGHPUT_MAX_DEFAULT_VALUE    INT_MAX
 #define PM_QOS_CAM_THROUGHPUT_DEFAULT_VALUE    0
 #define PM_QOS_AUD_THROUGHPUT_DEFAULT_VALUE    0
+
+#ifdef CONFIG_SOC_EXYNOS9810
 #define PM_QOS_IVA_THROUGHPUT_DEFAULT_VALUE    0
 #define PM_QOS_SCORE_THROUGHPUT_DEFAULT_VALUE  0
 #define PM_QOS_FSYS0_THROUGHPUT_DEFAULT_VALUE  0
+#endif
+
 #define PM_QOS_CAM_THROUGHPUT_MAX_DEFAULT_VALUE                INT_MAX
 #define PM_QOS_AUD_THROUGHPUT_MAX_DEFAULT_VALUE                INT_MAX
+
+#ifdef CONFIG_SOC_EXYNOS9810
 #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
-#define PM_QOS_MFC_THROUGHPUT_DEFAULT_VALUE    0
-#define PM_QOS_NPU_THROUGHPUT_DEFAULT_VALUE    0
-#define PM_QOS_MFC_THROUGHPUT_MAX_DEFAULT_VALUE        INT_MAX
-#define PM_QOS_NPU_THROUGHPUT_MAX_DEFAULT_VALUE        INT_MAX
+#endif
+
 #define PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE        0
 #define PM_QOS_MEMORY_BANDWIDTH_DEFAULT_VALUE  0
 #define PM_QOS_RESUME_LATENCY_DEFAULT_VALUE    0
index ce0c6a4ba4e238d3bc587978835426e254663473..67905f33509e2f4d81a81e6d8bb2468d1b839e72 100644 (file)
@@ -328,6 +328,7 @@ static struct pm_qos_object aud_throughput_pm_qos = {
        .name = "aud_throughput",
 };
 
+#ifdef CONFIG_SOC_EXYNOS9810
 static BLOCKING_NOTIFIER_HEAD(iva_throughput_notifier);
 static struct pm_qos_constraints iva_tput_constraints = {
        .list = PLIST_HEAD_INIT(iva_tput_constraints.list),
@@ -366,6 +367,7 @@ static struct pm_qos_object fsys0_throughput_pm_qos = {
        .constraints = &fsys0_tput_constraints,
        .name = "fsys0_throughput",
 };
+#endif
 
 static BLOCKING_NOTIFIER_HEAD(cam_throughput_max_notifier);
 static struct pm_qos_constraints cam_tput_max_constraints = {
@@ -393,6 +395,7 @@ static struct pm_qos_object aud_throughput_max_pm_qos = {
        .name = "aud_throughput_max",
 };
 
+#ifdef CONFIG_SOC_EXYNOS9810
 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),
@@ -431,58 +434,7 @@ static struct pm_qos_object fsys0_throughput_max_pm_qos = {
        .constraints = &fsys0_tput_max_constraints,
        .name = "fsys0_throughput_max",
 };
-
-static BLOCKING_NOTIFIER_HEAD(mfc_throughput_notifier);
-static struct pm_qos_constraints mfc_tput_constraints = {
-       .list = PLIST_HEAD_INIT(mfc_tput_constraints.list),
-       .target_value = PM_QOS_MFC_THROUGHPUT_DEFAULT_VALUE,
-       .default_value = PM_QOS_MFC_THROUGHPUT_DEFAULT_VALUE,
-       .type = PM_QOS_MAX,
-       .notifiers = &mfc_throughput_notifier,
-};
-static struct pm_qos_object mfc_throughput_pm_qos = {
-       .constraints = &mfc_tput_constraints,
-       .name = "mfc_throughput",
-};
-
-static BLOCKING_NOTIFIER_HEAD(npu_throughput_notifier);
-static struct pm_qos_constraints npu_tput_constraints = {
-       .list = PLIST_HEAD_INIT(npu_tput_constraints.list),
-       .target_value = PM_QOS_NPU_THROUGHPUT_DEFAULT_VALUE,
-       .default_value = PM_QOS_NPU_THROUGHPUT_DEFAULT_VALUE,
-       .type = PM_QOS_MAX,
-       .notifiers = &npu_throughput_notifier,
-};
-static struct pm_qos_object npu_throughput_pm_qos = {
-       .constraints = &npu_tput_constraints,
-       .name = "npu_throughput",
-};
-
-static BLOCKING_NOTIFIER_HEAD(mfc_throughput_max_notifier);
-static struct pm_qos_constraints mfc_tput_max_constraints = {
-       .list = PLIST_HEAD_INIT(mfc_tput_max_constraints.list),
-       .target_value = PM_QOS_MFC_THROUGHPUT_MAX_DEFAULT_VALUE,
-       .default_value = PM_QOS_MFC_THROUGHPUT_MAX_DEFAULT_VALUE,
-       .type = PM_QOS_MIN,
-       .notifiers = &mfc_throughput_max_notifier,
-};
-static struct pm_qos_object mfc_throughput_max_pm_qos = {
-       .constraints = &mfc_tput_max_constraints,
-       .name = "mfc_throughput_max",
-};
-
-static BLOCKING_NOTIFIER_HEAD(npu_throughput_max_notifier);
-static struct pm_qos_constraints npu_tput_max_constraints = {
-       .list = PLIST_HEAD_INIT(npu_tput_max_constraints.list),
-       .target_value = PM_QOS_NPU_THROUGHPUT_MAX_DEFAULT_VALUE,
-       .default_value = PM_QOS_NPU_THROUGHPUT_MAX_DEFAULT_VALUE,
-       .type = PM_QOS_MIN,
-       .notifiers = &npu_throughput_max_notifier,
-};
-static struct pm_qos_object npu_throughput_max_pm_qos = {
-       .constraints = &npu_tput_max_constraints,
-       .name = "npu_throughput_max",
-};
+#endif
 
 static struct pm_qos_object *pm_qos_array[] = {
        &null_pm_qos,
@@ -506,18 +458,18 @@ static struct pm_qos_object *pm_qos_array[] = {
        &display_throughput_max_pm_qos,
        &cam_throughput_pm_qos,
        &aud_throughput_pm_qos,
+#ifdef CONFIG_SOC_EXYNOS9810
        &iva_throughput_pm_qos,
        &score_throughput_pm_qos,
        &fsys0_throughput_pm_qos,
+#endif
        &cam_throughput_max_pm_qos,
        &aud_throughput_max_pm_qos,
+#ifdef CONFIG_SOC_EXYNOS9810
        &iva_throughput_max_pm_qos,
        &score_throughput_max_pm_qos,
        &fsys0_throughput_max_pm_qos,
-       &mfc_throughput_pm_qos,
-       &npu_throughput_pm_qos,
-       &mfc_throughput_max_pm_qos,
-       &npu_throughput_max_pm_qos,
+#endif
 };
 
 static ssize_t pm_qos_power_write(struct file *filp, const char __user *buf,