msm: audio: qdsp6v2: Zero the cfg stack var

Write zeroes into the stack variable cfg to ensure
no previously written stack data is sent to
user-space.

Change-Id: Iea124d2528ed56d93e2a000027ff8bc30414d3fd
CRs-Fixed: 551574
Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
usb: gadget: u_bam: Enable zero length packet for tx transfers

Avoid packet re-transmission/drop by sending zero length packet
when usb transfer is multiple of usb endpoint max packet size.

CRs-Fixed: 494184
Change-Id: I01c9f9be41d3b64760e9bc08ec82ef8b6cc1a80f
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
ARM: Use -mcpu=cortex-a15 when targeting MSM Krait CPUs

Enable compiler optimizations specific to the Cortex-A15
processor when targeting MSM Krait CPUs. This is necessary
take advantage of the UDIV/SDIV instructions supported by
these processors. To accomplish this, we need to remove the
-march=armv7-a ISA restriction from the compiler options
because 'cortex-a15' is a superset of 'armv7-a'.

Change-Id: I6215aecc11fb4f77c971de7b84f68649ef234357
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
msm: kgsl: Make use of performance counter for A2xx.

Add new performance counter for a2xx to track number
of ALU instructions executed. This will help fault tolerance
detection logic to get more accurate data about the GPU.

Change-Id: I4a1afcfa12fd55a8ca1c4827f1fa7ee8e322e9c5
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
msm: vidc: Validate userspace buffer count before using it

Validate the number of buffers count variable before
using it to avoid structure overflow error.

Change-Id: I61582c93e0f26ec6842e437134fb8a42bdbc36ff
CRs-fixed: 563654
Signed-off-by: Pachika, Vikas Reddy <vpachi@codeaurora.org>
msm: vidc: Validate userspace buffer count

Makesure the number of buffers count is less than
the maximum limit to avoid structure overflow errors.

Change-Id: Icf3850de36325637ae43ac95f1c8f0f63e201d31
CRs-fixed: 563694
Signed-off-by: Pachika, Vikas Reddy <vpachi@codeaurora.org>
msm: audio: qdsp6v2: Change acdb_mmap size variable to unsigned

The acdb_mmap fuction does a size calculation but
stores the result in an int which makes negitive
numbers possible. Changing the variable to unsigned
ensures that the size used is never out of bounds.

Change-Id: I78714044594310a4411db1f50456e1294cf6ffce
CRs-fixed: 548145
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
ASoC: msm: qdsp6v2: Fix buffer overflow in voice driver

Userspace registers calibration data with acdb driver
through ioctls. Voice driver registers the calibration
data with CVD by querying acdb data from acdb driver and
copies the calibration data in apr message.

The size of the calibration data can be controlled by userspace
and can result in buffer overflow if the calibration size is
greater than the destination buffer size.
Reject acdb data if the size is greater than the size of
destination buffer.

Change-Id: I1b495390d67907afc608ed8233bf916777d38e11
CRs-fixed: 548872
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
Merge "msm: audio: qdsp6v2: Zero the cfg stack var"
Merge "msm: audio: qdsp6v2: Change acdb_mmap size variable to unsigned"
Merge "ASoC: msm: qdsp6v2: Fix buffer overflow in voice driver"
msm: mdm2: Add delay between subsequent PS_HOLD for 8930

This feature was previously added for the 8960 sglte target,
in commit 21274cf2219899ef9b46cf8b9fd8bf4ce52d057b, but it also
applies to the 8930 SGLTE target. The original commit message
follows.

During SSR first a reset of external modem is issued
and mdm_do_soft_power_on() toggles ap2mdm_soft_reset which
in turn toogles the PS_HOLD. Then a part of SSR external
modem is powered up and mdm_do_soft_power_on() again toggles
the gpio. For PMIC register stabilization we need a 1sec delay
between subsequent mdm_do_soft_power_on().
By default the delay is 500msec, so adding another 500msec for
stablization.

Change-Id: Ie114ebf0102dcfe071763add9028f09d07526f61
Signed-off-by: Ramesh Gupta Guntha <rggupt@codeaurora.org>
Merge "msm: kgsl: Make use of performance counter for A2xx."
Merge "msm: mdm2: Add delay between subsequent PS_HOLD for 8930"
Merge "ARM: Use -mcpu=cortex-a15 when targeting MSM Krait CPUs"
Merge "msm: vidc: Validate userspace buffer count"
Merge "msm: vidc: Validate userspace buffer count before using it"
Revert "msm: kgsl: Make use of performance counter for A2xx."

This reverts commit 3493b669c765dd6a461c6abc179d8168589c03c4

Change-Id: Ic388f1c721e1326dca5b6ef8cb0b3310271b1225
Merge "Revert "msm: kgsl: Make use of performance counter for A2xx.""
Merge "usb: gadget: u_bam: Enable zero length packet for tx transfers"