Linux 3.0.40

Conflicts:
	arch/arm/kernel/smp.c
	drivers/net/tun.c
	mm/page_alloc.c

Change-Id: Iba593e9d5392fb4f5017ae2c74b4b2c1e1ab3f36
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>
Linux 3.0.41

Conflicts:
	arch/arm/mm/tlb-v7.S
	drivers/net/tun.c
	drivers/usb/core/hub.c
	kernel/irq/manage.c
	mm/memory-failure.c
	mm/page_alloc.c
video: msm_fb: Increase display timeout to 2 seconds

One second time out for no frame update, as in current implementation,
does not allow CABL to reach minimum backlight level possible because
histograms dont get generated after one second. So increase time out
period to two seconds which seem to be sufficient for complete black to
complete white and vice versa transitions.

CRs-Fixed: 370804
Change-Id: I0712924d669abcb820654cd6ca5f7da37bed57e6
Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
msm_fb: display: Update mdp clock counter for unsuccessful probes

If a panel probe does not succeed, call mdp_clk_ctrl to maintain
mdp_clk_cnt counter else mismatch in counter results in mdp clock
to never go off in cases like suspend-resume.

CRs-Fixed: 385560
Change-Id: I4ca54b051af98e823dc7f3ff7b9bcb960532c7e8
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm_fb: Display: Fix Dithering issue for rgb565 format

Using RGB888 as source format and rgb565 as destination pixel format,
will cause image corruption on the display. Fix this issue by
setting the destination format as RGB888 in MDP and DSI controller
pixel format as RGB565 for DSI specific panels.

CRs-Fixed: 377484
Change-Id: If58976ee9cd4825efb39437170e54796fa2213e0
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>