msm: vidc: Return min buffer count in VIDIOC_REQBUFS.

- If stream triggers multiple port reconfigure events, number of
  buffers required for output plane incremented due to actual
  buffer count returned from video driver.
- Minbuffer count should be return when buffer requirement called.

Change-Id: I7dfd5077569316722027a6219217037a0021b567
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
msm: mdss: validate fb backlight inputs

Ensure backlight level is less than the max backlight
brightness and the backlight scaling factor is at most
1.

Change-Id: I424ed22af48ecae46371291fe88a114cf3fc7c31
CRs-Fixed: 516699
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
mmc: core: Enable multiple urgent requests notification

At the moment if the block layer issues an URGENT request notification
before receiving a complete on the URGENT request currently handled by
the device driver - the system crashes with a BUG_ON().
This change enables multiple block layer urgent request notification to
be handled by MMC layer by removing single notification enforcement.

CRs-fixed: 517724
Change-Id: Idfa410d0c2286146f8d58a38b5abd6886036317c
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
msm: mdss: copy gamut conf tables from kernel mem

Read the gamut config data from hardware into kernel's
memory and copy back to user space address using copy_to_user
API. This prevents MDP PP driver from writing directly into
userspace virtual address to copy gamut config data.

CRs-Fixed: 516720
Change-Id: Ib1f53e949696f7d4a45410c529fe9375c502090f
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
lib: spinlock_debug: increase spin dump timeout

On certain targets the worst case console buffer draining time can
exceed the aggressive spin dump timeout value. Relax the timeout value
to cater to these scenarios.

Change-Id: I7312ffe06bafd2dc7adf0f4e8b73a53fc5839235
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
ASoC: msm: Fix error recovery in register & deregister vol table

Modify the register & deregister volume table functions
in the voice driver so that no error is returned when
successful. Add error returns for cal reg & dereg
functions and improve error recovery.

Change-Id: I05d14c815cadebc064bee60aada0bf07588e4b6e
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
ARM: dts: msm-pma8084: Switch VADC to polling

Switch VADC to use polling mode to check if the
conversion request is complete by checking the status
bits for the corresponding VADC registers to
indicate the conversion is complete.

Change-Id: Ic5980b86a2fd567ce4a8ace18d9f15616e5b1b5c
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Merge "mmc: core: Enable multiple urgent requests notification"
Merge "lib: spinlock_debug: increase spin dump timeout"
msm: restart: add support for SPMI PMIC arbiter shutdown

Add a secure monitor call into the V2 restart and shutdown paths
which disables the SPMI PMIC arbiter immediately before the
PS_HOLD signal is lowered to restart or shutdown the target.
This feature is used to avoid PMIC SPMI lockups that occur on
certain PMIC chips if PS_HOLD is lowered in the middle of an
SPMI transaction.

Change-Id: I0d689cb99d6cc04879baa3dea05fa70cf00fb2ef
CRs-Fixed: 517979
Signed-off-by: David Collins <collinsd@codeaurora.org>
Merge commit 'c760308569734efc1ebc4fa3bddd98466189864f' into HEAD
Merge "Merge commit 'c760308569734efc1ebc4fa3bddd98466189864f' into HEAD"
crypto: msm: Fix Uninitialized flags

Due to uninitialized "flags" field in the request structure,
incorrect choices are made in the qce driver layer with
regards to setting crypto hardware registers.

Initializing the flags fixes this incorrect setting of the
registers.

Change-Id: Ic40319ea5e15e66cbafd28f727a9bcc6ea41b1ca
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Kbuild: Export msm_dsps.h to user space

Export msm_dsps.h to user space to interact with DSPS
driver.

Change-Id: I0cfcc883e704c8e59a0cb7c76ef56a3680573e4e
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
ARM: dts: msm: change CPR voltages for 8926

Update 8926 CPR voltages to match those of 8x26 v2.

Change-Id: Ic1a59c8c191eed9364931c8a04454c05f2a7972a
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
msm: Make CONFIG_STRICT_MEMORY_RWX even stricter

If CONFIG_STRICT_MEMORY_RWX was set, the first section (containing
the kernel page table and the initial code) and the section
containing the init code were both given RWX permission, which is
a potential security hole.

Pad the first section after the initial code (which will never
be executed when the MMU is on) to make the rest of the kernel
text start in the second section and make the first section RW.

Move some data which had ended up in the "init text"
section into the "init data" one, as this is RW, not RX.
Make the "init text" RX.

We will not free the section containing the "init text",
because if we do, the kernel will allocate memory for RW data there.

Change-Id: I6ca5f4e07342c374246f04a3fee18042fd47c33b
CRs-fixed: 513919
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
sock_diag: Fix out-of-bounds access to sock_diag_handlers[]

Userland can send a netlink message requesting SOCK_DIAG_BY_FAMILY
with a family greater or equal then AF_MAX -- the array size of
sock_diag_handlers[]. The current code does not test for this
condition therefore is vulnerable to an out-of-bound access opening
doors for a privilege escalation.

CRs-fixed: 519050
Change-Id: I1466c4f56f3f4df90cf8a1ae17afa80c89b813e8
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-commit: 6e601a53566d84e1ffd25e7b6fe0b6894ffd79c0
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sarang Joshi <spjoshi@codeaurora.org>
ARM: dts: msm: Update device tree with memory map information

Split the memory hole, as the size of the modem image has
been updating resulting in more HLOS memory.

The modem image is no longer relocatable and thus the pil heap
for the same is no longer present

Change-Id: I564a7ad19e409d8f87a33bc1b3389983f762a15b
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
ARM: dts: msm: Add memory hole for msm8926

Add the start address and size of the memory regions
reserved for other images. As the device tree for msm8926
is derived from the device tree for msm8226 add a tag to
the memory hole node to support the different memory map
configurations

Change-Id: I7885d5fb143cc59b7691b7f5dc24b79caee598a6
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
msm: qpnp-revid: Add api to return pmic revision id

Certain fixes in the PMIC (mainly those related to routing) do not
reflect in the revisions of individual peripherals. They show up only
in the revision id of the PMIC.

Drivers need to know whether a change is present in PMIC or not and
looking at the revision registers within the peripheral is insufficient.

So provide an api to lookup PMIC revision in the qpnp-revid driver.

Change-Id: I3bfe8a52d4eb15d1c491f0dd031e866c8b35353a
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>