PM Qos: add display class and cam class to control qos
authorSangkyu Kim <skwith.kim@samsung.com>
Thu, 12 Sep 2013 04:49:45 +0000 (13:49 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:08:58 +0000 (17:08 +0900)
Change-Id: I7467993168c62e3ae215c43800ebf95559b5e8f8
Signed-off-by: Sangkyu Kim <skwith.kim@samsung.com>
include/linux/pm_qos.h
kernel/power/qos.c

index 2b6db0abe70a4585ea2ca52937c926d26680286a..b4ece3c86581297e0108a0da8c2a48ed85781242 100644 (file)
@@ -18,6 +18,8 @@ enum {
        PM_QOS_BUS_THROUGHPUT,
        PM_QOS_NETWORK_THROUGHPUT,
        PM_QOS_MEMORY_BANDWIDTH,
+       PM_QOS_DISPLAY_THROUGHPUT,
+       PM_QOS_CAM_THROUGHPUT,
 
        /* insert new class ID */
        PM_QOS_NUM_CLASSES,
@@ -36,6 +38,8 @@ enum pm_qos_flags_status {
 #define PM_QOS_NETWORK_LAT_DEFAULT_VALUE       (2000 * USEC_PER_SEC)
 #define PM_QOS_DEVICE_THROUGHPUT_DEFAULT_VALUE 0
 #define PM_QOS_BUS_THROUGHPUT_DEFAULT_VALUE    0
+#define PM_QOS_DISPLAY_THROUGHPUT_DEFAULT_VALUE        0
+#define PM_QOS_CAM_THROUGHPUT_DEFAULT_VALUE    0
 #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 b5c010b6db50ce1bce3f109debc6dbdf0fabde36..555709dd8198486112446257006bbb00fc2de5a3 100644 (file)
@@ -148,6 +148,33 @@ static struct pm_qos_object memory_bandwidth_pm_qos = {
 };
 
 
+static BLOCKING_NOTIFIER_HEAD(display_throughput_notifier);
+static struct pm_qos_constraints display_tput_constraints = {
+       .list = PLIST_HEAD_INIT(display_tput_constraints.list),
+       .target_value = PM_QOS_DISPLAY_THROUGHPUT_DEFAULT_VALUE,
+       .default_value = PM_QOS_DISPLAY_THROUGHPUT_DEFAULT_VALUE,
+       .type = PM_QOS_MAX,
+       .notifiers = &display_throughput_notifier,
+};
+static struct pm_qos_object display_throughput_pm_qos = {
+       .constraints = &display_tput_constraints,
+       .name = "display_throughput",
+};
+
+static BLOCKING_NOTIFIER_HEAD(cam_throughput_notifier);
+static struct pm_qos_constraints cam_tput_constraints = {
+       .list = PLIST_HEAD_INIT(cam_tput_constraints.list),
+       .target_value = PM_QOS_CAM_THROUGHPUT_DEFAULT_VALUE,
+       .default_value = PM_QOS_CAM_THROUGHPUT_DEFAULT_VALUE,
+       .type = PM_QOS_MAX,
+       .notifiers = &cam_throughput_notifier,
+};
+static struct pm_qos_object cam_throughput_pm_qos = {
+       .constraints = &cam_tput_constraints,
+       .name = "cam_throughput",
+};
+
+
 static struct pm_qos_object *pm_qos_array[] = {
        &null_pm_qos,
        &cpu_dma_pm_qos,
@@ -156,6 +183,8 @@ static struct pm_qos_object *pm_qos_array[] = {
        &bus_throughput_pm_qos,
        &network_throughput_pm_qos,
        &memory_bandwidth_pm_qos,
+       &display_throughput_pm_qos,
+       &cam_throughput_pm_qos,
 };
 
 static ssize_t pm_qos_power_write(struct file *filp, const char __user *buf,