msm_fb: Make buffers aligned to 4K page boundary

This change makes the frame buffers aligned to the page
boundary. Improves GPU performance since accessing the
frame buffer from page boundary is faster.

CRs-fixed: 325134
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
(cherry picked from commit ede0a63aaa49024ac4a0a304bd5e32f34f6b6180)

Conflicts:

	arch/arm/mach-msm/board-msm7627a-display.c

Change-Id: I70d910a2f1afc484ee097dbacb6275f61ac38665
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/board-8930-display.c
	arch/arm/mach-msm/board-8960-display.c
	arch/arm/mach-msm/board-msm7x27a.c
	arch/arm/mach-msm/board-msm8x60.c
	drivers/video/msm/mdp4_overlay_dsi_video.c
	drivers/video/msm/mdp_dma_dsi_video.c
msm_fb: Clean up of frame buffer 4KB alignment changes

Remove redundant code from the 4 KB alignment patch
and reduce the overhead of calculation of the hole
size by using bitwise operators in its calculation.

CRs-fixed: 325134
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
(cherry picked from commit 0473d05091f0df4d85e4f6a162f55a9af8d3307b)

Change-Id: I05f8a6a5eb421b81da7e033cd1b0442067b0aed6
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dsi_video.c
	drivers/video/msm/mdp_dma_dsi_video.c
msm_fb: Fix error in y-offset check logic in FB driver

After 4 KB alignment changes, the frame from 3rd buffer doesn't
get updated since during PUT_VSCREEN_INFO ioctl, the driver
returns -1 to userspace due to error in logic because the hole
size is not considered in calculating the logic for validity of
the y-offset. Change fixes this error.

CRs-fixed: 325134
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
(cherry picked from commit d37b52404236bf4cadf530a238cafc5d6499d32a)

Change-Id: Ifccfa25a37fe0f8d86bf5b822d9affe7fa41203a
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm_fb: Clean up the fix for error in y-offset check in FB driver

There is a failure observed in yres_virtual offset check and every
third frame gets skipped without an error message. Due to this high
fps is noticed in the test applications. Correct the yres_virtual
offset check.

CRs-fixed: 325134
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
(cherry picked from commit 2bd101d5bed1729b317114456360605e86289c15)

Change-Id: I35af570df2d6d2609562203f30f3caa1506b9b1d
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm_fb: display: commit BLT to mdp register during video kickoff

BLT (writeback mode) need to be committed to mdp register
before kickoff. Normally, UI kickoff will follow immediatly
after BLT enabled/disabled. However sometimes video overlay
play happen before UI's pan display after BLT enabled/disabled.
In this case, video kickoff need to commit BLT to mdp register too.

Change-Id: I7b085f516f869009e7fc4b443f7858a61fce5ba3
Signed-off-by: kuogee hsieh <khsieh@codeaurora.org>
msm_fb: display: set mdp perf_level to low level after playing video

This bug fix sets mdp clk rate back to the rate for UI after playing
video to save power.

Change-Id: I73a0db158536b27a4a50d25b7737db4327210b8f
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
(cherry picked from commit 23fa9e7a958be09f9d6743cea026a4f56b84a48f)

Conflicts:

	drivers/video/msm/mdp4_overlay.c

Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>