shooteru: Revert memory remap

Change-Id: Ief669e46ab9e032521e88292b7d2eced28f2b26a
shooteru: Add ION support

Taken from Lexmaster's kernel
Signed-off-by: helicopter88 <johnlemon.lol@gmail.com>

Change-Id: I4cdbe443f672c45ddaef67c146e855c8ec341306
Revert "msm_camera: update gemini driver from ville_c2"

This reverts commit 3157efa3e364c6824901f83786ff4cbfda7925fa.
GPU: Backport from caf-jb_2.5.5

taken from sultanxda
board-shooteru: update ION
shooteru: Make camera work & remap some memory
shooteru: Use PMEM for VIDC

credit:sultanxda
msm_fb: fbram: Use newer method of allocating RAM to fb

Eliminates the need for specifying a base address for the framebuffer RAM allocation.

credit: sultanxda
shooteru: Cleanup PMEM SF & ION HEAPS

credit: sultanxda
shooteru: ION: Various updates

*Clean out more useless PMEM
*Remove ION rotator heap
*Allocate surfaceflinger ION heap statically with a base address (PMEM heaps are static so the other heaps should be static too in order to prevent any issues)

credit:sultanxda
shooteru: Various memory fixes

*Decrease ADSP heap size to 18MB (720P recording really only requires 16MB, but keep an extra 2MB in case the need for more RAM arises)
*Move the ADSP heap to the end of the memory space (0x70000000 is the end of the memory space on Pyramid, not on Shooter)
*Decrease surfaceflinger heap size to ~42MB (this is plenty)
*Remove useless mem_size_mb function
*Increase SIZE_ADDR1 to what it should be on ION kernels (0x80000000 - PHY_BASE_ADDR1)
*Specify a base address for the surfaceflinger heap
*In paddr_to_memtype, the end of the memory space is 0x80000000, not 0x60000000
*Decrease size of the framebuffer allocation (HDMI doesn't work on AOSP)

Signed-off-by: Sultanxda <sultanxda@gmail.com>
msm_fb: display: Use spinlock instead of mutex in vsync timer handler

Use spinlock instead of mutex in vsync timer handler to avoid sleeping
from timer context through mutex locks

Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
msm_fb: display: add spinlock to synchronize mdp irq enable/disable

To improve performance, UI push thread release mutex before blocked at
waiting for vsync to allow Video thread to be updated at same vsycn.
This also cause contention to enable/disable mdp irq.
Add spinlock to synchronize both threads and irq context.

Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm_fb: display: set flush bit at overlay_unset

set flush bit at overlay_unset to notify mdp blending engine to
pick up new configuration changes.

Signed-off-by: KUogee Hiseh <khsieh@codeaurora.org>
msm_fb: display: Fix writeback offset with correct fbnum

Fix writeback offset with correct fbnum value to avoid any
memory corruption with image buffers in use

CRs-Fixed: 290324
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
msm_fb: display: disable fill screen with blank on early suspend

Disable logic to fill framebuffer with black screen before early
suspend, this is causing slugish wipe off from top to bottom
animation on screen.
This logic is still needed for MDP3 because of hardware limitation.

CRs-Fixed: 298050
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm_fb: display: use spin_lock_irqsave before call disable_irq

disable_irq() will wait for irq handle to complete before disable
the specified irq. Therefore use spin_lock_irqsave() instead of
spin_lock() before call disable_irq() to avoid deadlock on same
spin lock.

CRs-fixed: 299938
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm_fb: display: Fix vsync GPIO for DSI command mode

Fix vsync GPIO 0 condition check for DSI command mode
to enable Tear check logic

CRs-Fixed: 298596
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
msm_fb: display: use mutex instead of spin lock to avoid deadlock

There has deadlock between mdp4_isr() and disable_irq() called by
LCDC thread. Disable_irq() will wait for mdp4_isr() to complete
before return. Meanwhile mdp4_isr() will try to acquire mdp_spin_lock
which had been acquired by lcdc thread before call disable_irq().
This patch replace spin lock with mutex to avoid deadlock from happening.

CRs-fixed: 301276
Signed-off-by: kuogee hsieh <khsieh@codeaurora.org>
msm_fb: display: Fix division by zero error in MDP downscale check

Fix division by zero error in MDP downscale validation by rejecting
destination rectangle width and height params with 0

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