diff options
author | Divya Ponnusamy <pdivya@codeaurora.org> | 2016-02-16 14:43:45 +0530 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-25 16:03:10 -0700 |
commit | cc67609bc82afce64074f81bde45717d141d7c7c (patch) | |
tree | 3db21c8b9c5bfc020a137f71d1a2b95cd92fb466 /drivers/gpu/msm | |
parent | a8b7ebecfaf8784ce70bbd6e88b57bfb10fd4308 (diff) |
msm: kgsl: Add pm_qos_cpu_mask_latency to avoid L2PC on mask CPU
Add a l2pc-cpu-mask-latency in device tree. This latency
is used in kgsl_pwrctrl_update_l2pc() API to avoid L2PC
on masked CPUs by giving reduced latency value.
Change-Id: I0447977bce5ed5c09a863b03bb42b9428686a9f5
Signed-off-by: Divya Ponnusamy <pdivya@codeaurora.org>
Diffstat (limited to 'drivers/gpu/msm')
-rw-r--r-- | drivers/gpu/msm/adreno.c | 5 | ||||
-rw-r--r-- | drivers/gpu/msm/kgsl_pwrctrl.c | 10 | ||||
-rw-r--r-- | drivers/gpu/msm/kgsl_pwrctrl.h | 2 |
3 files changed, 8 insertions, 9 deletions
diff --git a/drivers/gpu/msm/adreno.c b/drivers/gpu/msm/adreno.c index 9c56d8c9c180..79e95ebb8363 100644 --- a/drivers/gpu/msm/adreno.c +++ b/drivers/gpu/msm/adreno.c @@ -833,6 +833,11 @@ static int adreno_of_get_power(struct adreno_device *adreno_dev, &device->pwrctrl.pm_qos_active_latency)) device->pwrctrl.pm_qos_active_latency = 501; + /* get pm-qos-cpu-mask-latency, set it to default if not found */ + if (of_property_read_u32(node, "qcom,l2pc-cpu-mask-latency", + &device->pwrctrl.pm_qos_cpu_mask_latency)) + device->pwrctrl.pm_qos_cpu_mask_latency = 501; + /* get pm-qos-wakeup-latency, set it to default if not found */ if (of_property_read_u32(node, "qcom,pm-qos-wakeup-latency", &device->pwrctrl.pm_qos_wakeup_latency)) diff --git a/drivers/gpu/msm/kgsl_pwrctrl.c b/drivers/gpu/msm/kgsl_pwrctrl.c index 0d61c02ce2f1..d58645764c55 100644 --- a/drivers/gpu/msm/kgsl_pwrctrl.c +++ b/drivers/gpu/msm/kgsl_pwrctrl.c @@ -498,7 +498,7 @@ void kgsl_pwrctrl_update_l2pc(struct kgsl_device *device) if ((1 << cpu) & device->pwrctrl.l2pc_cpus_mask) { pm_qos_update_request_timeout( &device->pwrctrl.l2pc_cpus_qos, - device->pwrctrl.pm_qos_active_latency, + device->pwrctrl.pm_qos_cpu_mask_latency, KGSL_L2PC_CPU_TIMEOUT); } } @@ -1791,14 +1791,6 @@ int kgsl_pwrctrl_init(struct kgsl_device *device) pwr->power_flags = 0; - if (kgsl_property_read_u32(device, "qcom,pm-qos-active-latency", - &pwr->pm_qos_active_latency)) - pwr->pm_qos_active_latency = 501; - - if (kgsl_property_read_u32(device, "qcom,pm-qos-wakeup-latency", - &pwr->pm_qos_wakeup_latency)) - pwr->pm_qos_wakeup_latency = 101; - kgsl_property_read_u32(device, "qcom,l2pc-cpu-mask", &pwr->l2pc_cpus_mask); diff --git a/drivers/gpu/msm/kgsl_pwrctrl.h b/drivers/gpu/msm/kgsl_pwrctrl.h index f00136877a58..13f0afb4f52c 100644 --- a/drivers/gpu/msm/kgsl_pwrctrl.h +++ b/drivers/gpu/msm/kgsl_pwrctrl.h @@ -132,6 +132,7 @@ struct kgsl_regulator { * @l2pc_cpus_qos - qos structure to avoid L2PC on CPUs * @pm_qos_req_dma - the power management quality of service structure * @pm_qos_active_latency - allowed CPU latency in microseconds when active + * @pm_qos_cpu_mask_latency - allowed CPU mask latency in microseconds * @pm_qos_wakeup_latency - allowed CPU latency in microseconds during wakeup * @bus_control - true if the bus calculation is independent * @bus_mod - modifier from the current power level for the bus vote @@ -183,6 +184,7 @@ struct kgsl_pwrctrl { struct pm_qos_request l2pc_cpus_qos; struct pm_qos_request pm_qos_req_dma; unsigned int pm_qos_active_latency; + unsigned int pm_qos_cpu_mask_latency; unsigned int pm_qos_wakeup_latency; bool bus_control; int bus_mod; |