msm: Update FB and MDP driver to latest from CAF
msm: Update Video Core driver to latest from CAF
vidc: 720p: Set DB line buffers in case of reconfig

In the case of multi resolution H263 clip, there is
no response from the core. With fixes in video f/w,
there is a problem in reconfig. Fixed by setting the
DB line buffers to the core again in the case of
reconfiguration.

CRs-Fixed: 303874
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
(cherry picked from commit d292ddd67b5eb550d02520403ea2ad1d72957189)

Change-Id: I5c794bb016636780cf0f37426d91c4ed9935a80c
Signed-off-by: swetha <sbasin@codeaurora.org>
msm: vidc: Fix handling EOS with bitstream error.

If the EOS frame has codec config flag set and decoder
return status is bitstream error, then driver was
handling EOS done before the core returned with EOS done.

Fixed by adding a check in the driver to not handle EOS done
until the core returns with EOS done.

CRs-Fixed: 320107

Signed-off-by: Deepika Pepakayala <deepikap@codeaurora.org>
(cherry picked from commit a86367e34880ba37cabc0a6041300c0e3ae2424b)

Change-Id: I67d891d38cf746245fb26600b15d05f38c679b02
Signed-off-by: Swetha Basineni <sbasin@codeaurora.org>
vidc: vdec: Buffer optimization for smooth streaming.

Smooth streaming client has the buffer count optimized
to lower value than profile and level based counts for
H264 decoder. Adding support in driver to take advantage
of lower buffer count to optimize memory requirements
for smooth streaming.

Signed-off-by: Gopikrishnaiah Anandan <gopikr@codeaurora.org>
msm: vidc: Preventing dereference pointers and array
out of bounds

Preventing a dereference pointer, and adding logic to prevent
array out of bounds

Change-Id: I8b21e4cb25a3dbb13c907d84c7ea342a12eed468
Signed-off-by: Eduardo Carrasco <cecarras@codeaurora.org>
msm: vidc: enable thumbnail mode with single output buffer

Generate thumbnails using 720p core with single video decoder
output buffer.

Change-Id: I51453f240ab38abd5326df96ea407981c6806f6b
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
vidc: Add metabuffer mode support for encoder driver.

Video encoder driver when configured in meta buffer mode,
will allow clients to register buffers in data path.

Change-Id: I23e2cb07386461275da5731134d8aad7df1cd060
Signed-off-by: Gopikrishnaiah Anandan <gopikr@codeaurora.org>
vidc: 720p: Fix for H264 thumbnail generation

Core is sending non frame data error for SPS and
PPS, which is communicated as a fatal error to
the component in case of idr only mode. Fixed this
by sending it as a bit stream error.

CRs-Fixed: 326563
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
(cherry picked from commit f365b26933818f0073aa99b2b2624c703e19a833)

Change-Id: I9b5346a53d55d2a651c2e425c43388df610d7a16
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
vidc: 720p: Add IDR Frame type support for H264 format

Read IDR frame type from 720p core register set and
propagate it to user space using new IDR frame type
enumeration added in api header file. The IDR frame
type info is used in SYNCFRAME logic for H264 format
in userspace.

CRs-Fixed: 296738
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
vidc: Make more pr_info()s into pr_debug()s

The logging messages in the vdec driver are for debug purposes.
Replace the info printks with debug printks. If desired they can
be turned on individually via

 # mount -t debugfs none /sys/kernel/debug
 # echo -n "file vdec.c +p" > /sys/kernel/debug/dynamic_debug/control

Finer based prints can be done on a line by line basis as well.

Change-Id: I5b6f94e13724036d02c25d1d478d25ca2555dfa2
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
msm_fb: display: Add YV12 support in the MDP

Added changes to support YV12 input format in the MDP.

Change-Id: I23fb10ea30117e20de654d9516f7d024b99f6c96
Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm_fb: display: cleanup usage of shared pipes in overlay

Remove usage of shared pipes. Shared pipes are used to allow VG pipes to
play both video and rgb formats. This can now be handled by calling
overlay set ioctl with new format, that means shared pipes are no longer
needed and can cause instabilities if not used properly.

CRs-Fixed: 312209
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
(cherry picked from commit cb8fbbcbe0630451ba582a0747987c48b2c603f1)

Conflicts:

	drivers/video/msm/mdp4.h

Change-Id: I0f36f65db00884b017a5bad4670794cd65e2c5e5
Signed-off-by: swetha <sbasin@codeaurora.org>
msm_fb: display: Use __va instead of ioremap for framebuffer memory map

Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
video: msm: Block histogram requests with powered down panel

This causes MSMFB_HISTOGRAM ioctls to return an error when they are called
after the panel has entered a powered down state.

CRs-Fixed: 310429
Change-Id: I39c768c62a37ca83df2db2309230971cb6492bab
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
video:msm: Adding stub for MSMFB_MDP_PP ioctls

Basic handling of invalid copy_from_user and op from an invalid range.

Change-Id: I788b28d3804e7312ee18310011c75d11287c4c6c
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
msm_fb: display: Use spinlock instead of mutex in vsync timer handler

Use spinlock instead of mutex in vsync timer handler to avoid sleeping
from timer context through mutex locks

Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
msm_fb: display: update busy flag before check blt_addr

dma_busy flag is set to TRUE on every vsycn push and set it
to FALSE at overlay0_done ISR. When blt disable, dma_busy need
to be set to FALSE before return due to blt_addr == NULL at
overlay0_done ISR.

Change-Id: If2622631a7cd03276ae7fbd8326155d0e9c7b66b
Signed-off-by: kuogee hsieh <khsieh@codeaurora.org>
msm_fb: display: fix mdp clk rate settings

If the video resolution is changed from higher to lower, mdp clk rate
cannot be changed before overlay_play. Otherwise, underrun may happen
because of a lower mdp clk rate for current higher resolution
frames. On the other hand, if the res is changed from lower to higher,
mdp clk rate must be changed before overlay_play to avoid underrun.

CRs-fixed: 327811
Change-Id: Ieac4d2e1644e5687e3506b37799c56e19a17b991
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dsi_video.c
msm_fb: display: fix underrun seen for some YV12 format input

Underruns seen on display because source rectangle width is
aligned to 16 before being passed to MDP. Only ystride should be
aligned, source rectangle should be passed as received.

CRs-Fixed: 329453
Change-Id: Ibb71ad316023d21ebad4c5db37fdc5e5c8acb02b
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>