Linux: 3.0.49

Change-Id: I4c0f78ec12b14039dec8390b1329e99a81895ad0

Conflicts:

	arch/arm/mach-msm/board-ville.c
Linux: 3.0.50

Change-Id: I83d6da53754e61cbdd34b0accebdd436739a84bf
Linux: 3.0.51

Change-Id: I58b3db4f5270ce306067487cda2dd1800445139f
power: fbearlysuspend: add sleep hack for CRT-off animation

HTC panels don't seem to work correctly with the Android
CRT-off animation. Add a short sleep period to let userspace
finish drawing the animation.

Change-Id: If9526a911ef585375a441a7f13d1674537eec3ec
ASoC: msm: Remove hardcoded frame size dependency on sample rate.

The driver has hardcoded dependency for period size on sample rate.
This restricts driver from being used for all sample rate and period
size combinations.

The driver also introduces an unnecessary delay in giving the first
buffer to dsp both for playback and record case. resulting in delay
in start of session.

Change-Id: I9e0eb9b426e4f77c161dc7ef72b152d081979013
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
ASoc: msm: Avoid memory allocation failure in proxy driver.

- Allocating memory using dma_alloc_coherent is resulting
failures due to fragmentation
- Fix the issue by replacing the API with
allocate_contiguous_ebi_nomap.

CRs-fixed: 358301
Change-Id: I726623d23c0080b7207911181590fa417c3e9886
Signed-off-by: Jayasena Sangaraboina <jsanga@codeaurora.org>

Conflicts:

	sound/soc/msm/msm-pcm-afe.c
	sound/soc/msm/msm-pcm-afe.h
ASoc: msm: Avoid memory allocation failure in proxy driver.

- Allocating memory using dma_alloc_coherent is resulting
failures due to fragmentation
- Fix the issue by replacing the API with
allocate_contiguous_ebi_nomap.

CRs-fixed: 358301
Change-Id: I726623d23c0080b7207911181590fa417c3e9886
Signed-off-by: Jayasena Sangaraboina <jsanga@codeaurora.org>

Conflicts:

	sound/soc/msm/msm-pcm-afe.c
	sound/soc/msm/msm-pcm-afe.h
msm: audio: qdsp6v2: Update ACDB driver to use ION

Update the ACDB driver to use ION instead of PMEM
driver to allocate memory.

Change-Id: I8934ccf9c75db5921f51aac2f518c342948678cc
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/qdsp6v2/audio_acdb.c

Conflicts:

	arch/arm/mach-msm/qdsp6v2/audio_acdb.c
msm: audio: qdsp6v2: Replace PMEM with ION in Audio Decoder drivers

ION is replacement for PMEM which is less complex with better
reference counting. Hence ION which is a superset of PMEM is
used to allocate memory in the audio decoder drivers.

Change-Id: I088e532a34e266bbfc3ac0a01e12acc3418c7ca6
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/qdsp6v2/audio_utils_aio.c
msm: audio: qdsp6v2 Fix error handling in memory registration

Three instances of incorrect error path handling.  The first two
didn't initialize the 'result' variable before return (reported by Rob
Clark <rob.clark@linaro.org>).  The third was comparing the address of
a local variable against NULL, which will never be true.

Change-Id: Ia318c9331cc0ff896c4073389f3e666fa19eb4af
Signed-off-by: David Brown <davidb@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/qdsp6v2/audio_acdb.c
msm: Asoc: audio: Migrate to ION from DMA alloc

-RT proxy driver is using DMA alloc. Migrate them to
use ION memory to save memory and avoid stability
issues.

Change-Id: Idc2296bc5ecf76d6b846f204478c33f58423bb72
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>

Conflicts:

	sound/soc/msm/msm-pcm-afe.c
	sound/soc/msm/msm-pcm-afe.h
Linux: 3.0.53

Change-Id: I1b1fae9b1fc7db15073143bc4017187af4d6c66e

Conflicts:

	Makefile
	scripts/Kbuild.include
msm: iommu: use sg_dma_address() in iommu_map_range()

Ion carveout and content protect buffers do not have
a struct page and thus sg_phys() cannot be used on them.
Try sg_dma_address() first and if it returns 0 then
use sg_phys().

Change-Id: I95ccb8f5a3c86cd09ecf2a2737c260f4996059ac
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
(cherry picked from commit 74e57d4eb3b37fbf57145573c5cb3892c89d8bc0)
msm: iommu: Do not register API on unsupported SoC versions

In addition to not registering IOMMU devices, do not
register the IOMMU API on SoC versions which do not support
it. This will allow iommu_found to work properly.

Change-Id: I103fc4ff910bee3eb4039e19de52f36cd1778861
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/devices-iommu.c
gpu: ion: Map a range into the IOMMU

Instead of mapping 1 4K page at a time into the IOMMU create a
scatterlist and map everything at once. This will be more efficient.

(cherry picked from commit 16cdb41acb58dc352994e9b27a9344b1337b0c46)

Change-Id: I8488cc8e6d013d1e62c6ea5fcfc2425384daefe9
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
(cherry picked from commit 8ddf658dc1a93a91eacf8d47779710ff860337aa)

Conflicts:
	drivers/gpu/ion/ion_cp_heap.c
	drivers/gpu/ion/ion_iommu_heap.c

Conflicts:

	drivers/gpu/ion/ion_carveout_heap.c
	drivers/gpu/ion/ion_cp_heap.c
	drivers/gpu/ion/ion_iommu_heap.c
iommu: Fix flags passed to iommu map functions.

iommu map functions requires clients to specify whether
the mappings should be read only or read-write (write only
is not supported). Ensure clients specify the appropriate
flags when calling map functions.

Change-Id: If42b4b0367b4311aa36d3063979ef04af3a43fc6
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
(cherry picked from commit bcf5ae04a9bf744a7a3d119c93d439a682404877)

Conflicts:

	arch/arm/mach-msm/subsystem_map.c
	drivers/gpu/ion/ion_carveout_heap.c
	drivers/gpu/ion/ion_cp_heap.c
	drivers/gpu/ion/ion_iommu_heap.c
gpu: ion: Remove extra iova free call

IOMMU virtual address (iova) is allocated locally in IOMMU mapping
functions per heap type. When an error happens the iova's are
freed in the same function as it was allocated. However, there
is an extra free call in the ion wrapper function that calls
these IOMMU mapping functions.

Remove the extra iova free call which can cause kernel panic.

Change-Id: Ic8978cf05202b29a42da7374e2c8c1e590b2d2a8
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
(cherry picked from commit b343e0593e5f574cd1483497807a6cf10b7aee8e)
msm: display: Attach MDP IOMMU during first update after boot

For continuous splash support to work properly, attach the MDP IOMMU
device at a later point during boot to allow display use the
splash image from bootloader

Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Change-Id: Ife9a2afae1e9b9140ee74af0cc7dcf7ad945d4de

Conflicts:
	drivers/video/msm/mdp4_overlay_dsi_video.c
	drivers/video/msm/mdp4_overlay_dtv.c
	drivers/video/msm/mdp4_overlay_lcdc.c

Conflicts:

	drivers/video/msm/mdp4_overlay.c
msm: Enable all IOMMU's

Enable video, camera, display, and rotator IOMMU's so
that virtual contigious memory can be used by these
devices. Physical contigious carveout regions can
be reduced so that more memory is available to the
rest of the system when not in use by multimedia.

Change-Id: Ibfad7d6a55e04490be9e39a5539780657f6727e0
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/iommu_domains.c

Conflicts:

	drivers/video/msm/mdp4_overlay.c
gpu: ion: Map everything into IOMMU with 64K pages.

Due to performance issues with 4K pages and the IOMMU we should use
64K pages. However, minimum allocation from ION is 4K so instead of
mapping on demand we need to map the full heap into the IOMMU when
the first request for mapping comes. Only unmap everything from the
IOMMU when the last buffer is freed.

CRs-fixed: 348606
Change-Id: Ic1793f5caaff2f69bf1fb7e8c8b3bd03378131b8
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
(cherry picked from commit 5027688e1d4cf244f84b525c76a000b9408c62a5)

Conflicts:
	arch/arm/mach-msm/board-8960.c
	arch/arm/mach-msm/board-msm8x60.c
	arch/arm/mach-msm/include/mach/iommu_domains.h
	include/linux/fmem.h
	include/linux/ion.h

Conflicts:

	arch/arm/mach-msm/include/mach/msm_memtypes.h
	arch/arm/mach-msm/subsystem_map.c
	drivers/gpu/ion/ion_carveout_heap.c
	drivers/gpu/ion/ion_cp_heap.c
	drivers/gpu/ion/ion_iommu_heap.c
	include/linux/fmem.h
	include/linux/ion.h