Commit graph

568873 commits

Author SHA1 Message Date
Deepak Katragadda
fd2f6e135a clk: msm: clock: Keep the graphics clock peripheral memory always on
Due to an issue with the RBBM perf counter being corrupted after
NAP state, force turn on the gfx3d_clk peripheral memory at probe
and leave it enabled.

CRs-Fixed: 933216
Change-Id: I707b44c56e5e6d3ec9056dded9fe488163be276c
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2016-03-23 21:19:39 -07:00
Deepak Katragadda
20c5a70a25 clk: msm: clock-gpu-cobalt: Add the CRC programming sequence
The clock ramp controller helps in mitigating PDN droop during
low power use cases. Add the sequence to enable it in the clock
driver.

CRs-Fixed: 942848
Change-Id: Ia9afcd6492ddb38e3371a469c15ea07143c3c358
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2016-03-23 21:19:38 -07:00
Laxminath Kasam
73f564a2c2 Revert "ASoC: wcd-mbhc: Fix plug removal detection from extension cable"
This reverts commit 099e839e730b89630404bfc9a375049ac01b8f93 ("ASoC:
wcd-mbhc: Fix plug removal detection from extension cable")'.
Headset insertion is giving spurious electrical insertion removal
interrupts. Hence headset is not detected properly. This is seen on
RCM devices for normal US headset on 8937/msmgold/msmtitanium. On MTP
some specific headsets are exhibiting this behavior.

Change-Id: Ida016cc29950dabcaaf6bfc1b751e77e3cccd20c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2016-03-23 21:19:37 -07:00
Sarada Prasanna Garnayak
ac0f3e75de net: cnss_sdio: add PM QoS support in cnss sdio platform driver
To improve the wlan throughput add power management quality
of service support in cnss sdio platform driver. The cnss sdio
platform driver export PM QoS API to wlan host driver.

CRs-Fixed: 970872
Change-Id: Idcea4cde74b280b26706be1bd88b822de80c0ff3
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
2016-03-23 21:19:36 -07:00
Prakash Kamliya
f087bb3d9a msm: kgsl: Avoid L2PC on masked CPUs
If any of the Graphics rendering threads are running
on masked CPUs, avoid L2PC for some duration on that
CPU. This reduces latency on CPU (latency mainly
because of L2 cache flush) and helps on performance.
This change uses pm_qos_update_request_timeout() API.

Add l2pc-cpu-mask property in device tree to enable
this.

CRs-Fixed: 962598
Change-Id: If90090cd2c68ea7c07e269723931fef7201ef136
Signed-off-by: Prakash Kamliya <pkamliya@codeaurora.org>
2016-03-23 21:19:35 -07:00
Manoj Prabhu B
9b63383c0a ARM: dts: msm: Add memshare for msm8996
Memshare driver allocates and share the memory with the clients
sitting on modem so that they can use it. Add device tree
information for memshare driver for msm8996.

CRs-Fixed: 970173
Change-Id: Ib93a9d60fc4a22f0755cecb6ff3ea8e2457d2d28
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
2016-03-23 21:19:35 -07:00
Manoj Prabhu B
1c00b9fb2d memshare: Add support for hypervisor mapping
This patch adds support for the hyp call to set up permissions
for the memory allocated for the modem clients.
This patch also identifies the debug messages with memshare
driver.

CRs-Fixed: 970173
Change-Id: I862a3c21eb4f791d5c7d93d4fb523bf8714c20cb
Signed-off-by: Katish Paran <kparan@codeaurora.org>
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
2016-03-23 21:19:34 -07:00
Taniya Das
71910a2a13 clk: msm: clock-generic: Fix max_div calculation for 32 bit
The ULONG_MAX value on 32 bit compilers is +4,294,967,295 and when divided
with some high frequencies, it could lead to min_div > max_div. Thus
resulting in clk_set_rate failure for higher frequencies.

CRs-Fixed: 971371
Change-Id: Id982328aeadf24d29e295e042a57453ea4e35c1b
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-03-23 21:19:33 -07:00
Suman Tatiraju
938ef7a4ac ARM: dts: msm: Update GPU pwrlevel table for MSM8996pro
Add GPU frequency and bandwidth support for MSM8996pro.

CRs-Fixed: 967494
Change-Id: I8c754d23abeb5b496e62a9cf2c574afcfbd091ed
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
2016-03-23 21:19:32 -07:00
Yue Ma
9a17863050 cnss: Update prealloc memory table
The memory size of a slot in the prealloc table should be order of 2,
otherwise some memory will be wasted since kernel only allocates
contiguous physical memory in pages by order of 2.

Change-Id: I762ad490d300f8b622a3ed1f9ccbe2af2d926c49
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2016-03-23 21:19:31 -07:00
Yue Ma
bf7f76cbc5 cnss: Fix a boundary check bug in cnss prealloc driver
Currently the driver gives a memory slot only if its size is greater
than the memory requested by the caller. This will waste a bigger slot
if the memory requested is equal to the slot size. Hence fix it by
adding the equal check when a memory slot is requested.

Change-Id: Ib48477607e9332c8942894301ead606a31fa3284
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2016-03-23 21:19:30 -07:00
Sanrio Alvares
3060a9aac4 ARM: dts: msm: fix version of MSM8996pro
fix version of MSM8996pro to V1

CRs-Fixed: 971276

Change-Id: Id5392aeffeab557f5141f4efd0e8b55bbfe63127
Signed-off-by: Sanrio Alvares <salvares@codeaurora.org>
2016-03-23 21:19:29 -07:00
Rajesh Bondugula
b15dc12577 msm: camera: sensor: I2C poll implementation
Remove additional delay after poll.
Delay in ms is acounted during polling the register.
If read is successful and match fails,
then poll is non-fatal.

CRs-Fixed: 971014
Change-Id: I655a272bed125edc2dc60504640f1d57652a64e2
Signed-off-by: Rajesh Bondugula <rajeshb@codeaurora.org>
2016-03-23 21:19:29 -07:00
Sudheer Papothi
db36660f6c soundwire: Fix NULL pointer check while setting group ID
Fix NULL pointer check while setting group ID to avoid
dereferening of the pointer.

CRs-Fixed: 971240
Change-Id: Ic5aae901244e7b2b96a894d265a6cc5c119f0367
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 21:19:28 -07:00
Deepak Katragadda
6880b76660 ARM: dts: msm: Enable the linux clock drivers on MSMCOBALT RUMI
Remove the over-rides in place for the clock drivers in order
to enable them on RUMI for MSMCOBALT.

CRs-Fixed: 971162
Change-Id: I5a0e1b8e74f70cadf303694c4c279dd9224e8ec7
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2016-03-23 21:19:27 -07:00
Carter Cooper
131ebe3509 msm: kgsl: Use one define for max priority levels
Don't redefine the macro since that could result in inconsistent
data if one of them changes and the isn't updated.

CRs-Fixed: 971159
Change-Id: I57ab3113fbdd82c70cba1c79f4b996cea09a8739
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
2016-03-23 21:19:26 -07:00
Carter Cooper
56c4af29d5 msm: kgsl: Move A3XX specific ringbuffer init out of common init
CP_QUEUE_THRESHOLDS is only used in A3XX. Move the register setting
out of common ringbuffer initialization and into A3XX specific region.

CRs-Fixed: 971153
Change-Id: I05ef504a802534f1582e62085c5b12b20ac57209
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
2016-03-23 21:19:25 -07:00
Carter Cooper
7aa00595d9 msm: kgsl: Rate limit all logs from the interrupt handler
Ensure that all the logs that can be triggered from the
interrupt handler are rate limited.

CRs-Fixed: 971145
Change-Id: I9fe4a6b28be0dc6299467fb8402bef3694aeac76
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
2016-03-23 21:19:24 -07:00
Srinivas Rao L
07314e73b3 cpuidle: lpm-levels: Remove local_irq_enable from lpm_cpuidle_select
Remove enabling of interrupts in lpm_cpuidle_select in case of
no low power mode selected as it is taken care in cpuidle_idle_call.

Change-Id: Id9fabe6116908b4c64bd6659d02252684db10958
Signed-off-by: Srinivas Rao L <lsrao@codeaurora.org>
2016-03-23 21:19:23 -07:00
Abhishek Kondaveeti
5f825416fb msm: isp: Use recommended ab and ib values for isp
Use recommended ab and ib settings for isp to ensure
isp requests required bandwidth

CRs-Fixed: 943154

Change-Id: I871854e059963bf64665201fb9ea7d99861ebe8c
Signed-off-by: Abhishek Kondaveeti <akondave@codeaurora.org>
2016-03-23 21:19:23 -07:00
Patrick Lai
45f43cddf9 ASoC: msm: qdsp6v2: move adsp_err to c source file
In preparation to add more debugging hooks to LPASS driver, convert
adsp error code and string conversion functions to C source file.

CRs-fixed: 968775
Change-Id: Ic074a318ede4188a8fd603efddce71ed820ee560
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 21:19:22 -07:00
Jordan Crouse
47c274395a msm: kgsl: Correct protected mode range for 5XX UCHE registers
The start offset for protected mode ranges needs to be aligned with
the block size.  0xE87 is not aligned with 16 (1 << 4). The hardware
assumes alignment internally so it turns out that 0xE80 - 0xE8F is
the range that gets protected.  Luckily for us that this is the range
we want protected so nothing critical has been left unprotected, but
the software should reflect the hardware to prevent incorrect
assumptions.

CRs-Fixed: 968713
Change-Id: Ic0dedbad6ec7be5cc473afbbc52655663ea65159
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-03-23 21:19:21 -07:00
Jordan Crouse
a139a9b605 msm: kgsl: Tweek LLM sleep/wake algorithm
In the LLM sleep sequence, the IDLE_FULL_LM bit (0) needs to be set
to force the children to sleep.  Also, after the first child is
put to sleep, we need to wait for the idle acknowledgment before
taking the next child down.

In the wake sequence, poll until WAKEUP_ACK is 1 *and* IDLE_FULL_ACK
is 0 to ensure that the wake sequence was successful.

CRs-Fixed: 970270
Change-Id: Ic0dedbadfca1e0882d84965d634166f921f1e630
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-03-23 21:19:20 -07:00
Jordan Crouse
d4a7e95db8 msm: kgsl: Refactor MMU/IOMMU support
The current MMU code assumes a binary state - either there is a
IOMMU or there isn't. This precludes other memory models and
makes for a lot of inherent IOMMU knowledge in the generic MMU
code and the rest of the driver.  Reorganize and cleanup the
MMU and IOMMU code:

 * Add a Kconfig boolean dependent on  ARM and/or MSM SMMU support.
 * Make "nommu" mode an actual MMU subtype and figure out available
   MMU subtypes at probe time.
 * Move IOMMU device tree parsing to the IOMMU code.
 * Move the MMU subtype private structures into struct kgsl_mmu.
 * Move adreno_iommu specific functions out of other generic
   adreno code.
 * Move A4XX specific preemption code out of the ringbuffer code.

CRs-Fixed: 970264
Change-Id: Ic0dedbad1293a1d129b7c4ed1105d684ca84d97f
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-03-23 21:19:19 -07:00
Venkata Narendra Kumar Gutta
9c8d55382c ASoC: msm: qdsp6v2: Add support for SENARY_MI2S_TX port
Add support for SENARY_MI2S_TX port to enable FBSP.
This port is configured to send VI feedback data from
WSA to ADSP during FBSP.

Change-Id: I4fb1beb7bfedbe513ba43a69e67fbcc815d34595
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
2016-03-23 21:19:18 -07:00
Vinayak Menon
3f9a50da4d of: alloc anywhere from memblock if range not specified
early_init_dt_alloc_reserved_memory_arch passes end as 0 to
__memblock_alloc_base, when limits are not specified. But
__memblock_alloc_base takes end value of 0 as MEMBLOCK_ALLOC_ACCESSIBLE
and limits the end to memblock.current_limit. This results in regions
never being placed in HIGHMEM area, for e.g. CMA.
Let __memblock_alloc_base allocate from anywhere in memory if limits are
not specified.

Change-Id: Ifca54781b4b2ae2ccd0a3d414a488c8888d4472f
CRs-fixed: 969426
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2016-03-23 21:19:17 -07:00
Anirudh Ghayal
808f8a8d08 gpio: qpnp-pin: Fix compilation error on enabling the debug option
Fix the incorrect mask/shift values specified for 'dtest-sel'
debugfs entry.

Also, add a special handling to enable/disable dtest-sel via
debugfs.
echo 0 > /d/qpnp_pin/pm8xxx_gpio/dtest-sel to disable DTEST
echo 1...4 > /d/qpnp_pin/pm8xxx_gpio/dtest-sel to enable and select DTEST

CRs-Fixed: 970023
Change-Id: I51e9af5d71bbf8b9b9023f6f3d747550e0fab0fa
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2016-03-23 21:19:17 -07:00
Ravinder Konka
3319385988 net: core: Send only BIND and LISTEN events.
Currently DPM is listening for all netlink events
and there is battery drain because of that. Since,
DPM is interested only in BIND and LISTEN events,
changes are to process only BIND and LSTEN events
and skip the rest for the sockev client.

CRs-Fixed: 945890
Change-Id: Iae11027945b981538f9c16ae9d5cd1ecf88a3743
Signed-off-by: Susheel Yadagiri <syadagir@codeaurora.org>
Signed-off-by: Ravinder Konka <rkonka@codeaurora.org>
2016-03-23 21:19:16 -07:00
Avaneesh Kumar Dwivedi
41d630980d soc: qcom: sysmon: Enable back MSM_SYSMON_COMM interface support
MSM_SYSMON_GLINK_COMM is currently enabled for all targets which breaks
few existing targets, which do not support GLINK protocol and therefore
are still dependent on MSM_SYSMON_COMM support. Enable back sysmon
communication over SMD interface to preserve backward compatibility
until all targets support GLINK.

Change-Id: I06b6c8cd9c079494998463bbf30e27ad224d7124
Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
2016-03-23 21:19:15 -07:00
Sanrio Alvares
1f7d497b0a arm64: fpsimd: add support to enable/disable fpsimd_settings.
Add support to enable/disable fpsimd_settings at runtime through
kernel command line.

fpsimd.fpsimd_settings=0 should disable it.

Change-Id: I14bf5f20e36ec4547aad45382cfffc91666a2ff4
Signed-off-by: Sanrio Alvares <salvares@codeaurora.org>
2016-03-23 21:19:14 -07:00
Veera Sundaram Sankaran
d444053499 ARM: dts: msm: add sharp dsc 4k video panel support for msm8996
Add sharp 4k dsc video mode panel configs and enable it for
msm8996 mtp, cdp and fluid.

CRs-Fixed: 969555
Change-Id: I0571328504b9464089b9e32f8b82eb3a783a047b
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2016-03-23 21:19:13 -07:00
Mohit Aggarwal
30e8985110 diag: dci: Add protection while de-initializing clients
Currently, while de-initializing dci clients, there is
a possibility to access stale entries. This patch fixes
this issue by adding proper protection mechanism.

CRs-Fixed: 960958 968445
Change-Id: I829c9497eeb356662a6531592c66108e615ce6e4
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
2016-03-23 21:19:12 -07:00
Vinayak Menon
91212fa8e0 mm: zcache: fix use after free in zcache_store_page
There is a chance of zbud handle being used after a free.
Unable to handle kernel paging request at virtual address ffffffc05be72040
PC is at zcache_store_page+0x59c/0x618
LR is at zcache_store_page+0x59c/0x618
[<ffffffc00019c99c>] zcache_store_page+0x59c/0x618
[<ffffffc0001a70c4>] __cleancache_put_page+0x94/0xcc
[<ffffffc00015da4c>] __delete_from_page_cache+0xc0/0x2cc
[<ffffffc00016d230>] __remove_mapping+0xe4/0x128
[<ffffffc00016e750>] shrink_page_list+0x634/0x95c
[<ffffffc00016f32c>] shrink_inactive_list+0x41c/0x67c
[<ffffffc00016fc14>] shrink_lruvec+0x364/0x510
[<ffffffc00016fe10>] shrink_zone+0x50/0x12c
[<ffffffc000170278>] try_to_free_pages+0x38c/0x56c
[<ffffffc000164e4c>] __alloc_pages_nodemask+0x5e0/0x994
[<ffffffc000165214>] __get_free_pages+0x14/0x60

CRs-Fixed: 968859
Change-Id: I24f6cf8ccbac956d4c3114e70a9f94f5e3bfa1c8
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2016-03-23 21:19:12 -07:00
Lakshmi Narayana Kalavala
f4066d1c08 msm: jpegdma: Changes to adapt jpeg dma driver to soc layer
Adapt JPEG DMA driver to SOC layer by replacing the msm specific
routines with SOC API which eases the portability of driver
on to non-msm platforms.

CRs-Fixed: 968483
Change-Id: I2738062ef11b64acb0501694ce4e35c26766d8a1
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2016-03-23 21:19:11 -07:00
Lakshmi Narayana Kalavala
913fe13cb4 msm: jpeg: Changes to adapt jpeg driver to soc layer
Adapt JPEG driver to SOC layer by replacing the msm specific
routines with SOC API which eases the portability of jpeg driver
on to non-msm platforms.

CRs-Fixed: 968483
Change-Id: I8436604e8fd0984f1cd31ce99035dd55a33e89f3
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2016-03-23 21:19:10 -07:00
Lakshmi Narayana Kalavala
8babbee5c2 msm: camera: fd: Changes to adapt fd driver to soc layer
Adapt fd driver to SOC layer by replacing the msm specific
routines with SOC API which eases the portability of fd driver
on to non-msm platforms.

CRs-Fixed: 968483
Change-Id: Iadce8d1b62b81b000957bc482dd60547937cf5c1
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2016-03-23 21:19:09 -07:00
Lakshmi Narayana Kalavala
7ad3f497bb ARM: dts: msm: Add bus vectors in jpeg and fd nodes for msm8996 MTP
The bus vectors are statically setup in jpeg and fd driver which is not
portable on non-msm platforms. Hence add the vectors in dtsi node
where the vectors can be setup with the bus routine
msm_bus_cl_get_pdata dynamically.

CRs-Fixed: 968483
Change-Id: I50c81a6c5daafe02645b074525eb3c026b85d3bb
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2016-03-23 21:19:08 -07:00
Subbaraman Narayanamurthy
a4d7241345 ARM: dts: msm: enable learning feedback for PMI8994/8996 FG
Capacity learning is already enabled for PMI8994/8996 to run
the battery aging algorithm. Learning feedback is needed to
run that algorithm with providing feedback across multiple
resets. Enable it.

CRs-Fixed: 968756
Change-Id: Id6596a94f125f113c919c0bea107582165da2f90
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-03-23 21:19:07 -07:00
Deepak Katragadda
40b1c67f41 clk: msm: clock: Enable auto-calibration during certain LPM mode paths
Add settings to switch to always-on clock source during certain
LPM mode exit paths on msm8996 Pro.

CRs-Fixed: 968587
Change-Id: I6138681e2a85b7d1ad11350718544de6abe38131
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2016-03-23 21:19:06 -07:00
Subbaraman Narayanamurthy
51b3c946d8 ARM: dts: msm: Support boards with only PM8994 PMIC for msm8996
Some MSM8996 boards will employ the PM8994 PMIC alone. Introduce
msm8996-pm8994.dtsi which allows only the use of peripherals
available under PM8994.

CRs-Fixed: 968575
Change-Id: I4ce7c5ade7f81f49cecb2cd458c9044489ea1132
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-03-23 21:19:06 -07:00
Rajesh Kemisetti
721a66e665 msm: kgsl: Declare platform_bus_type as secure for ARM driver
ARM driver supports only one bus for all context banks.

In some cases, hypervisor may not be available and GPU SMMU
uses ARM driver. This will make all context banks are on
non secure bus and kgsl_mmu_bus_secured() returns -EPERM.

Make platform_bus_type as secure for ARM driver.

Change-Id: I11a637ca2b1ef29cc42c9811cad009312a2879cd
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
2016-03-23 21:19:05 -07:00
Vinayak Menon
ad6f486284 mm: swap: swap ratio support
Add support to receive a static ratio from userspace to
divide the swap pages between ZRAM and disk based swap
devices. The existing infrastructure allows to keep
same priority for multiple swap devices, which results
in round robin distribution of pages. With this patch,
the ratio can be defined.

CRs-fixed: 968416
Change-Id: I54f54489db84cabb206569dd62d61a8a7a898991
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2016-03-23 21:19:04 -07:00
Mallikarjuna Reddy Amireddy
1506b57673 qseecom: Get appsbl qseecom load status from bootargs
App region notification has to be sent only once, if appsbl
has already sent then kernel should not send.

Change-Id: Ie1c7bb78be30c723fef6d9b89d488fdac36bc07f
Signed-off-by: Mallikarjuna Reddy Amireddy <mamire@codeaurora.org>
2016-03-23 21:19:03 -07:00
Arun Kumar Neelakantam
6182fb00ae net: ipc_router: fix leak of kernel memory to userspace
The service info structure is allocated with uninitialized memory for the
max number of services and returns the complete structure to the usersapce
resulting in the information leak if lookup operation finds less number of
services than the requested number.

Check the minimum of requested and available services and copy the minimum
information to the user-space.

CRs-Fixed: 965934
Change-Id: Ic97f875855fdc6440c1db1d8d0338ee8b03a9d0a
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2016-03-23 21:19:02 -07:00
Tingting Yang
77f8a75933 msm: move printk out of spin lock low_water_lock
cpu3 stuck in printk more time in spin lock low_water_lock cause cpu0
get spin lock fail and system crashed.

CRs-Fixed: 521570
Change-Id: I75356a4b4171ae2888ce6cce792f569b5ca8cdcf
Signed-off-by: Tingting Yang <tingting@codeaurora.org>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
2016-03-23 21:19:01 -07:00
Mohit Aggarwal
47dd56f65e diag: Fix possible double free issue
Currently, on receiving the write completion
notification from USB, there is possibility of
double freeing the buffer. This patch takes care
of this issue.

CRs-Fixed: 967601
Change-Id: I1207e0c3f103fa9dec6d766621aec8ccea62be69
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
2016-03-23 21:19:00 -07:00
Ajay Singh Parmar
6158a25192 msm: hdcp: proper state sanitization for different versions
The hdcp 2.2 module may or may not be loaded based on source
and sink capabilities. Some of the common functionalities with
hdcp 1.4 may be accessed by different modules depending on which
hdcp version is being used. Check for validity of internal data
structures and variables to guard hdcp functionalities against
illicit calls.

Change-Id: I1383ae77f0b904589bcab571c902b5e3eeef6efa
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-03-23 21:19:00 -07:00
Ravinder Konka
57483d074c net: Reset NAPI bit if IPI failed
During hotplug if an RPS CPU goes offline,
then there is a possibility that the IPI
delivery to the RPS core might fail, this
happens in the cases when unruly drivers
use netif_rx API in the wrong context.

This happens due to two reasons

a) Firstly using netif_rx API in non preemptive
context leads to enough latencies that the IPI
delivery might fail to an RPS core. This is because
the softIRQ trigger will become unpredictable.

b) by using netif_rx it  becomes an architectural
issue where we are trying to do two things in two
different contexts. We set the NAPI bit in context
and sent the IPI in other context. Now since the
context switch is allowed, the remote CPU is allowed
to go finish its hotplug.

If there was no context switch in the first place,
which typically happens by either using the correct
version of netif_rx or switching to NAPI framework,
then the remote CPU is not allowed to go to CPU DOWN
state. This is by design since hotplug framework causes
 the remote dying CPU to wait until atleast one context
switch happens on all other CPUS. If preemption is
disabled then the dying CPU has to wait until preemption
is enabled and a context switch happens.

This patch catches these unruly drivers and handles
IPI misses by clearing NAPI sate on remote RPS CPUs

Please refere here for more documentation on hotplug
and preemption cases https://lwn.net/Articles/569686/

CRs-Fixed: 966095
Change-Id: I072f91bdb4d7e444e3624e8e010ef1b66a67b1ed
Acked-by: Abhishek Chauhan <abchauha@qti.qualcomm.com>
Signed-off-by: Ravinder Konka <rkonka@codeaurora.org>
2016-03-23 21:18:59 -07:00
Ben Romberger
c0b53092e3 ASoC: msm: qdsp6v2: Correctly free ASM no wait queue
Remove improper deletion of list head and protect list
deletion with spinlock. Spinlock protects the list
from access in ADSP callback at the same time the
list is being deallocated.

Change-Id: I1b102cd99e7c80e1dfd4e2054b9ba7e0ca26d6a7
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
2016-03-23 21:18:58 -07:00
Ben Romberger
38ebaf2f95 ASoC: msm: qdsp6v2: Modify HW delay debug print
Change the HW delay debug print so it does not
seem like an error. Adds comments in the code
describing the HW delay feature.

Change-Id: I0955623a7bdb0f4180c908ba079cf6f900e496a5
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
2016-03-23 21:18:57 -07:00