Commit graph

568696 commits

Author SHA1 Message Date
Amir Vajid
1cad27b269 soc: qcom: add API for matching voltages across CPUs
Create an API to match voltages across asymmetric CPUs as
this can be useful in systems with a shared rail across CPUs.
The API takes in one input argument which is the frequency of
a big cluster CPU for which a voltage-equivalent little cluster
CPU frequency is desired. The return value is this little
cluster CPU frequency. All frequencies are in units of kHz.

Change-Id: I821819a0761566984dd7f92014599ff0fcb85e90
Signed-off-by: Amir Vajid <avajid@codeaurora.org>
2016-03-23 21:17:08 -07:00
Jing Zhou
b5bfca8bf5 ARM: dts: msm: correct camera clock setting for 8996
Update camera clock setting to match latest 8996 clock plan.

Change-Id: Ib08ad55b53454196d72370fede075e9447fe7af0
Signed-off-by: Jing Zhou <jzhou70@codeaurora.org>
2016-03-23 21:17:07 -07:00
Mathew Joseph Karimpanal
0058a7fa56 ARM: dts: msm: Enable HDMI hot-plug on Automotive DragonBoard 820
Automotive DragonBoard 820 is a development kit and has an HDMI type A
receptacle. So enable HDMI hot-plug feature.

Change-Id: I2be85cf91f6532110b125050bce0cca441e42960
Signed-off-by: Mathew Joseph Karimpanal <mkarim@codeaurora.org>
2016-03-23 21:17:06 -07:00
Dhananjay Kumar
e22b97da06 ASoC: msm: fix indefinite wait in compress drain
In compressed driver streams might get stopped while
ioctl drain is started but not completed, since buffers
are drained in multiple stages when gapless mode is
enabled.
Check stream state before issuing wait commands to
prevent waiting for drain ack on stopped streams.

Change-Id: I606639c103a7aed90dd9a4561fa6dffc3d4c3822
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2016-03-23 21:17:06 -07:00
Lakshmi Narayana Kalavala
4f71751318 msm: camera: Enhancements to soc layer
Define camera bus clients to identify the multiple camera clients.
Add API to support devices consisting of multiple clock rates
in the device tree node and register threaded irq.

Change-Id: Icdaae68b82c441baf988e90fb6d5cc83c2402a93
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2016-03-23 21:17:05 -07:00
Zhen Kong
c3a112da96 qseecom: fix an error related to app name comparision
Make changes to use strcmp to compare app name, and
avoid the memcpy comparision error if the first
several chars of an app name is exactly equal to
another app name. Besides, on some targets, keymaster
app may be first loaded as "keymaste" by qseecomd,
and then used as "keymaster". To avoid checking app
name error, register "keymaster" into app_list and
thread private data.

Change-Id: I468b4e5cb1d5d77ac5d687d0bddc8614b972785f
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2016-03-23 21:17:04 -07:00
Deepak Katragadda
2740b9fcaa clk: msm: clock: Add GPUCC clock driver support for MSMCOBALT
Add support to model the graphics clocks on MSMCOBALT.

Change-Id: I31c3dda59a0bb7e9b6b6cee8176fb46f46767629
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2016-03-23 21:17:03 -07:00
Bhalchandra Gajare
f5e6ba4333 ASoC: wcd9335: Configure DMIC clock drive stength from pdata
It is possible that differnt platforms could configure to DMIC clock
drive strength differently. Allow this configuration by setting the DMIC
clock drive strength through pdata.

CRs-fixed: 938006
Change-Id: I6f9f8a947e0efca31d0c50dec9a5973079bb48c4
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-03-23 21:17:02 -07:00
Ashwini Rao
7c59712b2f msm: fd: Do buffer done on all buffers in vb2 queue on streamoff
On v4l2 stop_streaming, a vb2_buffer_done needs to be done to
ensure that the driver gives back all the buffers it got from
the buf_queue() callback.

Change-Id: I1ba8776381efb41820ed44a8bdf70c99574b09ac
Signed-off-by: Ashwini Rao <ashwinik@codeaurora.org>
2016-03-23 21:17:01 -07:00
Yan He
043d337047 msm: sps: update SPS logging
Update the logging in SPS driver to catch additional info for
the interaction between SPS driver and BAM client drivers.

Change-Id: Icd5955d2d4dd83124f47e60e052ec3b3a2611025
Signed-off-by: Yan He <yanhe@codeaurora.org>
2016-03-23 21:17:01 -07:00
Phani Kumar Uppalapati
6fd817114c ASoC: wcd9335: Give more headroom for headphone PA ramp
Give more headroom for headphone PA ramp up and down during
impedance detection to avoid any click and pop or ramp error.

Change-Id: I3e3980e48ce19955b4230876887adfde5b44e8ea
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-03-23 21:17:00 -07:00
Harshdeep Dhatt
b0d56ee1cb msm: kgsl: Make snapshot resilient to a non-existent ib1base
During snapshot, we may encounter an invalid IB1 base which
is not found in the current rb. In that case, dump the entire
ringbuffer from start to end and all the IBs in it to get a
more complete picture of the failure.

Change-Id: I4393c7de6f8f4890870fa6e2b5e69073dce922b7
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2016-03-23 21:16:59 -07:00
Harshdeep Dhatt
55946b6985 msm: kgsl: Add accounting for memory mapped in userspace
For proper memory accounting, a key metric is to know how much
memory kgsl allocated for a process and how much of it the process
is actually using. This is done by keeping track of memory in our
vmfault routines. This information is provided via the process
mem file.

Change-Id: I7e3371a708ea5fdade3840b2384b3bc4012ad004
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2016-03-23 21:16:58 -07:00
Xu Han
0117f1ce83 Revert "ARM: dts: msm: Increase CSIPHY clock rate on 8996"
This reverts commit b6db8cdda733821b9d21cc66a5f8c2ce62238065
("ARM: dts: msm: Increase CSIPHY clock rate on 8996") to meet
power test requirement.

Change-Id: I1a1667782dc211c5061ddd5642868d0e2d066631
Signed-off-by: Xu Han <hanxu@codeaurora.org>
2016-03-23 21:16:57 -07:00
Shilpa Mamidi
a48cadfb8f msm: cpp: Adding mutex unlock before returning
Adding mutex unlock before returning in error cases
and also ensured that return value is not over written
in error cases.

Change-Id: I5aceffd2dbf2b456ca421892b691f86c6b1032c3
Signed-off-by: Shilpa Mamidi <shilpam@codeaurora.org>
2016-03-23 21:16:56 -07:00
Shilpa Mamidi
be0afb13c5 msm: cpp: Checking for validity of regulator pointers
Not all targets have fs regulators, for such devices
crash is seen when firmware load fails. To fix this issue
validity check is made before disabling fs regulators.

Change-Id: Ib1b365bcdda724580e69d35dcf8dbeb25abc2b99
Signed-off-by: Shilpa Mamidi <shilpam@codeaurora.org>
2016-03-23 21:16:55 -07:00
Shilpa Mamidi
c63abb5d90 msm: cpp: Changing order of setting GDSRC register
If GDSRC is set after FW load this is causing FW timeout.
Setting this before Jump instruction to avoid timeout.

Change-Id: I8b20ae1d8ae627288f1615a6ae6480dd8105ddcb
Signed-off-by: Shilpa Mamidi <shilpam@codeaurora.org>
2016-03-23 21:16:55 -07:00
Trishansh Bhardwaj
183516d967 msm: camera: Retelimit log in msm_vb2_buf_cleanup.
Ratelimit log in msm_vb2_buf_cleanup to prevent excessive logging when
stream is NULL.

Change-Id: Ia687375c8e2a2683a4d32cd0eb984f731b2288e7
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2016-03-23 21:16:54 -07:00
Sagar Dharia
1389ff19f5 slim: msm: Fix the instance number being sent to ADSP
Every bus instance can have 2 NGD devices. Fix the instance number
determination based on NGD device-id.

Change-Id: I515f4f09d58a7abc0c0322ca714b88fb847a0909
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
2016-03-23 21:16:53 -07:00
Karthikeyan Ramasubramanian
9daf459220 soc: qcom: glink_smd_xprt: Remove unnecessary mutual exclusion
Receive command mutual exclusion is required only for the channel open
& close related operations and is not required for any operations relating
to data exchange.

Remove receive command mutual exclusion from the location where it is not
required.

Change-Id: Icebab0b36d71165d895e0fed2e9cfe2c624056b9
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-23 21:16:52 -07:00
Manish Poddar
b7244df4e0 msm: camera: add different mutex lock for camera close
when camera_v4l2_close is called for one of the stream
and say backend is taking more time to delete the stream
and in between mediaserver crashes which call close camera
which lead to race condition. To avoid this added a lock
for close camera.

Change-Id: Idc4a72fd1d639619fafd3e2856d5bb502785c0bf
Signed-off-by: Manish Poddar <mpoddar@codeaurora.org>
2016-03-23 21:16:51 -07:00
Banajit Goswami
1f1fb7752f mfd: wcd9xxx: avoid slimbus read/write during ADSP reset
During ADSP subsystem restart, all slimbus read/write would fail
as the bus is not available. Avoid codec read/write, until the
slimbus master in ADSP is up.

Change-Id: Iec1933d2625c1cd3dd700b2b3e2ffc7eae64880b
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 21:16:50 -07:00
Seemanta Dutta
75a73e973c cam: smmu: Schedule work queue for triggering page fault handler
If page fault handler is triggered from within the same context
as ARM IOMMU driver, it can lead to deadlock due to improper
grabbing of mutexes.

This can be avoided if the page fault handler context is
immediately returned to ARM IOMMU driver after scheduling
work queue  for triggering client specific fault handler
registered with CAM SMMU driver.

So, schedule tasklet for triggering page fault handler of all
registered clients.

Change-Id: I7fbe520f7e27c9a4f4917cd259f138c64ee76e78
Signed-off-by: Seemanta Dutta <seemanta@codeaurora.org>
2016-03-23 21:16:49 -07:00
Seemanta Dutta
827818e566 msm: cam_smmu: Fix page fault handler to return proper error code
A recent change in the ARM SMMU driver expects either a 0 or an
-EBUSY from any of the registered page fault handlers. Otherwise
it will assume the page fault unhandled and trigger a fatal crash.
So unless the various context bank page fault handlers are updated
to return either a 0 or an -EBUSY, each page fault will trigger a
fatal crash. This will make debugging the underlying problem
causing the page fault in the first place, more difficult.

So fix the page fault handler to return proper error code so that
ARM SMMU driver does not consider the page fault unhandled and the
device does not crash.

Change-Id: I1f1cab324d6ee89400cd7006758a906244368472
Signed-off-by: Seemanta Dutta <seemanta@codeaurora.org>
2016-03-23 21:16:49 -07:00
Skylar Chang
ab2c622d0b msm: gsi: mask GSI_BREAK_POINT
SW should not be registered for GSI_BREAK_POINT interrupt as
this is for debug purpose only

Change-Id: I17d152955bb52bccc89ff731eabe05582b7fd14c
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2016-03-23 21:16:48 -07:00
Laxminath Kasam
83f4c5c049 ASoC: wsa881x-analog: move error prints to debug for wsa
For each successful wsa read and write, we are printing the
values. Moving the print to debug.

Change-Id: I1b5c6b345b1d967d43f26bd9b1d4731d02ad021c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2016-03-23 21:16:47 -07:00
Vinayak Menon
df756d1f8b mm: zcache: reduce prints on store error
zcache store can fail on lowmemory conditions.
Do not throw unnecessary prints on such events, causing
a stall.

Change-Id: I8fba6938f75ef5b6054ee079951b7409279e1c02
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2016-03-23 21:16:46 -07:00
Vinayak Menon
a360ae6982 mm: zcache: fix race between store and evict
The following race is possible:

CPU 1				CPU2
zcache_store_page
zbud_alloc
				zcache_evict_zpage
				zpool = zhandle->zpool;
				CRASH

zcache_store_page
zhandle->zpool = zpool

Fix this by properly initializing the zhandle and validating
in zcache_evict_zpage

Change-Id: I02328220b30f415fa1f171236eab3a2e40072fd9
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2016-03-23 21:16:45 -07:00
Siddartha Mohanadoss
862365f793 ARM: dts: msm: Update TSENS to use msmcobalt
MSM Cobalt TSENS can support upto 22 temperature
sensors across two controllers. Use explicity
the msmcobalt to specify changes to the controller
usage such as enabling health monitor check.

Change-Id: I6e0d600e9fe88cc2d835ad051eede4efcbee9563
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2016-03-23 21:16:44 -07:00
Siddartha Mohanadoss
193773678c thermal: tsens: Add Cobalt TSENS support
MSM Cobalt TSENS supports upto 22 temperature
sensors across two TSENS controllers. Thermal
clients have the ability to set temperature
threshold and receive notification on a threshold
crossing.

Change-Id: I05d6f7cfceece6c27ef5d03b9ea3b77d409108db
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2016-03-23 21:16:43 -07:00
Mohit Aggarwal
c6bdc8ad87 diag: Fix possible buffer overflow
Currently, while updating the real time vote
there is a possibility that index will go beyond
the array size which will lead to buffer overflow.
This patch rectifies the index checking to avoid
possible buffer overflow.

Change-Id: I71fa3698eacdcb2933dc388ca8571bb6f952becc
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
2016-03-23 21:16:43 -07:00
Kai Liu
09c8b9e190 cnss: sdio: Define OOB interrupt interfaces.
Define the OOB interrupt interfaces in case that internal
interrupt is unsupported in some platforms.
In some specific platform, only polling mode is supported, with
these OOB interrupt interfaces implementation, it will support
interrupt mode.
To be generic, this OOB feature is default unsupported.

Change-Id: I3b38e59bd7fdb441c85eb82a79cf9c951ca32130
CRs-Fixed: 937303
Signed-off-by: Kai Liu <kaliu@codeaurora.org>
2016-03-23 21:16:42 -07:00
Tony Truong
dac841cd75 msm: pcie: add support to modify the Cpl timeout for RC
Add support to modify the completion timeout range for
the root complex. This value/range will inform when
the root complex should send out a completion if the
endpoint does not respond.

Change-Id: Iabca3f637d9abf6c93810c84d81ff6b5c77d4528
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-23 21:16:41 -07:00
Yue Ma
37311842a0 cnss: Vote for the WLAN antenna switch regulator
In some targets, explicitly turning on/off the regulator for WLAN
antenna switch is needed to enable/dsiable antenna sharing capacity.
Hence add the change to achieve this based on device tree option.

Change-Id: Ic04019cbe9c42bc92a65f308f56f307c52346d92
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2016-03-23 21:16:40 -07:00
Chris Lew
5c2eccfd17 diag: Change dci packet header validation for data from user space
DCI packet header validation fails when there are multiple masks
enabled in the packet type. Change the validation from comparing
each individual mask to the bitwise OR of all packet types.

Change-Id: Ie0131646f49a93ec85bd1ae5e02b89639f0cfc2c
Signed-off-by: Chris Lew <clew@codeaurora.org>
2016-03-23 21:16:39 -07:00
Sreelakshmi Gownipalli
bed8615856 diag: Set the diag stm status correctly
While processing the diag stm mask stm state is set
incorrectly even though the ctrl packet is sent to peripheral
successfully.

Change-Id: I594f97ab824bf161b98fd5ac722ea96b985dbf9c
Signed-off-by: Sreelakshmi Gownipalli <sgownipa@codeaurora.org>
2016-03-23 21:16:38 -07:00
Subbaraman Narayanamurthy
416b5612b7 ARM: dts: msm: reduce flash ramp rate for PMI8996
Currently, the flash_led device for PMI8994/8996 has a step up
and step down ramp rate of 6.7uS. For PMI8996, reduce it to 27uS
as per the systems team recommendation.

CRs-Fixed: 948392
Change-Id: I787916470a2ce6dda079259f60eda3ea50f0fa17
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-03-23 21:16:38 -07:00
Srinivas Rao L
127a7e639d Revert "soc: qcom: rpm-smd: Account for NOACK messages during system sleep"
This reverts commit e37ff31b0476 ("soc: qcom: rpm-smd: Account for NOACK
messages during system sleep")'.

Change-Id: If35cd5fe6bc94510125b828af2b260cebd5fbcd7
Signed-off-by: Srinivas Rao L <lsrao@codeaurora.org>
2016-03-23 21:16:37 -07:00
Srinivas Rao L
336e5a0aca Revert "soc: qcom: rpm-smd: free NOACK messages upon receipt"
This reverts 'commit 16c0ee5cbe95 ("soc: qcom: rpm-smd: free NOACK
messages upon receipt")'

Change-Id: I9dcf6ba8ae1c6d39642d282901408b6fb8fa43af
Signed-off-by: Srinivas Rao L <lsrao@codeaurora.org>
2016-03-23 21:16:36 -07:00
Bhalchandra Gajare
b5f150167a mfd: wcd9xxx: Make DMIC clock drive strength platform dependent
Digital microphone clock drive strength setting in the codec could
be platform dependent based on the type of microphone, etc. Add support
to make the DMIC clock drive strength configurable through device tree.

CRs-fixed: 938006
Change-Id: I8b17d985052098b56d012081a77b6dfc94553eca
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-03-23 21:16:35 -07:00
Bhalchandra Gajare
ccac8bdb00 ASoC: wcd_cpe: Fix message queue list corruption
When clients are trying to send message while the worker thread is
processing existing messages, there is possibility that the message
queue can get corrupted. This can result into kernel crash. Fix to make
sure the message queue does not get corrupted.

CRs-fixed: 951194
Change-Id: I1eb5232d9d079ecc9d28b95737333c1198a8b20c
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-03-23 21:16:34 -07:00
Siddartha Mohanadoss
596b0f8e91 ARM: dts: msm: Add temperature sensor support for MSMCOBALT
Support thermal clients to read die temperature from the
temperature sensors. MSM Cobalt TSENS supports upto 22
temperature sensors across two TSENS controllers. Thermal
client has the ability to set temperature threshold and
receive notification on a threshold crossing.

Change-Id: I30ed627567643e014fae588f43c4f8945cf6165b
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2016-03-23 21:16:33 -07:00
Mahesh Sivasubramanian
71c79b78ab soc: qcom: rpm: Change driver memory allocation to use GFP_NOFS
When a filesystem driver calls into  makes a RPM request, RPM driver
makes a kzalloc request with GFP_KERNEL flag. This results in a deadlock
if a driver waiting on IO completion sends a RPM message.

Change memory allocation in the RPM driver to use GFP_NOFS.

Change-Id: Ic10b4d45ee9097c419d39b48b3aef6d3b41045e6
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
2016-03-23 21:16:32 -07:00
Jordan Crouse
531fca9ffc msm: kgsl: Move global pagetable entries to the IOMMU driver
Global pagetable entries are exclusively for IOMMU and per-process
pagetables.  Move all the code out of the generic driver and into
the IOMMU driver and clean up a bunch of stuff along the way.

Change-Id: Ic0dedbadbb368bb2a289ba4393f729d7e6066a17
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-03-23 21:16:32 -07:00
Jordan Crouse
7359adc0bf msm: kgsl: Move setstate to the IOMMU initialization
The setstate memory is a IOMMU specific construct.  Move it to the
IOMMU code where it belongs.

Change-Id: Ic0dedbada977f2861f7c1300a5365da5b09d70a9
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-03-23 21:16:31 -07:00
Jeevan Shriram
ca2aa87713 UM: x86_64: add defconfig file for UML on x86_64
Add defconfig file for compiling UML build on x86_64
architecture.

Change-Id: I84746ce766c0f1032ec33eb5ea16a7fb5dfa3de9
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2016-03-23 21:16:30 -07:00
Puja Gupta
7f92517015 ARM: dts: msm: Enable memory clamps during MSS restart for MSM8996
This enables assertion of QDSP6 I/O, memory wordline and compiler memory
clamps during MSS restart for MSM8996.

CRs-Fixed: 949533
Change-Id: Icae60cc08ec23104817394bd20e03d87740a0da8
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
2016-03-23 21:16:29 -07:00
Siddharth Zaveri
e129418937 ARM: dts: msm: Remove HPD pin for ADV7533 on Agave Board
Remove the HPD pin assignment for ADV7533 as it is connected
to GPIO on the Agave peripheral board.

Change-Id: Iccdbb1c6dece5cf8a60d0bc79b86a161b188184b
Signed-off-by: Siddharth Zaveri <szaveri@codeaurora.org>
2016-03-23 21:16:28 -07:00
Alex Yakavenka
d758a30848 can: Add multi-channel support to RH850
RH850 can support 4 channels.

Change-Id: Iacba77fbec7d8952c94b8cdff0efd66669c52e63
Signed-off-by: Alex Yakavenka <ayakav@codeaurora.org>
2016-03-23 21:16:27 -07:00
Komal Seelam
ea047b82ec cnss-sdio: Dynamically allocate ramdump memory
Existing solution to reserve the memory region for CNSS ramdump
collection has it's own limitations because of reserving the
memory region for each platforms even before CNSS driver is
probed. Add implementation to allocate the required memory for
CNSS ramdump using dma_alloc_coherent API and update the physical
address in dump table so that tools can find the starting address
of the CNSS ramdump in the crash dump.

Change-Id: I9fb3d77fdd35de54ca2a7a27d4a55bd12049311f
Signed-off-by: Komal Seelam <kseelam@codeaurora.org>
CRs-Fixed: 957203
2016-03-23 21:16:27 -07:00