msm: vidc: Extract PAR info for MPEG4/DIVX.

Display needs the pixel aspect ratio information
from the video decoder to display the picture
with the right aspect ratio. Video decoder extracts
the pixel aspect ratio information from the
video core and passes it to the client/display
as extradata.

Change-Id: I513e93bb8c2c08aa7ad85e5b82718cb9dab724ec
Signed-off-by: Arun Menon <menon@codeaurora.org>
vidc: 1080p : Add support for slice delivery mode to encoder

Slice delivery mode enables confguring the encoder to deliver
one slice per output buffer. This mode is valid only for h264
codec when multi slice config is set to slice by mb.

Change-Id: Ibc9f3193faa3e1bc6009a6521475ef15966fc7c1
Signed-off-by: Pradnya Chaphekar <pradnyac@codeaurora.org>
vidc: 1080p : Add support for skip frame in slice delivery mode

Slice delivery mode for H264 encoder will deliver constant number of
output slice buffers for each frame. In case of CBR rate control method,
core will skip frames to maintain the output quality, in which case
driver need to send out the output buffers with data length as zero
for skipped frame output type from the core.

Change-Id: Id81330b28f1f17b97eb2c79c86558bd072b62c4e
CRs-fixed: 362356
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
video: msm: wfd: Add turbo mode support

Add support for userspace to push the video core clock to maximum
supported by hardware.

Change-Id: I47295d0fc67d32302312600a90359be23e3fc2c2
CRs-Fixed: 361108
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
msm: vidc: suppress non-fatal error messages.

These messages are non-fatal and appear frequently
during video session. Hence suppressing them.

CRs-fixed: 389408
Signed-off-by: Arun Menon <menon@codeaurora.org>
(cherry picked from commit 24631e349a3f306cc3b06fb411d5fb1f7ac8f0ae)

Conflicts:

	drivers/video/msm/vidc/1080p/ddl/vcd_ddl_shared_mem.c
	drivers/video/msm/vidc/1080p/ddl/vcd_ddl_utils.c

Change-Id: Ifb874912ac79c863ed8fc531272d3822d8aebebe
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm:vidc: add support for pause in eos state

This commit will add support for pause command in
eos state along with run state of the video driver.

(cherry picked from commit da817ebe8a4dea682b2cc9beaa582e0f0f0f0112)

Change-Id: Ia75c7ee43fb13cab5898ded69459469ddec4be54
CRs-fixed: 387562
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
vidc: 1080p: Handle flush for interlaced clips.

Video core expects one field per buffer for interlaced
clip playback.If a flush is issued we should reset the
need next field flag, so that new bitstream is processed
after flush is completed.
Reconfig flag shouldn't be reset in case of EOS.

Change-Id: Idf50a24c29e904a958b0b1e850813e2d9fc4346d
CRs-fixed: 382368
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
(cherry picked from commit f19f4d27088015842f9bd0945f62b34e90fd784d)
vidc: 1080p: IDR picture type support for H264 format

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

Change-Id: Ic677eb4d28469f6712832b7e09050467420eb70b
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
(cherry picked from commit b2295e885966a000cceedcfd4a6462113fe3be4a)
vidc: Handle EOS with Codec config buffer.

Change will handle codec config buffer with EOS.
Video driver will make sure that the codec config buffer with
EOS will be requeued in case of reconfig and non-reconfig paths.

(cherry picked from commit 43b203869814fe5f0ddcb265a8f859aebdaa652f)

Change-Id: I424df5628aaededcbd65c36d369410909e46c515
CRs-fixed: 399347
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
msm: vidc: Reset data corrupt flag for non-H264 decoder

Core does not set display correctness flag on decoder
output buffers for non H264 video codec. With this change,
we reset the data corrupt flag for non-H264 codec.

CRs-fixed: 397599
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
(cherry picked from commit fde67e239d8ac3a1e983b7d82d0c37af47464138)

Change-Id: I8247e9dff7a66b9538b102df158dfe1bca0d937c
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm: vidc: Enable turbo mode based on client request.

- video core is bumped up to turbo mode, if more performance
  level required from multiple clients.

- Enable turbo mode atleast one of client set turbo mode.

Change-Id: I579715b85e857ad194810c06a361448b775e470e
CRs-Fixed: 385454
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
vidc: 1080p: Reset meta data offset to zero

For multi-resolution clips, the meta data offset used while
doing cache clean of meta data buffer is from the previous
resolution & resulting in kernel panic. Resetting the offset
to zero during meta data buffer initialization for new
resolution fixes the issue.

CRs-fixed: 386245
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
(cherry picked from commit 16145bcbd6af8db0eebc0eedec1f01ee1b0b3635)

Change-Id: I249c0cd220f8fa4f815488a9a321a398752329e4
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>