pmem: Add back more detailed usage statistics
msm: camera: Fix the broken MCE functionality

Corrected the offset values for MCE registers

Change-Id: I41c5baaf90b294506234c1e69b919c5283abef59
CRs-Fixed: 278920
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
msm: gemini: Remove PMEM reference for input buffer

Remove PMEM reference for input buffer to prevent PMEM
leak during error case.

CRs-Fixed: 287889
Signed-off-by: Sunid Wilson <sunidw@codeaurora.org>
(cherry picked from commit f02545235282df44dd808c523d0ec9c04be6d4fe)

Change-Id: I1b7a29873b13b8f161b7fa5d6351edf6ad8eab23
Signed-off-by: Sunil Joseph <sunilj@codeaurora.org>
msm: camera: Remove additional check in msm_queue_drain

Removed additional check in msm_queue_drain to make
sure that the list is getting emptied in all cases.

Signed-off-by: Sunid Wilson <sunidw@codeaurora.org>
(cherry picked from commit 33e638a1c229765d06a76bc84351de9407026782)

Change-Id: I6b498241490c4264f93ea37b1fa97ebda4cde910
Signed-off-by: Raj Kushwaha <rajk@codeaurora.org>
msm: camera: Free buffers from frame queue at open

Free all pending frames in frame queue before cam_frame
thread opens frame device to avoid duplication of buffer
free

CRs-Fixed: 318202
Change-Id: I25d1718a37a94fa83563c4b6e99a1b7560917a7f
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
(cherry picked from commit 5dcbcb9f04a94aa6740718a1b6d39ce4548d869c)
msm: Camera: clear control queue

Clear control queue everytime before entering wait in msm_control as
there might be invalid payloads in the queue and this can lead to
not waiting at all and exit before the valid command completes.

Change-Id: Iee83bc51e0c3568f73c1f900d72df41c63a3ace6
Signed-off-by: Manogna Reddy Alle <cmalle@codeaurora.org>
(cherry picked from commit 008ccc5b4e2b7e05d1dd4d6054c31828ef29d17f)
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
msm: camera: Assign Null to unmapped addresses

Observed unhandled virtual addresses with all the camera drivers
while performing reads and writes to the ioremap addresses in different
scenarios, Hence assigining NULL to all the hardware remapped addresses
immediately after the iounmap calls

Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
(cherry picked from commit 72ee044121488cc9f4cde91c5e3a2b820d7a0fad)

Change-Id: Ia0a74ca35e8575b18da8350cb6de83752ee0b11b
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
ion: Port from CAF kk_2.7_rb1.33

*Patched for 3.0 kernels
*Reverted "gpu: ion: Add support for CMA allocations in cp heap" to avoid a massive update to dma-mapping (we don't use CMA anyway)

Signed-off-by: Sultanxda <sultanxda@gmail.com>
ion: ioctl compatibility with userland using old api

As far as I can tell, flags passed by userland are now used to determine
buffer caching.

Note in ION_IOC_ALLOC_COMPAT we are currently forcing uncached buffer
allocations (needed to make a choice here).  This
may need to change.

Signed-off-by: Flemmard <flemmard@gmail.com>
kgsl: Port from CAF kk_2.7_rb1.33

*Patched for 3.0 kernels

Signed-off-by: Sultanxda <sultanxda@gmail.com>
kgsl: fix genalloc BUG when detroying pagetable.

kgsl allocs some memory (in map_global), but never free it.
Fixes that.
Only happens when on GPUMMU ..
cy8c_tma_ts: Fix touchscreen not responding when resuming from sleep

Add a delay when the touchscreen resumes from sleep to ensure that it always has enough time to initialize. 50 was used as it was found to be near the minimum delay required for this kernel.

This bug can be accurately reproduced by pressing the power button many times in rapid succession.

Signed-off-by: Sultanxda <sultanxda@gmail.com>
bcmdhd: Import from Google AOSP hammerhead (Nexus 5) kernel

Signed-off-by: Sultanxda <sultanxda@gmail.com>
bcmdhd: fix crash when p2p is not supported by firmware. Fixes bcm4329
net: wireless: Backport from Google AOSP hammerhead (Nexus 5) kernel

Signed-off-by: Sultanxda <sultanxda@gmail.com>
bcmdhd: Fix compatibility with new backported wireless stack on 3.0

Signed-off-by: Sultanxda <sultanxda@gmail.com>
Sultan_defconfig: Refresh
Sultan_defconfig: v1.4.0