msm_fb: display: Add support vsync driven composition for 7x30

This patch will queue multiple surfaces and commit those
surfaces into mdp at same instance so that surfaces will
be blended and displayed at same time for 7x30. Hardware vsync event
is delivered to the user space frame work via uevent. Both
queue and commit are controlled by frame work and synchonized
with vsync event. Therefore frame rate will match with vsync rate.

Change-Id: I59d672d12f69bd964eb59c78ba0b86ddec57fe74
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp.c
	drivers/video/msm/mdp4_overlay.c
	drivers/video/msm/mdp4_overlay_mddi.c
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
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
(cherry picked from commit 3c5ae1f883a8b6a7812d936c5f7e5bb4d0d3142b)

Change-Id: Ib508011628ee81a90b29d30f14429cf186c47ebe
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
msm_fb: display: add support of mdp clocks controlled by vsync

Mdp related clocks are controlled through vsync enable/disable
ioctl from userspace frame work.

Crs-fixed: 384482
CRs-Fixed: 409970
Change-Id: I5999ad17955e0f862f64036a6390016ff3a6782f
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp.c
	drivers/video/msm/mdp4.h
	drivers/video/msm/mdp4_overlay_dsi_cmd.c
	drivers/video/msm/mdp4_overlay_mddi.c
	drivers/video/msm/mipi_dsi.h
msm_fb: display: Fix blend configuration for MDDI I/F

MDP4.0 blend operation registers are not double buffered and
take effect as soon as they are configured. Configuring these
registers at any place other than between dma and vsync produce
flickers as new blend values would get applied to previous
mixer configurations. Configure blend operation registers just
after dma is over, before vsync.

CRs-Fixed: 410029
Change-Id: I2d04b2edb1e6592ac192fd00d302d8941a56ad69
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
board-msm7x30: display: Increase the camera heap for 720p

There is not enough memory for 720p video play when played
on external interface. Hence increase camera heap by 1 frame
of 720p resolving the playback issue on external interface.

CRs-Fixed: 410088
Change-Id: I40eb108e6d03eb371ad63c03154eaab59760dd2b
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
diag: Fix various issues with IOCTLs

DIAG kernel driver interacts with user space processes using
IOCTLS. Some issues, such as potential integer over/underflow,
incorrect buffer copy etc were identified in these functions.
This change fixes them.

Fix for the following CVE-
CVE#1 CVE-2012-4220
CVE#2 CVE-2012-4221

CRs-Fixed: 385352, 385349
Change-Id: Ie37dbda0acdc63fb440bd81d7f57c146f314b91a
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
msm:vidc: Amend error checks on ION API failures

This change will validate the ION API failures
to fix target freeze issues.

CRs-fixed: 412958
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
(cherry picked from commit 31bb7dc8e3a4d01262727349b30bb3007fd474bd)

Conflicts:

	drivers/video/msm/vidc/720p/ddl/vcd_ddl_utils.c
	drivers/video/msm/vidc/common/vcd/vcd_sub.c

Change-Id: I6d0dc8afef6ba1513c2ea29753f7df6b1a3d70e9
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm_serial_hs_hwreg.h: Correcting the even parity and odd parity bits

Currently parity bits are defined to be used with UART_DM_MR2
register with PARITY_MODE Bit as below :
EVEN_PARTIY = 1 and ODD_PARITY = 2
With these values, UART functionality doesn't work after enabling parity.
Hence adding correct used PARITY_MODE bits value as
EVEN_PARITY = 2 and ODD_PARITY = 1
after confirming with UART hardware programming guide.

CRs-Fixed: 410377
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
(cherry picked from commit fd40e5f6313fbc74e8897927be1004faa5d9df08)

Change-Id: Ia7461d1983336b1d965498ede00001cc67c1d925
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
drivers:video:msm: fix compile
lib/genalloc: reset back to caf
fix build