Commit graph

586661 commits

Author SHA1 Message Date
Jack Pham
9f5b3e1ea4 usb: phy: qmp: Select usb3 phy mode during PHY reset
commit a3e98f0134 ("usb: phy: qmp: Select usb3 phy mode before
initializing PHY") moved the USB/DP mode selection to just prior
to performing PHY initialization. This resolved initialization
failure however it still may fail to result in SuperSpeed
enumeration on when first switching from DP back to USB3 mode.
According to HW documentation the correct place to perform the
mode switch is while the PHY is under reset, so move this step
to msm_ssphy_qmp_reset().

Change-Id: Ia540b3793440e1d203b79cf129a9e80ad2b0e3e9
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2017-03-22 14:19:15 -07:00
Benjamin Chan
1f42db3852 msm: sde: Protect concurrent access to resources in SDE rotator
ioctl32 handling in SDE rotator does not go through the V4L2 ioctl
lock protection, thus allowing concurrent access to some of the SDE
rotator internal resources. This change adds the mutex protection to
the SDE rotator ioctl32 handler.

CRs-Fixed: 2019300
Change-Id: Idca37e19b7d3812e90d143acfc6fef82df19ab97
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
2017-03-22 15:25:18 -04:00
Subash Abhinov Kasiviswanathan
b268a55a9f net: rmnet_data: Add support to configure custom device name
rmnet_data assigns device name by the order they are created.
This causes problems which multiple processes are trying to
create devices and leads to random device names.

Assign device name as specified by user.

CRs-Fixed: 2018785
Change-Id: Iab8e053c6ccacbeedaa7763e760d0c12e756b5d0
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2017-03-22 12:55:20 -06:00
Jordan Crouse
4870006adc drm/msm: Take the mutex before calling msm_gem_new_impl
Amongst its other duties, msm_gem_new_impl adds the newly created
GEM object to the shared inactive list which may also be actively
modifiying the list during submission.  All the paths to modify
the list are protected by the mutex except for the one through
msm_gem_import which can end up causing list corruption.

Change-Id: Ic0dedbad6b68d4d3db726e0d598d4d21af4b328c
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-03-22 11:19:44 -06:00
Ard Biesheuvel
9fcccba399 arm64: kaslr: use callee saved register to preserve SCTLR across C call
The KASLR code incorrectly expects the contents of x18 to be preserved
across a call into C code, and uses it to stash the contents of SCTLR_EL1
before enabling the MMU. If the MMU needs to be disabled again to create
the randomized kernel mapping, x18 is written back to SCTLR_EL1, which is
likely to crash the system if x18 has been clobbered by kasan_early_init()
or kaslr_early_init(). So use x22 instead, which is not in use so far in
head.S

Change-Id: I6a79b0c3b2e2306d080406c7f617483f6f1519b0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Git-commit: d5e5743797adc26e09db262e7a4b6b81d8c0f45c
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[neeraju@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2017-03-22 19:22:53 +05:30
Neeraj Upadhyay
ff0f90c107 arm64: kaslr: Fix up the kernel image alignment
If kernel image extends across alignment boundary, existing
code increases the KASLR offset by size of kernel image. The
offset is masked after resizing. There are cases, where after
masking, we may still have kernel image extending across
boundary. This eventually results in only 2MB block getting
mapped while creating the page tables. This results in data aborts
while accessing unmapped regions during second relocation (with
kaslr offset) in __primary_switch. To fix this problem, round up the
kernel image size, by swapper block size, before adding it for
correction.

For example consider below case, where kernel image still crosses
1GB alignment boundary, after masking the offset, which is fixed
by rounding up kernel image size.

SWAPPER_TABLE_SHIFT = 30
Swapper using section maps with section size 2MB.
CONFIG_PGTABLE_LEVELS = 3
VA_BITS = 39

_text  : 0xffffff8008080000
_end   : 0xffffff800aa1b000
offset : 0x1f35600000
mask = ((1UL << (VA_BITS - 2)) - 1) & ~(SZ_2M - 1)

(_text + offset) >> SWAPPER_TABLE_SHIFT = 0x3fffffe7c
(_end + offset) >> SWAPPER_TABLE_SHIFT  = 0x3fffffe7d

offset after existing correction (before mask) = 0x1f37f9b000
(_text + offset) >> SWAPPER_TABLE_SHIFT = 0x3fffffe7d
(_end + offset) >> SWAPPER_TABLE_SHIFT  = 0x3fffffe7d

offset (after mask) = 0x1f37e00000
(_text + offset) >> SWAPPER_TABLE_SHIFT = 0x3fffffe7c
(_end + offset) >> SWAPPER_TABLE_SHIFT  = 0x3fffffe7d

new offset w/ rounding up = 0x1f38000000
(_text + offset) >> SWAPPER_TABLE_SHIFT = 0x3fffffe7d
(_end + offset) >> SWAPPER_TABLE_SHIFT  = 0x3fffffe7d

Change-Id: I6de9019cffe5e730a505fba1fd1168bb13fb10af
Fixes: f80fb3a3d508 ("arm64: add support for kernel ASLR")
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2017-03-22 18:42:11 +05:30
Abhishek Kondaveeti
c1804f4e09 msm: isp: Fix stream off failure in LPM
Don't wait for register updates if stream state is
already paused.

Change-Id: I690a70040a7038f6d2c8d68596b285f458eb65b6
Signed-off-by: Ramesh V <ramev@codeaurora.org>
2017-03-22 18:00:10 +05:30
Jin Fu
63c85b9798 Revert "input: touchpanel: Add ST Touchscreen version 4.1.0 driver"
This reverts commit ed29ea5a01
("input: touchpanel: Add ST Touchscreen version 4.1.0 driver").
ed29ea5a01 has a author problem, so it need to be reverted and
remerged.

Change-Id: Ic2150c6069469d70edf54050a574a483a11a5bdc
Signed-off-by: Jin Fu <jinf@codeaurora.org>
2017-03-22 20:08:05 +08:00
Dilip Kota
d30e4d4e54 devfreq_spdm: Handle spurious interrupts during bootup
Terminate the interrupts triggered before the intitalisation
itself.

Change-Id: I7c005134ecbdae38b58e4312f9e294f5b59c2510
Signed-off-by: Dilip Kota <dkota@codeaurora.org>
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2017-03-22 02:47:41 -07:00
Odelu Kukatla
9a36746dc7 ARM: dts: msm: Add support for speed-bin 2 for MSM8996v3
Add speed-bin 2 to support the fmax of 1.9GHz and 1.5GHz
for perf and power clusters respectively.
Also add speed-bin 2 to support the fmax of 560MHz for GPU clock.

Change-Id: I9bc547b0f8a2f2c7cad04ec8c967ed580755ae75
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
2017-03-22 02:21:15 -07:00
Shantanu Jain
141fe25708 input: keyboard: add syscore_ops support to gpio_key driver
Add syscore_ops support for gpio-keys driver to service
wakeable irq handler before the CPUs resume after
suspend state.

Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
Change-Id: I7fe266661abfd469c68309a66aed0cb0fa2de33e
2017-03-22 14:39:37 +05:30
Vijayavardhan Vennapusa
7c9990241e f_qc_rndis: Compile rndis.c if CONFIG_USB_F_QCRNDIS is enabled
When CONFIG_USB_F_QCRNDIS is enabled to support RNDIS over BAM2BAM
to IPA, it needs to compile rndis.c driver as well. Otherwise
will see compilation error. Hence compile rndis.c along with f_qc_rndis.c
when CONFIG_USB_F_QCRNDIS is enabled. Disable CONFIG_USB_F_GSI as both
configs can't be enabled at a time as that would cause compilation errors
and warnings seen due to same misc device name registration.

Change-Id: Ie11fba25be53e158811b05c7054bbdf126689c36
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-03-22 13:29:06 +05:30
Laxminath Kasam
727455f34d ASoC: msm_sdw: Avoid initial SSR notifications at bootup
In MSM soundwire codec, avoid initial bootup SSR
notifications after registration of notifier.

Change-Id: I06b1ffedf3b7247baa1d3ffe92a66584a321e624
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-03-22 00:52:27 -07:00
Laxminath Kasam
9c53a155cc ASoC: wsa881x: Add mixer control to set WSA PA mute
Add mixer control to allow set WSA speaker PGA mute
when required for any usecase.

Change-Id: Ic02a5973ec25b4c5b613b42129fdab9c0d7a2133
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-03-22 00:52:09 -07:00
Laxminath Kasam
145923d535 ASoC: sdm660_cdc: Fix 44.1 clip mute first time after boot
After boot, insert headphone and play 44.1 clip fails to play
first time sometimes. Since at bootup MCLK is acquired at
9.6MHz and not reset. And for 44.1MHz, request for 11.2896MHz
is done causes overwrite of frequency request at DSP which is not
allowed and causes playback to fail. At bootup regacache call for
digital codec result in additional vote for MCLK if int_mclk0_enabled
flag is false. Change the order in device_down call from analog codec
and also avoid notifier call for SUBSYS_DOWN at bootup.

Change-Id: Ifc0540826d38c5adf8b068ea87d5a5f71a4ac674
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-03-22 00:51:47 -07:00
Laxminath Kasam
bd01dc59f2 ASoC: swr-wcd: Reduce latency for cold start on speaker
In SDM660 WSA speaker using MSM over soundwire version,
observe high cold start latency. As interrupt is disabled,
broadcast ack is not received which results in 200ms higher
latency. Reduce latency impact by blocking only for 10ms
for MSM over soundwire version.

Change-Id: Ic0e659d7c443c1462aba4da2f8bf9471031d02d2
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-03-22 00:51:02 -07:00
Laxminath Kasam
78bbe3cbe5 ASoC: sdm660_cdc: fix HPH CnP on sdm660 internal codec
Enable digital clock bits before digital codec reset.
Also update HD2 settings as per latest HW sequences.

CRs-Fixed: 2018603
Change-Id: I270a324ffebc8b84ef23ff6b209efcde724f9b37
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-03-22 00:42:11 -07:00
AnilKumar Chimata
223fd81f3a hwrng: Add quality parameter to msm-rng driver
With the recent changes in upstream, certain parameters
are updated in the core random number generator driver.
So update HW rng driver to provide the quality estimation
of true entropy in RNG's bitstream. Value 700 corresponds
to 70% an arbitrary value, which is taken from 3.10.

Change-Id: I0d27e44a05473bcbc84af82c79565f87329b9ae7
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
2017-03-22 13:12:05 +05:30
Laxminath Kasam
9fab026308 ASoC: msm_sdw: Fix random mute on speaker when device switch
Observe random mute on speaker during device switch on
secondary images. Avoid reading previous register
read when SWR slave read and overwrite of previous register
when SWR slave write, by adjusting delays in respective APIs.

Change-Id: I302968ad8e774598c8414e05ba669f90bf39b82c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-03-22 00:37:24 -07:00
Laxminath Kasam
9c6cccf6b8 ASoC: msm_sdw: Fix compander register setting for speaker
Observe compander for one speaker is not working.
Update offset in config compander API to set compander registers
as expected.

CRs-Fixed: 2019754
Change-Id: Ib75e01016e6a9fd39a953da40f36babc3beaec13
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-03-22 00:33:37 -07:00
Laxminath Kasam
f4a76fca6b ASoC: wcd-mbhc: Fix list del entry issue on mbhc variable
Without re-init timeout completion of btn_press object
waiting in correct_plug_swch work, if mbhc_deinit and mbhc_start
happens again, it results in crash. In mbhc_deinit,
cancel correct_plug_swch work to handle this.

CRs-Fixed: 2018976
Change-Id: Ic26edea18f5a8554f4dff3bf6ad49ec039493a64
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-03-22 00:33:07 -07:00
Meng Wang
eeba4974b8 pinctrl: qcom: correct register offset for lpi_gpio_16/17 on sdm660
Register offset for LPI_GPIO_16/17 should be 0x5040/0x5050.
Correct the offset to make sure LPI_GPIO_16/17 work.

CRs-Fixed: 2019608
Change-Id: Iac0bc2b434b23094c297e69eabea4d72bfd1eb8b
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2017-03-22 00:30:23 -07:00
Meng Wang
3f99ccf50d ASoC: audio-ext-clk: correct pinctrl info for lpass mclk
Pinctrl info is set to ap mclk for all the client. Remove
the wrong assignment.

Change-Id: I95fb16367157fa0cb47a1a25290eadb4472abb51
CRs-Fixed: 2015665
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2017-03-22 00:29:43 -07:00
Meng Wang
d5e2207b82 ARM: dts:msm: correct clk setting for native playback on SDM660
LPI GPIO 18 is used as a clock for native playback for wcd9335
on SDM660. Correct it as lpass mclk, not ap clk.

CRs-Fixed: 2015665
Change-Id: I1fa5f2dc314a73d139aacbb9689e9a161b9a54ef
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2017-03-22 00:29:23 -07:00
Bhalchandra Gajare
554b0acd0a ASoC: wcd-spi: pre-allocate buffers used for transfers
Currently, the buffers used for transfers are allocated each time
the transfer is requested. This causes memory allocation failure
for higher order allocations possibly due to fragmentation or no
higher order blocks being available. Fix this by allocating the
buffers during the component bind and re-use the buffers across
transfers.

CRs-fixed: 2014478
Change-Id: I48212678e39d089fbb903d195faf45436f358f4b
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2017-03-22 00:29:01 -07:00
Laxminath Kasam
1650f182b6 ASoC: sdm660_cdc: Fix no headset remove event after SSR
Restart mechanical detection as part of SSR device_up
functionality to receive headset events after SSR.

CRs-Fixed: 2015351
Change-Id: I359c701b8c7c086c087ab5fa7714b6bd3f7c4708
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-03-22 00:25:34 -07:00
Meng Wang
0ba15ea7a7 ASoc: msm: remove capture property for SLIMBUS_6 Hostless playback
Backend SLIMBUS_6 Hostless Playback only supports playback, not capture.
Remove capture property to avoid invalid access.

Change-Id: I7cc426a4badb50fbd7e83454fa89e3a0f2a89c23
CRs-Fixed: 2014489
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2017-03-22 00:23:51 -07:00
Devesh Jhunjhunwala
96e7d2f66e clk: msm: gcc-8996: Add pinctrl clk for ln_bb_clk
Add the pinctrl clock for ln_bb_clk to the GCC driver
for MSM8996.

CRs-Fixed: 1063062
Change-Id: If85a0dbb26e350588cbd6614c032bf208a205be2
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
2017-03-22 00:23:24 -07:00
Aditya Bavanari
5a9ebdbc6a ASoC: sdm660-cdc: Change val_bits to 8 from 32 in digital cdc regmap
ADIE RTAC register parsing logic expects the registers value to
be 1 byte for all the codecs.Change the val_bits in regmap
config structure of the digital codec to 8 bits from 32 bits.

CRs-fixed: 2014589
Change-Id: Ib7a022c420cbd27aeac75ac061f96f8a1f39bd2e
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2017-03-22 00:22:27 -07:00
Deepak Katragadda
ab0349c601 clk: msm: clock-gcc-8996: Add additional frequencies for QSPI clock
Add support for additional frequencies for the qspi_ser_clk_src
on msm8996.

Change-Id: I4efa0ad4dc3f68a0c54bd4cf7ee77b4c78be4be1
CRs-Fixed: 994014
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2017-03-22 00:17:10 -07:00
Mukesh Kumar Savaliya
d34b191ac1 msm_serial_hs: modify uart driver to prevent race between timer calls
In some of the cases when UART submits sps transfer request, BAM finishes
transfer quickly. This results into deletion of Tx timeout timer from an
ISR context whereas in actual timer is not yet started. In such cases
del_timer and mod_timer are meeting to a race where mod_timer finds a
NULL handle due to deletion by del_timer.

Change the timer call sequence to submit the timer first and then do a
BAM transfer.

Change-Id: I1d75a43d928776eb24752fd97d0ef31e0d5b6a51
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
2017-03-22 12:16:16 +05:30
Vijayavardhan Vennapusa
0b3e441877 ARM: dts: msm: designate LDO10A as a parent of LDO7B on sdm660
On SDM660, there is a HW bug that could lead to chip damage if
the 3.1V rail (normally provided by PM660 LDO7B) is turned on
while the 1.8V (LDO10A) rail is off. A simple workaround is to
ensure that LDO10A is turned on prior to LDO7B. Achieve this by
making pm660_l10 the parent-supply of the pm6601_l7 regulator.

Change-Id: I748d2b8526066e746002ad007789c10422c12c68
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-03-22 11:55:47 +05:30
Xu Yang
bd26112bb1 msm: mdss: initialize external BL level when fb probe
Initialize external backlight level to -1 when fb probe.
This is to make sure the external backlight level is
invalid the first time overlay kickoff.

CRs-Fixed: 2021142

Change-Id: I973b184903cdb5b378326b23ca5c958e4b868c76
Signed-off-by: Xu Yang <yangxu@codeaurora.org>
2017-03-21 22:48:22 -07:00
Rakesh Pillai
fa3bbdac23 ath10k: change log level for unknown wmi event print to debug
Unknown WMI events are being printed with log level warning.
Change the log level for the unknown wmi event print to debug.

CRs-Fixed: 2019156
Change-Id: Ice39487c698462d6c845dab2ede93f5c856364c0
Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
2017-03-21 22:46:56 -07:00
Linux Build Service Account
630218f710 Merge "diag: Add mutex protection while closing diag channels" 2017-03-21 21:30:35 -07:00
Linux Build Service Account
e084f910fc Merge "firmware: qcom: tz_log: update datatype for int_count" 2017-03-21 21:30:33 -07:00
Linux Build Service Account
afc27e8460 Merge "drivers: soc: qcom: Remove prints from the idle path" 2017-03-21 21:30:32 -07:00
Linux Build Service Account
db71be31d5 Merge "soc: qcom: Do not clear segments if pil boot failed in memory allocation" 2017-03-21 21:30:30 -07:00
Linux Build Service Account
6887b6aad3 Merge "qseecom: check img_len and mdt_len against ion buf len" 2017-03-21 21:30:29 -07:00
Linux Build Service Account
63739565ad Merge "ARM: dts: msm: Change ipa polling parameter in SDM660/630" 2017-03-21 21:30:28 -07:00
Linux Build Service Account
c65465727b Merge "pmic-voter: move to common header location" 2017-03-21 21:30:26 -07:00
Linux Build Service Account
0529101684 Merge "soc: qcom: spcom: spcom_device_read() check filp->private_data" 2017-03-21 21:30:24 -07:00
Linux Build Service Account
0fb8a4413c Merge "usb: pd: Determine dual_role writeable based on PD capability" 2017-03-21 21:30:23 -07:00
Linux Build Service Account
13ad7308cb Merge "msm: mdss: Add lock to avoid release of active session in rotator" 2017-03-21 21:30:22 -07:00
Linux Build Service Account
6d794adaa2 Merge "ARM: dts: msm: Add DDR52 bus speed mode for SDM660" 2017-03-21 21:30:21 -07:00
Linux Build Service Account
fd3a1144c5 Merge "ARM: dts: msm: Enable midframe sampling timer on SDM630" 2017-03-21 21:30:20 -07:00
Linux Build Service Account
79e992c149 Merge "ASoC: msm: add CPE widgets to ignore suspend list" 2017-03-21 21:30:11 -07:00
Linux Build Service Account
2d2b57cdd0 Merge "ASoC: msm8998: add mixer controls for MI2S bit format" 2017-03-21 21:30:10 -07:00
Linux Build Service Account
aba133a2c4 Merge "wil6210: add sysfs for thermal throttling configuration" 2017-03-21 21:30:09 -07:00
Linux Build Service Account
dbc5507289 Merge "wil6210: align to latest auto generated wmi.h" 2017-03-21 21:30:08 -07:00