[COMMON] qos: Add MFC related qos.
authorChungwoo Park <cww.park@samsung.com>
Tue, 29 May 2018 04:10:39 +0000 (13:10 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:22:23 +0000 (20:22 +0300)
Change-Id: I27921a0d40a7b99d818bd1ee4aae0dcb76f2ce30
Signed-off-by: Chungwoo Park <cww.park@samsung.com>
include/linux/pm_qos.h
kernel/power/qos.c

index e226d58d79e918ce207720484c56f02bb282b4cf..7b319df28abb2402e8fa2749983edb4eeeb263fd 100644 (file)
@@ -44,6 +44,8 @@ enum {
        PM_QOS_SCORE_THROUGHPUT_MAX,
        PM_QOS_FSYS0_THROUGHPUT_MAX,
 #endif
+       PM_QOS_MFC_THROUGHPUT,
+       PM_QOS_MFC_THROUGHPUT_MAX,
        /* insert new class ID */
        PM_QOS_NUM_CLASSES,
 };
@@ -84,6 +86,8 @@ enum pm_qos_flags_status {
 #define PM_QOS_SCORE_THROUGHPUT_MAX_DEFAULT_VALUE      INT_MAX
 #define PM_QOS_FSYS0_THROUGHPUT_MAX_DEFAULT_VALUE      INT_MAX
 #endif
+#define PM_QOS_MFC_THROUGHPUT_DEFAULT_VALUE    0
+#define PM_QOS_MFC_THROUGHPUT_MAX_DEFAULT_VALUE        INT_MAX
 
 #define PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE        0
 #define PM_QOS_MEMORY_BANDWIDTH_DEFAULT_VALUE  0
index 67905f33509e2f4d81a81e6d8bb2468d1b839e72..304159aadb24cd1f2bf375a041aedabe72c72a54 100644 (file)
@@ -436,6 +436,32 @@ static struct pm_qos_object fsys0_throughput_max_pm_qos = {
 };
 #endif
 
+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(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 struct pm_qos_object *pm_qos_array[] = {
        &null_pm_qos,
        &cpu_dma_pm_qos,
@@ -470,6 +496,8 @@ static struct pm_qos_object *pm_qos_array[] = {
        &score_throughput_max_pm_qos,
        &fsys0_throughput_max_pm_qos,
 #endif
+       &mfc_throughput_pm_qos,
+       &mfc_throughput_max_pm_qos,
 };
 
 static ssize_t pm_qos_power_write(struct file *filp, const char __user *buf,