Commit graph

573660 commits

Author SHA1 Message Date
Patrick Daly
fb77347f71 ion: system_secure_heap: Support ION_IOC_DRAIN
Memory in the secure page pool cannot be used for other tasks. If the ion
client is aware that the memory will not be used for the foreseeable future
then there is no point in caching it.
Implement a method for the client to communicate this usecase to the
kernel.

Change-Id: Ib7e58e5ee739c65612602c5f9783600c8b2d6827
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-08-17 12:47:20 -07:00
Patrick Daly
bd9bcc81d2 ion: ion_system_heap: Add an access method for pool size
Allow the system secure heap to read the pool size for a particular vmid
to determine the maximum size which can be freed by the DRAIN IOCTL.

Change-Id: If96265753c6d2c1f210e1961ec7d6ebf8612dd37
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-08-17 12:47:20 -07:00
Patrick Daly
35d6724310 ion: system_secure_heap: Add additional argument verification for ioctl
Impose maximum array sizes on the data for ION_IOCTL_PREFETCH. This
simplifies detection of erroneous requests from userspace.

Change-Id: I1a0ec8d264337b76b55242f8d593258624855ad8
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-08-17 12:47:19 -07:00
Patrick Daly
8b39dc7879 ion: system_secure_heap: Increase secure pool size by amount requested
Allocating an amount from the secure pool, and then freeing that amount
back to the secure pool will not necessarily increase the pool size. Fix
this by allocating from the nonsecure pool, and then freeing to the secure
pool.

Change-Id: I1da12d5c8f9e1f0330cb2c4ff77cd73521df46d9
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-08-17 12:47:19 -07:00
Vidyakumar Athota
1846003b5d ASoC: pcm: change playback_active to unsigned int
In combo usecase there are 2 front-end dai's with
same codec dai. Using a single bit as the counter
causes the counter to roll over to 0 during combo usecase.
To resolve this change counter to unsigned int from single bit.

CRs-Fixed: 1049348
Change-Id: I196802e6d23a9292ff2915c1b4b61c2b3ead9fa8
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2016-08-17 11:13:04 -07:00
Abhijeet Dharmapurikar
85635da429 qcom-charger: smb138x: fix buck damage on v1.1 hardware
Buck damage was observed because the OOB comparator activated
when HSFET was on, causing a direct short from VBUS to ground. Fix this
on V1.1 by increasing the OOB comparator threshold. On 2.0 this is fixed
by ensuring the OOB comparator activates only after HSFET minimum on
time. This in turn guarantees that HSFET and LSFET won't be on at the
same time.

Since the driver needs to detect the version of the smb, make use of the
qpnp-revid module.

CRs-Fixed: 1055113
Change-Id: I0a7946db2f1bdacf1974fb508da46f2ed4dadadc
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-08-17 10:49:58 -07:00
Runmin Wang
17ebeb7688 ARM: dts: msm: Add support for apqcobalt v2
Add support for apqcobalt v2 on mtp, cdp and qrd platforms.

CRs-Fixed: 1051130
Change-Id: I78d5fbe263ceeb592c47709d6189ce2c728b74c8
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2016-08-17 10:26:08 -07:00
Vidyakumar Athota
14a811efbe ARM: dts: msm: add wcd_dsp_glink device node for msmcobalt
wcd_dsp_glink device node is added to send/receive data
and commands to/from DSP in WCD audio codec over glink.

Change-Id: I18316f735474327a42725fc9f3beb8b274b37e65
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2016-08-17 10:20:44 -07:00
Vidyakumar Athota
335414478d soc: qcom: add wcd-dsp-glink platform driver
wcd-dsp-glink platform driver is added to send/receive data and
commands to/from DSP in WCD audio codec over glink. This driver
provides read and write interface to userspace to send/receive
data and commands.

CRs-Fixed: 1053381
Change-Id: I0405ae31201f966c7a3cd52c37191578e960dd71
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2016-08-17 10:20:12 -07:00
Vidyakumar Athota
99c16706c7 uapi: sound: add wcd-dsp-glink header file
Add support for WCD-DSP audio codec communication over glink.
This file defines all the required structures for the userspace
component to communicate with the DSP in WCD audio codec.

CRs-Fixed: 1053381
Change-Id: I141a72c879b4c15590ad94c852a2771a360b55f9
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2016-08-17 10:19:35 -07:00
Bhalchandra Gajare
6c34093c79 ARM: dts: msm: Add support for wcd-dsp-mgr for msmcobalt
wcd-dsp-mgr is the manager device to manage the dsp inside the
codec. Add this device to enable wcd-dsp support for wcd934x
audio codec for msmcobalt.

CRs-Fixed: 1049012
Change-Id: I7ee469781ec2a7af0643032567b547c07319f3d9
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-08-17 09:20:39 -07:00
Bhalchandra Gajare
b99388f08f ARM: dts: msm: Add SPI device node for msmcobalt
WCD934X audio codec has SPI interface to transfer data from/to the
codec. Add this SPI device node to the wcd934x audio codec node
for msmcobalt device tree.

CRs-Fixed: 1049012
Change-Id: Ib64db6d6b34746684f2b6c7d0177688e494b6154
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-08-17 09:20:24 -07:00
Bhalchandra Gajare
b49121fa26 ASoC: wcd934x: Add support for SPI child device node parsing
WCD934X audio codec has SPI interface that can be used to access
the codec memory. Add support in wcd934x audio codec to parse
the wcd_spi child device node entry to perform spi_add_device.

Change-Id: I20723ddbb4c8173228fb1cec016841500c678107
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-08-17 09:19:58 -07:00
Bhalchandra Gajare
a5b8d29080 ASoC: wcd934x: Add support to enable wcd dsp
wcd934x audio codec contains DSP to perform signal processing
of audio data. Change adds support to initialize wcd934x-dsp-cntl,
which triggers the dsp image download and boot.

CRs-Fixed: 1049012
Change-Id: I8f1681a1d2a4b0a6680fc56b6c382afa0aa49e69
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-08-17 09:19:31 -07:00
Laxminath Kasam
9acf4ffae1 ASoC: wcd934x: Add RCO enablement support
WCD934X audio codec has internal clock (RCO) that will
be used during some usecases (ex: using WCD DSP, etc).
Add support in WCD934X codec and resource manager driver
to provide RCO clock enable and disable functionality.

CRs-Fixed: 1049012
Change-Id: I9636dad9b81aeb3a4aa5c09776026d0c2014c05b
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-08-17 09:19:07 -07:00
Bhalchandra Gajare
6391697ab2 ASoC: wcd934x: Enable compilation of wcd dsp drivers
wcd934x audio codec embeds DSP for processing audio signals. Specific
drivers are added to communicate with the DSP and set up the paths.
Enable compilation of these driver for wcd934x audio codec.

CRs-Fixed: 1049012
Change-Id: Ic784449c697794712b9dce3d7131b215d2300cf9
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-08-17 09:18:52 -07:00
Bhalchandra Gajare
fab72a97ba ASoC: wcd34x-dsp-cntl: Add changes to control wcd dsp
WCD934X audio codec contain DSP to perform signal processing of
audio data. The wcd934x-dsp-cntl is refactored code from WCD934X
audio codec driver to perform control of the wcd dsp. Added changes
to control the clocks, memory, interrupts etc to the DSP.

CRs-Fixed: 1049012
Change-Id: Ic3fe1cebe83531d6cae2db9f12fd2fec0563a298
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-08-17 08:53:21 -07:00
Rama Krishna Phani A
56b66ab231 msm: sps: Change the default SPS IPC log level
Set the default IPC logging level to minimal logging in
case client driver does not specify ipc logging level.

Change-Id: I83174225b4eb7ae72cb16bc8f6dcf9659bc1342e
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
2016-08-17 05:33:27 -07:00
Bingzhe Cai
07d93257c6 input: touchscreen: remove PRESSURE event from ft5x06 driver
There is no need to send ABS_MT_PRESSURE event when contact is
removed from touchscreen, this redundant event will confuse some
APP and cause malfunction.

This patch is propagated from msm-3.18 kernel
'commit 75184ddcf2d1 ("input: touchscreen: remove PRESSURE event
from ft5x06 driver")'

CRs-Fixed: 537993
Change-Id: Ie2aef79f99cb80c10706f832cfab583ba742fdf1
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
2016-08-17 17:07:57 +05:30
Mohan Pallaka
bf71f01cc7 input: ft5x06_ts: Upgrade firmware based on version
Upgrade firmware on the controller only when a new
version of firmware is available.

This patch is propagated from msm-3.18 kernel
'commit 88d102ef081f ("input: ft5x06_ts: Upgrade
firmware based on version")'

Change-Id: I4cf75b3c5efb90f151da09ed73b1ba62b9b5bb1c
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2016-08-17 16:59:15 +05:30
Mohan Pallaka
72436be454 input: ft5x06_ts: Parse board specific parameters from pdata
To support all models supported by focaltech push necessary
parameters to platform data.

This patch is propagated from msm-3.18 kernel
'commit 473f8cd84f93 ("input: ft5x06_ts: Parse board specific
parameters from pdata")'

Also fix the below checkpatch warnings on 3.18 Kernel.
WARNING: Possible unnecessary 'out of memory' message
+       if (!data) {
+               dev_err(&client->dev, "Not enough memory\n");

WARNING: Possible unnecessary 'out of memory' message
+       if (!data->ts_info) {
+               dev_err(&client->dev, "Not enough memory\n");

Change-Id: I00b0e8ba7cfc8d8fbd48aa910bd3d0010283ed00
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
2016-08-17 16:53:44 +05:30
Mohan Pallaka
cb040c2f61 input: ft5x06_ts: Add firmware upgrade support for ft6x06
Focaltech 6x06 controller series uses a different reset
register compared to earlier supported controllers. Use
appropriate reset registers based on controller's id.

This patch is propagated from 3.18 kernel
'commit 88dd4c27a3f6 ("input: ft5x06_ts: Add firmware
upgrade support for ft6x06")'

Change-Id: Ia72fa9c256f9e6e2db79388b0152f4d6724ec457
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2016-08-17 16:47:23 +05:30
Figo Wang
8f5d6d8fd0 input: touchpanel: fix the number of touch events detection
Focaltech controllers can reports the number of touch points by read
"TD_STATUS" register. Read this register to avoid always looping
through maximum number of touches supported.

This patch is propagated from 3.18 kernel
'commit 4c142d16fced ("input: touchpanel: fix the number of touch
events detection")'

Change-Id: I8ab111b56b2074cb52cb021d37e9e6505c8b7c72
Signed-off-by: Figo Wang <figow@codeaurora.org>
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
2016-08-17 16:41:53 +05:30
Mohan Pallaka
e6d2a8e4bb input: ft5x06_ts: Disable regulators in suspend
Disable/enable the regulators in suspend/resume to
have better power savings.

This patch is propagated from 3.18 kernel
'commit 550c106ea1a3 ("input: ft5x06_ts: Disable
regulators in suspend")'

Change-Id: I8aa7e941f20040955d6cc177e70ed38dbd28af8c
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2016-08-17 16:36:42 +05:30
Shantanu Jain
faca745b0b input: ft5x06_ts: Handle error if i2c read fails
Handle error if i2c read fails and undo other
probe initializations.

This patch is propagated from 3.18 kernel
'commit 0123456789ab ("input: ft5x06_ts: Handle error if
i2c read fails")'

Change-Id: I26180b057b45f4dad123dd3581e5c5f2b33a32aa
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2016-08-17 16:32:08 +05:30
Figo Wang
849d4f3c1c input: touchpanel: Release all touches during suspend
Release all the touches before going to suspend to avoid
sticky touches and correct multitouch ID error.

This patch is propagated from 3.18 kernel 'commit 8a123ff1f64b
("input: touchpanel: Release all touches during suspend")'

Change-Id: I5dd84d44478291e16fd577aad5cf06503e44fbde
Signed-off-by: Figo Wang <figow@codeaurora.org>
2016-08-17 15:58:56 +05:30
Mohan Pallaka
c72652e02f input: ft5x06_ts: Add debugfs entry for dump info
Add a debugfs entry to display information about controller to the user.
Also have cleared the checkpatch errors on 3.18

This patch is propagated from 3.18 kernel 'commit 71e8bfde1da8 ("input:
ft5x06_ts: Add debugfs entry for dump info")'

Change-Id: I075501fefe1984533139ecca65af92f3c0ab8b97
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
2016-08-17 15:48:34 +05:30
Shantanu Jain
aee223238b input: touchscreen: correct the return value in ITE tech touch driver
Correct the return value of it7260_ts_chip_low_power_mode function
in ITE tech touch driver.

This is a propagation patch from 3.18 kernel 'commit b1e998b971d9
("input: touchscreen: correct the return value in ITE tech touch driver")'

CRs-Fixed: 1020680
Change-Id: Iaaeb4ae22fadefd976906fdf8a995cd7cfe12d33
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2016-08-17 02:14:32 -07:00
Shantanu Jain
61f82846e0 input: touchscreen: send WAKEUP event properly in ITE Tech driver
Send WAKEUP event properly in ITE Tech touch driver when device
is in suspend mode.
The driver maintins a boolean state for sending the WAKEUP event.
When user taps the screen for touch-to-wake feature, the irq
handler for ITE Tech touch driver is scheduled after the ITE tech
resume function. Due to this the boolean state gets reset.
So this change handles this use case properly.

This is a propagation patch from 3.18 kernel  'commit 25af9ff9bc39
("input: touchscreen: send WAKEUP event properly in ITE Tech driver")'

CRs-Fixed: 1020680
Change-Id: Ifc1d00a42ecffe7aad65d99dadcdf170c56129a7
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2016-08-17 14:41:46 +05:30
Mohan Pallaka
19bdb8e2d1 input: ft5x06_ts: Add support for protocol B
Focaltech touchscreen chips can use MT protocol B
because they can assign unique id to ABS_MT_TRACKING_ID
from finger id provided by hardware.

This patch is propagated from 3.18 kernel
'commit 836a4745d978 ("input: ft5x06_ts: Add support
for protocol B")'

Change-Id: I7f236d819eb805934e12faedaf84407b9de95c0e
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2016-08-16 22:12:04 -07:00
Gaurav Singhal
6f13460739 NFC: Fix unbalanced irq warning stack trace
When NFC is not enabled, IRQ will be disabled and
then if we do suspend/resume wake up functionality
won't be enabled at suspend but we try to disable
the same at resume and cause irq warning.

Fix warning trace in below cases :
1) NFC enabled in makefile, but manually turned off in
   settings menu (NFC driver is enabled and hw is present).
2) NFC is not enabled in makefile
   (NFC driver is enabled and hw is present).

Change-Id: I0fd76809cd949d88ae7b820c37f0a9f349abb090
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
2016-08-17 10:38:00 +05:30
Benjamin Chan
b23d3854bc msm: sde: Adding SW overhead statistic for SDE rotator
Enabling SW overhead statistic collection for SDE rotator. SW overhead
is defined as time between buffer queueing and HW flush.

CRs-Fixed: 1054205
Change-Id: I7f09dafa8c2d0f1940c76913ae842835059122f4
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
2016-08-16 18:13:17 -07:00
Benjamin Chan
eeb4edfc69 ARM: dts: msm: add SSC to MDSS DSI PLL for msmcobalt
Enabling Spread Spectrum Clocking (SSC) support in MDSS DSI PLL
device for msmcobalt.

CRs-Fixed: 1036187
Change-Id: I15ee013f42e6d8630ae650350cc4d92dffd01b2e
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
2016-08-16 18:08:23 -07:00
Benjamin Chan
56b0ef1365 clk: msm: mdss: add SSC support for dsi PLL on msmcobalt
Add support to control Spread Spectrum Clocking (SSC) in the
DSI PLL on msmcobalt.

CRs-Fixed: 1036187
Change-Id: I158670185976801970d54bec4bc42014b1b28b96
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
2016-08-16 18:07:56 -07:00
Alan Kwong
4b225b46c3 msm: mdss: shutoff axi memory and periphery when axi clk is off
Because of CBCR update, mdss driver needs to control mdss axi clock
state of memory core and periphery control when branch clock is off.
Since mdss does not have retention requirement for axi, both memory core
and periphery control can be turned off to conserve power when mdss
axi clock is off.

CRs-Fixed: 1044375
Change-Id: Ia609549304be97cdaeff0f30ff0ca8ad5e22af75
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
2016-08-16 20:46:51 -04:00
Skylar Chang
801aa2e38a msm: gsi: enable wake irq
Allow GSI interrupt to wake up AP.
This change will prevent a data stall in case
AP is in power collapse and IPA has data available
to AP.

Change-Id: I6457d1e348cd8e7a9075396e02061843f0ac9abc
CRs-Fixed: 1012036
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2016-08-16 17:03:34 -07:00
Skylar Chang
55d1eb491e msm: ipa: allow dtsi based lan rx ring size
Add support for specifying the size of LAN RX buffer pool.
Once this specified in dtsi, it will override the default value.

Change-Id: I60ff9ecf7e27aa9cd20dbc693e2ac392c401dfb9
CRs-Fixed: 1050748
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2016-08-16 16:54:26 -07:00
Skylar Chang
ab8bdb44da msm: ipa: fix potential NULL deference on SMMU
Fix potential NULL deference when SMMU is available.

Change-Id: I3454612cb8473e94ceb8163eca018d2489bff0c5
CRs-Fixed: 1052523
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2016-08-16 16:37:32 -07:00
Linux Build Service Account
008f057bba Merge "usb: pd: Always request maximum available current from PDO" 2016-08-16 16:35:14 -07:00
Linux Build Service Account
fdc8eb402a Merge "msm: vidc: Delay output buffer setting to FW" 2016-08-16 16:35:13 -07:00
Linux Build Service Account
d2113df12a Merge "perf: Add support for exclude_idle attribute" 2016-08-16 16:35:12 -07:00
Linux Build Service Account
2d546ee279 Merge "perf: add hotplug support so that perf continues after hotplug" 2016-08-16 16:35:11 -07:00
Linux Build Service Account
cca095ddea Merge "msm: mdss: update voltage level configuration for CX supply" 2016-08-16 16:35:10 -07:00
Linux Build Service Account
0391265ec0 Merge "msm: mdss: add support for hdcp 1.x interrupt handler" 2016-08-16 16:35:07 -07:00
Linux Build Service Account
13dc7954bf Merge "icnss: Vote aggre2_noc_clk through bus bandwidth framework" 2016-08-16 16:35:05 -07:00
Linux Build Service Account
4669827998 Merge "ARM: dts: msm: Add bus bandwidth entry for ICNSS" 2016-08-16 16:35:04 -07:00
Linux Build Service Account
e0eaae1dad Merge "defconfig: msmcortex: Enable CONFIG_MSM_AVTIMER" 2016-08-16 16:35:02 -07:00
Linux Build Service Account
1c37e5b693 Merge "Revert "arm64: fpsimd: Enable FP(floating-point) settings for msm8996"" 2016-08-16 16:34:58 -07:00
Linux Build Service Account
96bd85a9ee Merge "ARM: dts: msm: define pinctrl for MI2S and PCM devices for msmcobalt" 2016-08-16 16:34:57 -07:00
Linux Build Service Account
da8988ee5e Merge "ARM: dts: msm: Update qusb2 phy init sequence for msmcobalt v2" 2016-08-16 16:34:56 -07:00