From: Jongpill Lee Date: Wed, 11 Jul 2012 07:54:26 +0000 (+0900) Subject: PM QoS: add a PM_QOS_DEVICE_THROUGHPUT class X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d080327742d1556116713556b0475d2b12166839;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git PM QoS: add a PM_QOS_DEVICE_THROUGHPUT class This patch adds PM_QOS_DEVICE_THROUGHPUT class Signed-off-by: Jongpill Lee Conflicts: include/linux/pm_qos.h kernel/power/qos.c Change-Id: Iad14795bdb3fc2d1f1f1d305756dda5fa33b79d4 Signed-off-by: Sungjinn Chung --- diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h index 2a3acf4dba9a..19fc8521b23a 100644 --- a/include/linux/pm_qos.h +++ b/include/linux/pm_qos.h @@ -14,6 +14,7 @@ enum { PM_QOS_RESERVED = 0, PM_QOS_CPU_DMA_LATENCY, PM_QOS_NETWORK_LATENCY, + PM_QOS_DEVICE_THROUGHPUT, PM_QOS_NETWORK_THROUGHPUT, PM_QOS_MEMORY_BANDWIDTH, @@ -32,6 +33,7 @@ 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_NETWORK_THROUGHPUT_DEFAULT_VALUE 0 #define PM_QOS_MEMORY_BANDWIDTH_DEFAULT_VALUE 0 #define PM_QOS_RESUME_LATENCY_DEFAULT_VALUE 0 diff --git a/kernel/power/qos.c b/kernel/power/qos.c index 97b0df71303e..3a805d6c98f8 100644 --- a/kernel/power/qos.c +++ b/kernel/power/qos.c @@ -92,6 +92,19 @@ static struct pm_qos_object network_lat_pm_qos = { }; +static BLOCKING_NOTIFIER_HEAD(device_throughput_notifier); +static struct pm_qos_constraints device_tput_constraints = { + .list = PLIST_HEAD_INIT(device_tput_constraints.list), + .target_value = PM_QOS_DEVICE_THROUGHPUT_DEFAULT_VALUE, + .default_value = PM_QOS_DEVICE_THROUGHPUT_DEFAULT_VALUE, + .type = PM_QOS_MAX, + .notifiers = &device_throughput_notifier, +}; +static struct pm_qos_object device_throughput_pm_qos = { + .constraints = &device_tput_constraints, + .name = "device_throughput", +}; + static BLOCKING_NOTIFIER_HEAD(network_throughput_notifier); static struct pm_qos_constraints network_tput_constraints = { .list = PLIST_HEAD_INIT(network_tput_constraints.list), @@ -126,6 +139,7 @@ static struct pm_qos_object *pm_qos_array[] = { &null_pm_qos, &cpu_dma_pm_qos, &network_lat_pm_qos, + &device_throughput_pm_qos, &network_throughput_pm_qos, &memory_bandwidth_pm_qos, };