msm: improve handling of DONT_MAP_HOLE_AFTER_MEMBANK0

The code to avoid mapping the hole after memory bank 0
located the start and size of this hole after running
generic initialization code which needed to convert
physical addresses to virtual ones and vice-versa
beyond this hole.

While this didn't prevent the kernel from booting, this
isn't clean, and in fact it was giving us more vmalloc
space than the config file specified (and as a result
there was less lowmem than expected).

The code to locate the hole now runs before this
initialization code.

Change-Id: Id67d8b9ea489b6d6a2c20151b0fc9a9d7b5b662d
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
Revert "Revert "d2: Enable FMEM in board files""

This reverts commit 922e1b16c39218e8f1fd540786f47f5e70036381.
board-8064 msm: Overlap secure and non secure video firmware heaps.

Moves fixed area start address down, so that non secure
video firmware heap and secure video firmware area overlap.
Both use the region in a mutually exclusive manner.
ALso introduce a hole, that can be used by MM heap
lock down for content protection.

Change-Id: Ic240377da25e00423742ccb73dbb60a1ff037e37
Signed-off-by: Deepak Kotur <dkotur@codeaurora.org>
(cherry picked from commit eadb7505134a23b8de3cd74c924fd31324978a7e)

Signed-off-by: Dhivya Subramanian <dthiru@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/board-8064.c
gpu: ion: Fix fragmentation debug message cond.

If an ion allocation fails because of memory fragmentation a debug
message should be printed. However, the logic that decides whether
the debug message should be printed or not is incorrect causing
the debug message to not be printed when the amount of space
available in the heap is equal to the requested size.

Change-Id: Iaaf8cd6742aeffab7bcb4806e485326fb9690945
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
msm: move fixed area start lower so that 768M systems work

The start of the fixed area was at 0xb0000000, but
on 768M 8960 systems this memory doesn't exist.
Since the start of the fixed area must be the
same on all 8960s, the fixed area start is
lowered to 0xa0000000.

Change-Id: Ia86513b08ebc4d37bd1afca7263d8a409d2a72bb
CRs-Fixed: 349125
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>

board-8960: Merge secure and non secure firmware heaps.

The secure and non secure firmware heaps are now merged
for a total of 2MB savings

CRs-Fixed: 365291

Signed-off-by: Deepak Kotur <dkotur@codeaurora.org>
(cherry picked from commit 6a309d3a5b559495ccfd5a273f12dad30e14c96f)

Change-Id: I968afa950873e038d0a8ce60e8a2a89e9577cecb
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/board-8960.c

msm: Fix for incorrect fmem and mm heap sizes on 8960

Introducing a overlap of secure and unsecure pil heap
overlap, needs to be propogated to fmem logic.
fmem reserved areas and base address need to be adjusted

Change-Id: Ia7b6fd8e1ce3c86d7dd3834c0e80d63575ff2368
CRs-fixed: 373054
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/board-8960.c
d2: Import FMEM changes to board files

Change-Id: I8e1471aa7268424cde6ef427b681b1db22e09e57
Revert "net: wireless: bcmdhd: Add SETSUSPENDMODE command"

This reverts commit 2e2c2678c7bd0e544301be51cf09247ea1587429.
Revert "msm_fb: display: extend mdp debugfs with force blt enable"

This reverts commit 45d9438278405f2e5a86f61db3fadb4927d358a5.
msm_fb: display: Add BLT support to dsi command mode panel

At run time, mdp BLT (writeback) mode is enabled and disabled
base on performance level to avoid mdp underrun. Move BLT
enabled/disabled logic to pan display so that enabled/disable
is done per commit instead of per queue. Since all panels
are shared same logic, dsi video mode and lcdc panle BLT logic
have been changed accordingly.

Change-Id: Iee4854b1bb6cc6f249dce0c2ccb39d5b07abe858
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay.c
msm_fb: display: clean pipe free or unlock calls

A few places have unnecessary mutex unlock calls, and iommu pipe free
depends on pipe parameters so move it before pipe is zeroed.

Change-Id: I67158380ec2d0f1727bebfaf9e6a4a0652d40f30
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay.c
msm_fb: display: add dmap waiting before turn off timing generator

Wait for dmap done to turn off TG to avoid underruns before base
pipe setup and after constant splash during boot time.

Change-Id: I64bc3935d996af1d2d54db4c11319301ea454ced
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm: display: Set max MDP bandwidths for larger primary resolutions

To avoid underruns for larger primary display resolutions,
set max MDP clock/bandwidths for dynamic boot parameter
cases with HDMI as primary and WUXGA panels

Change-Id: I1e020de0cbd4082edd26d4b03ebee4d4b976c26a
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm: display: remove the predefined mdp clk rate tables

Mdp clk rate will be calculated during run time based on pipe
requirements, so the tables in board files are not necessary. Only the
max rate which is target specific is passed to display driver.

Change-Id: Ib42d378e5bb4b6876719c2cebefbd9dc9a4cef15
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/board-8960-display.c
msm_fb: display: mdp clk and bw based on vsync

rebased to vsync patch

Change-Id: I2a11866e2dbe26109bf0eefa50fe778286ca5d0d
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp.c
	drivers/video/msm/mdp4_overlay.c
	drivers/video/msm/mdp4_overlay_writeback.c
msm_fb: display: commit mdp baselayer pipe

When in resume or boot time, baselayer pipes need to be committed for
mdp to play, otherwize underruns and blue screens are seen. The
previous pipe stage up func has this commit which is removed now, so
the commit calls have to be added for the cases where base pipe is
initialized.

Change-Id: I63a7d0ac3fb078b3d7f604eb646a0430326a478c
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>