msm: wfd: Map double the size of reconstruction buffer

The MFC core has a hardware bug which causes it to access memory beyond
what is given.  This commit adds a workaround by mapping double the
buffer size into IOMMU.

Change-Id: Ib20a44f140f6c34d3e85205afb1cd00ee74f263c
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
msm: vidc: Invalidate cache when allocating buffers

We need to remove stale entries in the cache when allocating buffers, as
the ION driver doesn't invalidate the cache.

Change-Id: Ibe931251b6f06c6acbe6bc8a095b0e925dc08857
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
Merge "msm: wfd: Map double the size of reconstruction buffer"
Merge "msm: vidc: Invalidate cache when allocating buffers"
ASoC: msm: Fix delay in switching from WFD session

- When a running WFD session is paused/disconnected, there is
  a delay of about 10-15 seconds in switching audio from WFD
  sink to target.
- pcm_write is blocked because pausing/disconnecting the WFD
  session closes the backend DAI before a new link is established.
- Avoid closing afe if front end PCM session is still active.

CRs-Fixed: 444163
CRs-Fixed: 425512
Change-Id: I1ad6de1e201aa6130c397007219c0d370c7be2a1
Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
(cherry picked from commit e8b8455d0679f78075176b6e451d4c948c53afbe)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
ASoC: msm: Fix for proxy port open failure in WFD session

When playback is paused and proxy device disabled, afe is
not closed. This results in failure of proxy port open in the second
iteration. Fix the same by closing and opening the proxy.

Change-Id: Idfa94e5756d87e59dc0101fd688d6accfe6287e7
CRs-Fixed: 447001
CRs-Fixed: 446504
Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
(cherry picked from commit 63f5317a931bf247618fc796d3890c239b2201d6)
Merge "ASoC: msm: Fix delay in switching from WFD session"
Merge "ASoC: msm: Fix for proxy port open failure in WFD session"
msm: adsprpc: RPC driver between apps and adsp

The driver implements an IPC (Inter-Processor) communication
mechanism that allows for clients to make remote method
invocations across processor boundary.

Change-Id: Ia9eb9bc69c64c785b040e24ee36a4f416ab49355
Acked-by: Sathish Ambley <sambley@qualcomm.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
(cherry picked from commit 065497ff830f6536f7fce5a19d93b1162fd3fab9)
(cherry picked from commit 9eb25e4b6ad5e630edec1a3033a1f73c639ed77a)
(cherry picked from commit 9ab6d727c09002a02ef0926f01253c91f69a5af2)
msm: adsprpc: include msm-specific ion header file

Due to a recent upgrade to the ion framework, all ion clients that are
using msm-specific ion features (such as ION_AUDIO_HEAP_ID) should be
using linux/msm_ion.h instead of linux/ion.h.

Change-Id: I90cd2cefa3a55c039f9cdd20c45503c47a0145eb
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
(cherry picked from commit ad58ba0999a8bd81cbb4ee65d4ab3ecf9c303041)
(cherry picked from commit 0ec2b745d83180c939d580069f9daaf7cc40974d)
(cherry picked from commit 20703c5f218fa8f539897d0d076c821027cf2d5e)
msm: adsprpc: Incorporate coding style comments

Remove goto statements to bail out from inside the macro
and unnecessary defines. Cleanup on module init failure.

Change-Id: I01885a9fa37283d77e1b6735decd2f639ae4d4b3
Acked-by: Sathish Ambley <sambley@qualcomm.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
(cherry picked from commit b6a022faf863323476dd639704d9c75d0dbd9a22)
(cherry picked from commit 0b1bc4e79b6862192ff071185e5d4e063d2dc9dc)
(cherry picked from commit 0a878a6be89dc716e02e72918605b0dafe429c9a)
msm: Move adsprpc into drivers

Move RPC driver that allows for clients to make remote
invocation calls between apps and adsp into drivers.

Change-Id: I045da6163968066c954f448572c94a133181e1f4
Acked-by: Sathish Ambley <sambley@qualcomm.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
(cherry picked from commit bb0c30476246b54643c26c37942732d2e30aa6b1)
(cherry picked from commit 37348b0791706d2694e5283a6772286b4d0f5806)
(cherry picked from commit 1285c551a5465c5891d087de1c89ab771b7c53b9)
msm: adsprpc: Update to retrieve the physical address for ION buffer

Use follow_pfn() to obtain the physical address of ION carve
out buffers instead of directly referencing them from vma
structure.

Change-Id: I4c144a25bc579c77fefebe43f8d4d0a9bb568bfe
Acked-by: Sathish Ambley <sambley@qualcomm.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
(cherry picked from commit b49cf9b2a8fc05655be2448b170463a72bee4899)
(cherry picked from commit 0fb69e2a698d46754591709548c61d5eea3c8c61)
(cherry picked from commit c3680a7057186f95c6d92a2f0218425f91b1f99d)
msm: adsprpc: Allow zero length buffer

Initialize the arguments being passed to account for zero
length buffer being passed and not invoke flush routines
in these cases.

Change-Id: Ic6b3418f05ea3ca46e7ca758ebbd0a7bda987b51
Acked-by: Sathish Ambley <sambley@qualcomm.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
(cherry picked from commit 6873f4bf5ee4da7429ca2a694d93a1160e29101e)
(cherry picked from commit eed7eb0ffef10fb999f5947dc9e055000e2f9776)
(cherry picked from commit 403c63a58e0ede94663bbff173387c2891a0385d)
camera: Use fps divider to calculate the framelength lines.

Use the fps divider in calculation of sensor frame length
lines, so that the current fps requested is into effect.

Change-Id: I38ea5775e98e030b8be2e6895ac1a709a81cec92
CRs-fixed: 434293
Signed-off-by: Kalyani Oruganti <kalyanio@codeaurora.org>
(cherry picked from commit 2d1efe3df654c4ad56b74d7037d62ea7a99d3911)
(cherry picked from commit 32e6cbccaf58eaf63810f469e9be30663dde8ec3)
(cherry picked from commit f08f4742d876862f206205009692c3c2e36394de)
msm: camera: Update bus bandwidth vectors for camera for 8960/8064 targets.

The current bus bandwidth requested for 8960 and 8064 are not sufficient
to cover all the usecases. Increase the bandwidth requested to avoid
bus overflow issues.

Change-Id: Icadec39c32854f086888546314134c8235af0c94
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
(cherry picked from commit 4c3da4d4ed8f7680145bcd7d233c8b0fdb9efa5d)
(cherry picked from commit f42ec6cd8d55d7edad49321ee158b5930dc902db)
(cherry picked from commit 89978248bef8fcf71319f50b4b9aaba2c4b8f452)
msm: camera: Coexist composite and non composite RDI

Current code does not support for non composite RDI logic,
Hence adding logic for coexistence of composite and
non composite RDI

Change-Id: I5bb2d59a02955a6723353dcb0663ae4538bdb2c0
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
(cherry picked from commit 33296fdab561115fcb9c88090a52a99d42bce70e)
(cherry picked from commit 90fc71093279237c5eece24778fdac0dbfda24a7)
(cherry picked from commit 525882956ab107df2668312ea99a75233e792f8d)
msm: camera: Check for valid mem object before using it.

Add checks for validity of the mem objects for the buffer
planes before using them, to prevent any potential crashes.

Change-Id: I1221092f8c13912479c72c2bd8385b93fd7226b0
Signed-off-by: Azam Sadiq Pasha Kapatrala Syed <akapatra@codeaurora.org>
(cherry picked from commit f04b5a88a1869954c6585fe55b8d34d6b76c9d98)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
(cherry picked from commit f77d8a5accb97ad77edd563d4c2614d78176589a)
msm: camera: Enable Bayer stats.

Added IOCTL call to enable/disable bayer stats

Change-Id: Ia9daaacb603eb27510d0ac923787183ce36910f6
Signed-off-by: Deepak Kurien <dkurien@codeaurora.org>
Signed-off-by: Sushmitha Gummalla <sgumma@codeaurora.org>
(cherry picked from commit c766902a806c7e8736b7bfaec8eee927f9e75ccb)
(cherry picked from commit d71bd6b574dce26cb68c1f08935d19c69f407f4d)
(cherry picked from commit dcb238d2e443d8848fb16a3aa38929db87b74ff7)
camera: Enable flash driver for 8960 target

Enable the compilation of flash driver for 8960.

Change-Id: I0389c733b6b72afd0978d778ffe76994f3135dd5
CRs-Fixed: 450061
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
(cherry picked from commit e404b05f8a07afa78061eb4754ff4afa716c3a86)
(cherry picked from commit e827489ffd25ef627156437c255e2f88dd3666f9)
(cherry picked from commit d86012b24e2ff07dd2b8bea80249b79b675425df)