msm_fb: Calibration config API

Add definition for struct to be used in post processing calibration API.
Needed by OEM calibration tool to provide better support of post processing
features.

Change-Id: I40760a85bb58730bfe64469ecf3e2ab3b6e7609e
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
(cherry picked from commit e8ed5ec0bd9fd5b298464b7f08b5807afa3291a8)
msm_fb: display: check FB_ACTIVATE_VBL bit only

FB_ACTIVATE_VBL bit is set to enable TE logic at pan_display
and unset to disable TE logic at pan_display for smart panel.
This patch checks for FB_ACTIVATE_VBL bit set only instead of
value.

CRs-fixed: 433399
Change-Id: I6fc913c6752fcca6a27c783c45ab318065217973
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>

Conflicts:
	drivers/video/msm/msm_fb.c
msm_fb: display: fix frame rate wrong calculation

For cmd mode the frame rate calculation result is wrong. Also in mdp
driver there are several places to do the same calculation. So fix the
wrong calculation and use a single func to do calculation.

Conflicts:

	drivers/video/msm/msm_fb.c

Change-Id: I3a4be39e480ce82677dcefb666202947f7f6d3c1
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
(cherry picked from commit d4eb5a1a3ef0935ce6aeffb2b48974c01b9518b9)
Signed-off-by: Neha Pandey <nehap@codeaurora.org>

Conflicts:
	drivers/video/msm/msm_fb.c
Merge "gpu: ion: Add flag for forcing contiguous allocations"
Conflicts:
	drivers/gpu/ion/ion_cp_heap.c
Merge "msm: camera: Update the status of the ctrlcmd to userspace"
Conflicts:
	drivers/media/video/msm/server/msm_cam_server.c
Merge "msm_fb: display: Add alpha enable check in blend"
Merge "input: sensor: add check if regulator is valid before releasing it"
msm_fb: display: update var in display commit

Need the value of var in display commit to update the double buffers.
If not, double buffering doesn't work in minui (eg. recovery and off-charger
mode)

Change-Id: I1fba52243cc781f18742131759245911d32c9b18
Signed-off-by: Devin Kim <dojip.kim@lge.com>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>

Conflicts:
	drivers/video/msm/msm_fb.c
msm: clock-8960: Disable hardware clock gating for vcap_ahb_clk

Hardware doesn't have the support on the auto gating of vcap_ahb_clk.
Therefore, disable this feature in this patch.

Change-Id: Id64f074f29593bfe0ea1fb1d2828b1f0699b5c47
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
mach-msm: Add support for APQ8064AA

Update all relevant cpu_is_apq8064xx() call-sites to add
APQ8064AA support.

Change-Id: I4d1f092f53f2f46e58b4a9a2758ef4ab7e78e1d3
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/clock-8960.c
Merge "msm: socinfo: Add support for APQ8064AA"
Conflicts:
	arch/arm/mach-msm/include/mach/socinfo.h
	arch/arm/mach-msm/socinfo.c
Merge "msm: clock-8960: Disable hardware clock gating for vcap_ahb_clk"
Conflicts:
	arch/arm/mach-msm/clock-8960.c
Merge "msm: clock-8960: Disable hardware clock gating for vcap_ahb_clk"
Merge "mach-msm: Add support for APQ8064AA"
Conflicts:
	arch/arm/mach-msm/clock-8960.c
mm: cma: on movable allocations try MIGRATE_CMA first

It has been observed that system tends to keep a lot of CMA free pages
even in very high memory pressure use cases.  The CMA fallback for
movable pages is used very rarely, only when system is completely
pruned from MOVABLE pages.  This means that the out-of-memory is
triggered for unmovable allocations even when there are many CMA pages
available.  This problem was not observed previously since movable
pages were used as a fallback for unmovable allocations.

To avoid such situation this commit changes the allocation order so
that on movable allocations the MIGRATE_CMA pageblocks are used first.

This change means that the MIGRATE_CMA can be removed from fallback
path of the MIGRATE_MOVABLE type.  This means that the
__rmqueue_fallback() function will never deal with CMA pages and thus
all the checks around MIGRATE_CMA can be removed from that function.

Change-Id: Ie13312d62a6af12d7aa78b4283ed25535a6d49fd
CRs-Fixed: 435287
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
mm: show migration types in show_mem

This is useful to diagnose the reason for page allocation failure for
cases where there appear to be several free pages.

Example, with this alloc_pages(GFP_ATOMIC) failure:

 swapper/0: page allocation failure: order:0, mode:0x0
 ...
 Mem-info:
 Normal per-cpu:
 CPU    0: hi:   90, btch:  15 usd:  48
 CPU    1: hi:   90, btch:  15 usd:  21
 active_anon:0 inactive_anon:0 isolated_anon:0
  active_file:0 inactive_file:84 isolated_file:0
  unevictable:0 dirty:0 writeback:0 unstable:0
  free:4026 slab_reclaimable:75 slab_unreclaimable:484
  mapped:0 shmem:0 pagetables:0 bounce:0
 Normal free:16104kB min:2296kB low:2868kB high:3444kB active_anon:0kB
 inactive_anon:0kB active_file:0kB inactive_file:336kB unevictable:0kB
 isolated(anon):0kB isolated(file):0kB present:331776kB mlocked:0kB
 dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:300kB
 slab_unreclaimable:1936kB kernel_stack:328kB pagetables:0kB unstable:0kB
 bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
 lowmem_reserve[]: 0 0

Before the patch, it's hard (for me, at least) to say why all these free
chunks weren't considered for allocation:

 Normal: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 1*256kB 1*512kB
 1*1024kB 1*2048kB 3*4096kB = 16128kB

After the patch, it's obvious that the reason is that all of these are
in the MIGRATE_CMA (C) freelist:

 Normal: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 1*256kB (C) 1*512kB
 (C) 1*1024kB (C) 1*2048kB (C) 3*4096kB (C) = 16128kB

Change-Id: Ic5fe77d762e0c03715bfb917774e7c4f03ac43f5
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Merge "msm: spm-v2: Add support for AVS"
Conflicts:
	arch/arm/configs/msm8960_defconfig
	arch/arm/mach-msm/acpuclock-8064.c
	arch/arm/mach-msm/acpuclock-8930ab.c
	arch/arm/mach-msm/acpuclock-8960ab.c
	arch/arm/mach-msm/board-8064.c
	arch/arm/mach-msm/board-8960.c
	arch/arm/mach-msm/lge/mako/board-mako.c
	arch/arm/mach-msm/pm-8x60.c
	drivers/cpufreq/cpufreq_ondemand.c
	drivers/gpu/msm/adreno_ringbuffer.c
	drivers/media/video/msm_wfd/mdp-4-subdev.c
	drivers/media/video/msm_wfd/mdp-subdev.c
	drivers/staging/android/lowmemorykiller.c
	drivers/usb/otg/msm_otg.c
	drivers/video/msm/mdp.c
	drivers/video/msm/msm_fb.c
	drivers/video/msm/msm_fb.h
	include/linux/msm_mdp.h
	sound/soc/msm/msm-pcm-q6.c