msm: Asoc: audio: Migrate to ION from pmem, dma alloc

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

CRs-Fixed: 369303
Change-Id: If58b69b9f8b7b03661a36451c1a5c27885fbf976
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Revert "msm_fb: display: Add MDP IOMMU detach support for DTV"

This reverts commit fa853b91ddfe4ac5eb9c77f9c409223d9b3cc0e4.

Change-Id: Id1d127080040962c1ad33c9d4bca5005415283da
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>

Conflicts:
	drivers/video/msm/mdp.c
	drivers/video/msm/mdp.h
	drivers/video/msm/mdp4_overlay_dsi_video.c
Signed-off-by: raghavendra ambadas <rambad@codeaurora.org>
Revert "msm_fb: display: Attach and detach MDP IOMMU on suspend/resume"

This reverts commit aaf74ca34581feb8be797a6d8793824e73fecf67.

Signed-off-by: raghavendra ambadas <rambad@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay.c

Change-Id: If9ec76cd040b0e834301d3d9ddbbab04b38b7a7e
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>

Conflicts:
	drivers/video/msm/mdp4_overlay.c
	drivers/video/msm/mdp4_overlay_dsi_video.c
Signed-off-by: raghavendra ambadas <rambad@codeaurora.org>
msm: 8064: Add machine records for cdp, mtp and liquid.

Also add Kconfig and defconfig configuration
to enable them for the apq8064 device..

Change-Id: Ia7d78a9e1c65f90002403becd90a25adb5da011a
Signed-off-by: Joel King <joelking@codeaurora.org>
msm: mpq8064: Add machine type and 8064 board support for mpq cdp

The apps bootloader sets this machine type if the processor and
platform are configured for MPQ 8064 CDP.

Change-Id: I3cf55a8279d9a12cf106c906d0cb15c138dccd8d
Signed-off-by: Joel King <joelking@codeaurora.org>

Conflicts:
	arch/arm/configs/msm8960-perf_defconfig
	arch/arm/configs/msm8960_defconfig
	arch/arm/mach-msm/Kconfig
	arch/arm/mach-msm/board-8064.c
	arch/arm/tools/mach-types

Signed-off-by: raghavendra ambadas <rambad@codeaurora.org>
msm: Make iommu domains platform devices

Information about the layout of iommu domains is a device
specific option. Convert the iommu domain information
into a platform driver with a corresponding platform device.
This allows different devices to have different layouts as
needed.

Change-Id: I6bf4162476143daabe16a2f5de3b655ae4377902
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/board-8064.c
	arch/arm/mach-msm/board-8960.c
	arch/arm/mach-msm/devices-8064.c
	arch/arm/mach-msm/devices-8930.c
	arch/arm/mach-msm/devices-8960.c
	arch/arm/mach-msm/devices.h
Signed-off-by: raghavendra ambadas <rambad@codeaurora.org>
msm: Move subsystem map specific code to the subsystem map file

Code to translate between the old style subsystem map ids and
newer domain/partition numbers is no longer dependent on anything
in iommu_domains.c. Move it to the subsystem_map file to better
separate the old code from the new code.

Change-Id: I899a3215f17b7b8c55969086389b89c4401bea3f
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/subsystem_map.c
Signed-off-by: raghavendra ambadas <rambad@codeaurora.org>
msm: Add simple APIs to map contiguous buffer

Typicall, most iommu mapping happens through Ion or another
API. There may be other cases when clients need a simple
API to map a contiguous physical address into an iommu.
Add apis to support mapping and unmapping a physical range
into the iommu. The client is responsible for any reference
counting that needs to occur.

Change-Id: Ie5cb330417f7dd967748bb76cfdf9d123c579e04
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/include/mach/iommu_domains.h
Signed-off-by: raghavendra ambadas <rambad@codeaurora.org>
msm: iommu: Split rotator/mdp iommu domains

Finer granularity is needed when mapping into the IOMMU's for
rotator and mdp for secure playback. During secure playback
HLOS will only have access to map into one context bank. The
other context bank is secured and programmed by TrustZone.

Divide DISPLAY_DOMAIN into DISPLAY_WRITE_DOMAIN and
DISPLAY_READ_DOMAIN. Divide ROTATOR_DOMAIN into ROTATOR_SRC_DOMAIN
and ROTATOR_DST_DOMAIN.

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

Conflicts:
	arch/arm/mach-msm/board-8064.c
	drivers/media/video/msm/wfd/wfd-ioctl.c
	drivers/video/msm/mdp.c
	drivers/video/msm/mdp4_overlay.c
	drivers/video/msm/msm_fb.c
Signed-off-by: raghavendra ambadas <rambad@codeaurora.org>
msm: Migrate to ION from DMA for RT proxy driver

 -The mmap() function was using the dma mapping.
 -Changing the mapping to virtual memory since ion
  is used for memory allocation .

Change-Id: I754637bd522c90149c64ef1857439ab9d10879e2
Signed-off-by: Shreyas Nagasandra Chandrasekhar <snagas@codeaurora.org>
Merge "Revert "msm_fb: display: Add MDP IOMMU detach support for DTV""
Merge "Revert "msm_fb: display: Attach and detach MDP IOMMU on suspend/resume""
Merge "msm: 8064: Add machine records for cdp, mtp and liquid."
Merge "msm: mpq8064: Add machine type and 8064 board support for mpq cdp"
Merge "msm: Make iommu domains platform devices"
Merge "msm: Move subsystem map specific code to the subsystem map file"
Merge "msm: Add simple APIs to map contiguous buffer"
Merge "msm: iommu: Split rotator/mdp iommu domains"
msm_fb: display: do not use ION_IOMMU_UNMAP_DELAYED

Since iommu buffers will be unmapped after two newer commits
had passed, there is no need to request iommu driver to further
delay unmapping an iommu buffer.

Change-Id: I8cf8d406cf509908035d12c9a04f0add12f3c7c8
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm_fb: display: fix iommu leak during base layer swap

Retain RGB1 iommu information during  base layer swap
so that iommu used by RGB1 can be freed back to pool later.

Change-Id: Ibed85179284743dc8a9d1434f0c81626b0567e17
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
(cherry picked from commit be46f9f596c5172438a74759d48ca7db600cd737)