msm: vidc: free the recon buffers in cleanup function

- The recon buffers were not released when video recording
  was killed abruptly leading to memory leak.

- Fix provided to release the recon buffers when media
  server killed abruptly.

Change-Id: I48ac1a592719446b7e4bf87bbd707d09351d1e61
Signed-off-by: srikarri <sridur@codeaurora.org>
msm: vidc: return error in case of init failure

Return error if error comes in video driver
initialization.

Change-Id: I54c516808587fb7d94c3d517f8c72c6c9aa9d91d
CRs-fixed: 542535
Signed-off-by: Pushkaraj Patil <ppatil@codeaurora.org>
msm: vidc: Validate input data before processing

User controlled data needs to be validated before
processing, otherwise it may corrupt existing data
and other programming variables which may further
lead to crash in kernel space.
This change validates user specified buffer's data,
such as offset and data length, before performing
any operations in kernel.

Change-Id: Idb2a5c4c270cdbb55adfc0c22b9296b7dd359de9
CRs-fixed: 547695
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
msm: vidc: Initialize kernel space stack variables

This change initializes kernel space stack variables
that are passed between kernel space and user space
using ioctls.
Non initialization of these variables may lead to
leakage of memory values from the kernel stack to
user space.

Change-Id: Icb195470545ee48b55671ac09798610178e833e1
CRs-fixed: 556771,563420
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
msm: vidc: Check validity of userspace address

Before writing to a userspace address, verification
of the validity of user space address is required.

Change-Id: I9141e44a6c11aaf3f4d57c08bb0dd26a7b214f34
CRs-fixed: 556356
Signed-off-by: Deepak Verma <dverma@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>
kernel/sony/msm8960: Lower mic voltages to aosp reference

Change-Id: I4fd339e96bf396e844c8bfc801076e457eaf0437
Merge "kernel/sony/msm8960: Lower mic voltages to aosp reference" into android-4.4
Revert "msm: vidc: Initialize kernel space stack variables"

This reverts commit 6043ef0b7ed01eca721ca27727601ff287ff0ff4.

Change-Id: If81f0487b8ec471a361729a8273d6dcb4988eb85
Increase ION_HEP_NUM (CAF uses 8 in stead of 7)

Change-Id: I6c309c2ae7c1ef113f5e8c8b70c32e8ae882633c
Change vdec to venc

Change-Id: I05cb19d18e3e128ea35fde3afb3f8f5b9fb615fa
Merge "Increase ION_HEP_NUM (CAF uses 8 in stead of 7)" into android-4.4
blue: add the ADSP heap to board files

Change-Id: I3f186bf30202df9145328c9cc0e79dc2957b546b
fix ion_platform_data definition

fix ion_platform_heap to make is use an usual way in board configuration file.

Change-Id: I8686108a9fe0aa2ba9f9c84990d555f947f78f86
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
[lauraa: Fixup msm board files]
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
msm: Rip out fmem related memory adjustments

fmem is deprecated. Get rid of the special handling for
fmem in memory reservation code.

Change-Id: I24dc24cee364d992cbbe08d81851987d721a587b
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8960: Add support for using CMA with Ion heaps

Adjust the memory reservation/placing code in the board
file to account for heaps that might use CMA. This includes
both dedicated CMA heaps and cp heaps marked as using CMA.

Change-Id: Ifb715bc2d4bf7fbba78a7201a68ccf3ec93c38b2
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
gpu: ion: Restrict access to CP heap

On certain targets, the CP heap should only be used
for secure allocations. Add a check to determine which
targets are allowed to make non-secure allocations from
the CP heap type. Targets with this restriction will
fall back to an alternate heap.

Change-Id: Ieaa9e76cbf2dc3ea1da6f4e75a4de903c39a3077
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
msm: kgsl: Replace 325Mhz with 320 Mhz for 8064 and 8960PRO

325Mhz will not be supported anymore and has to be replaced
with 320Mhz.

Change-Id: Ibdb678215749d0e57b66e6e6416c5cb978b45b66
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
msm: Fix gpio and device dependency on CONFIG_GPIO_SX150X

On 8960 i2c ioexpander should be added based on CONFIG_GPIO_SX150X.
On 8930 Camera gpio settings should be added based on CONFIG_GPIO_SX150X.

Change-Id: I645e2bd41da16c19aff90b04d587938ec8ed9068
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>