diff options
| author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-08-20 01:17:16 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-08-20 01:17:16 -0700 |
| commit | fd17ef2bcaec9633fd68779c44e2375afd04a26c (patch) | |
| tree | bb6d340cc52a6fe077ac8e74d169d2b590d410a1 /drivers/gpu | |
| parent | 0f9dd1be13d0eda67d1f7afce7f6e656c41e7636 (diff) | |
| parent | 8d2505b7dec0738d1b732a419b9b396b56cffc46 (diff) | |
Merge "msm: kgsl: Add disable-wake-on-touch devicetree property" into msm-4.4
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/msm/adreno.c | 26 | ||||
| -rw-r--r-- | drivers/gpu/msm/kgsl_pwrctrl.h | 2 |
2 files changed, 19 insertions, 9 deletions
diff --git a/drivers/gpu/msm/adreno.c b/drivers/gpu/msm/adreno.c index afa71116c691..7cab049771de 100644 --- a/drivers/gpu/msm/adreno.c +++ b/drivers/gpu/msm/adreno.c @@ -902,6 +902,9 @@ static int adreno_of_get_power(struct adreno_device *adreno_dev, device->pwrctrl.bus_control = of_property_read_bool(node, "qcom,bus-control"); + device->pwrctrl.input_disable = of_property_read_bool(node, + "qcom,disable-wake-on-touch"); + return 0; } @@ -1016,15 +1019,19 @@ static int adreno_probe(struct platform_device *pdev) /* Initialize coresight for the target */ adreno_coresight_init(adreno_dev); - adreno_input_handler.private = device; - #ifdef CONFIG_INPUT - /* - * It isn't fatal if we cannot register the input handler. Sad, - * perhaps, but not fatal - */ - if (input_register_handler(&adreno_input_handler)) - KGSL_DRV_ERR(device, "Unable to register the input handler\n"); + if (!device->pwrctrl.input_disable) { + adreno_input_handler.private = device; + /* + * It isn't fatal if we cannot register the input handler. Sad, + * perhaps, but not fatal + */ + if (input_register_handler(&adreno_input_handler)) { + adreno_input_handler.private = NULL; + KGSL_DRV_ERR(device, + "Unable to register the input handler\n"); + } + } #endif out: if (status) { @@ -1076,7 +1083,8 @@ static int adreno_remove(struct platform_device *pdev) _adreno_free_memories(adreno_dev); #ifdef CONFIG_INPUT - input_unregister_handler(&adreno_input_handler); + if (adreno_input_handler.private) + input_unregister_handler(&adreno_input_handler); #endif adreno_sysfs_close(adreno_dev); diff --git a/drivers/gpu/msm/kgsl_pwrctrl.h b/drivers/gpu/msm/kgsl_pwrctrl.h index 5c0071544f60..02707c901839 100644 --- a/drivers/gpu/msm/kgsl_pwrctrl.h +++ b/drivers/gpu/msm/kgsl_pwrctrl.h @@ -146,6 +146,7 @@ struct kgsl_regulator { * @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 + * @input_disable - To disable GPU wakeup on touch input event * @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 @@ -203,6 +204,7 @@ struct kgsl_pwrctrl { unsigned int pm_qos_active_latency; unsigned int pm_qos_cpu_mask_latency; unsigned int pm_qos_wakeup_latency; + bool input_disable; bool bus_control; int bus_mod; unsigned int bus_percent_ab; |
