msm: display: Fix composition issues when framework rebooted in suspend.

Currently, if framework is rebooted while in suspend mode, borderfill
is not unset due to which MDP composition can not be enabled. This patch
fixes the issue.

Change-Id: I8b671eccedebf2bb08724cf2d284d4ab27a71360
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4.h
	drivers/video/msm/msm_fb.c
msm_fb: display: clean-up mdp4_dsi_cmd_show_event
msm: display: Limit dynamic fps feature only to MIPI video panels.

As dynamic fps feature is supported only for MIPI video panels,
return -EINVAL if sysfs node is written for panels other than
MIPI video. This change also removes world writable permissions
for sysfs node.

Change-Id: I72260e6032cb8a758b0457c36a808263a981260f
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
msm_fb: Handle vsync interrupt properly on MDP 3.03 targets

Handle enabling/disabling the vsync interrupt and mdp clock
enabling/disabling in a better way on MDP 3.03 targets. This
will avoid target crashes due to unclocked register access.

CRs-fixed: 388751
Change-Id: I5c4a409772464ce7d06869374dcba5ad7e335955
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp.c
msm_fb: Make Vsync IOCTL during disable sequence as NO WAIT

Change to make the vsync IOCTL no wait during the disable sequence.
This is to increase the performance. Handle the synchronization of
vsync interrupt using state variables in drivers from now.

Change-Id: Ia5ec14493f233a95f21d01ea627200a6c278239f
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb: display: Send vsync events using sysfs for MDP3 targets

Replace sending of vsync timestamp using uevents with sysfs entry
as uevent result in increase in power numbers due to broadcast in
nature.

Change-Id: I22cfbd68c8bcbe4a47e94074393f1cbf79920c58
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp_dma.c

Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp.c
	drivers/video/msm/mdp_dma_dsi_video.c
	drivers/video/msm/mdp_dma_lcdc.c
msm_fb: display: Create sysfs entries in mdp_probe for MDP3 targets

vsync sysfs entries should be created in mdp_probe instead of
creating in panel on. This avoids waiting for the first event
control in framework

Change-Id: I18b05b8d2a65d489afc6e3274ec8dc7a5b9a5f9a
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp.c
msm: display: maintain smmu for secure video

Currently video maps and unmaps the secure memory.
It could be too early to unmap it.
Rotator and MDP will maintain this, only unmap it when
no more needed. Memory managr has a refence count for it.

Change-Id: I5ca7cb09c0ad4b9e39808e937c2f50264727730c
Signed-off-by: Ken Zhang <kenz@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/clock-8960.c
	drivers/char/msm_rotator.c
	drivers/video/msm/mdp4.h
	drivers/video/msm/mdp4_overlay.c
msm_fb: display: add wfd suspend/resume to early suspend

wfd on/off was handled by fb_on/fb_close which are called from video
or userspace side. However, this is not the case for this branch. mdp
driver has to register wfd for suspend to make sure proper panel
on/off happen.

Change-Id: If1836598e5ae95e4b2b72e40dc85784a0d20c843
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp.c
	drivers/video/msm/mdp4_overlay_writeback.c
msm: display: Add DSI clock control for MDP GDHS power collapse

Enable DSI clock and regulator before enabling/disabling power collapse
for MDP GDHS.

(cherry picked from commit ad3200279e62eff01fd1bb9136cc9c0d11e10380)

(cherry picked from commit 58c5992c710df379e26bb210e00c74da501db9d2)

Change-Id: I76b91260c61abf214e688c0dea6989ed2cfa3801
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/board-8064-regulator.c

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

Conflicts:

	arch/arm/mach-msm/board-8064-regulator.c
	arch/arm/mach-msm/board-8930-regulator-pm8038.c
	drivers/video/msm/mdp.c
	drivers/video/msm/mipi_dsi.h
msm: display: mdp.c cleanup
msm: display: Proper handling of prepare and unprepare clocks

This change handles prepare and unprepare clocks properly to
fix clock mismatches.

Change-Id: I09986aa1f0e1a5be2e07655a1db0d23760dd0725
Signed-off-by: Sangani Suryanarayana Raju <csuryan@codeaurora.org>

Conflicts:

	drivers/video/msm/mipi_dsi.c
defconfig: enable standalone power collapse
Merge commit 'c1aa3501dc851ef050c8d19df0d3b9cdf02afa3f' into cm-10.1-stable
vidc: Fix EOS handling if video h/w has a frame in transaction

In case of video hardware is encoding a frame and EOS buffer with
with zero data length arrived, set the EOS flag to the transaction
available in the transaction table which will be passed to the
client in frame done callback from the video hardware.

Signed-off-by: Praveen Chavan <pchavan@codeaurora.org>

Conflicts:
	drivers/video/msm/vidc/common/vcd/vcd_sub.c

Change-Id: Ia5711d30a6d19d828797690dbede82c7d55923bf
msm: vidc: Adds AU delimiter support for AVC.

Add new V4L2 control to set AU delimiter for AVC.

Change-Id: I8c72cb89f18c9b2b550b906d797eafb73ac4ebbe
CRs-Fixed: 389030
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>

Conflicts:
	drivers/media/video/msm_wfd/enc-mfc-subdev.c
	include/linux/videodev2.h
	include/media/msm/vcd_property.h
media: v4l2: add video controls in v4l2 framework.

Adds control definitions in v4l2 framework needed for
configuring video codec properties. Userspace clients
and in-kernel clients can make calls into video driver
to set/change codec properties like codec, profile, level,
resolution, bitrate, ratecontrol, framerate.

Change-Id: I6396106af69b2686a78b83d5833cd60a1c6d4cef
Signed-off-by: Ashray Kulkarni <ashrayk@codeaurora.org>

Conflicts:
	include/linux/videodev2.h
msm: vidc: Adds VUI timing info support for AVC encoding.

Poor video quality is observed as VUI fps information is not present in
the encoded bit stream. Add support for VUI timing info in video driver
and an additional V4L2 control to set from user space.

CRs-Fixed: 399017
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
Conflicts:

	include/linux/videodev2.h

Change-Id: I970d4c479009da2d08531a9e9b8489a84cc5d44c
Signed-off-by: Neha Pandey <nehap@codeaurora.org>

Conflicts:
	drivers/media/video/msm_wfd/enc-subdev.h
	drivers/media/video/msm_wfd/wfd-ioctl.c
	drivers/video/msm/vidc/1080p/ddl/vcd_ddl_shared_mem.c
	drivers/video/msm/vidc/1080p/ddl/vcd_ddl_shared_mem.h
	include/media/msm/vcd_property.h
msm: vidc: add support for the bitstream_restrict flag

Adds support for the MFC core to add the bitstream_restrict flag in the
sps/pps for H264 codecs.  This allows for the decoder to determine how
many frames to buffer when decoding.

Change-Id: Ic0de960d92a771d74c303dac7100734d6411fc45
Signed-off-by: Deepak Verma <dverma@codeaurora.org>

Conflicts:
	drivers/video/msm/vidc/common/enc/venc.c
	include/linux/msm_vidc_enc.h
	include/media/msm/vcd_property.h