media: Add initial support for msm8916

Enable initial media support for msm8916 target.

Change-Id: Ie76ce1161dc07cebe8f2a470859b06c0b477d5c1
mm-video-v4l2: venc: add support to configure initial qp

Enable setting initialqp and add support to allow setting initial
qp values to I P & B frames to encoder session.

Change-Id: I9bef96199c24ac64bff1f92dd6be3f256dc73220
mm-video-v4l2: venc: Add dynamic encoder settings support for 8916

To avoid DDR bus bandwidth issues on 8916 which has 1080p display panel,
it is required to set narrow search range and disable B-frames to lower bus
bandwidth access from venus sub system.

- Add support for narrow search range setting to set motion search range
- Disable B-frames, if encoding session resolution is more than 720p or wfd

Change-Id: Ie1630d8341bc9ad4f1964cdee3abb33fdde8ab0d
mm-core: Add 8916 target specific registry files

Add the OMX component registry files required for
8916 target.

Change-Id: I90704393c20e6927cdb2176c30eb3a95e002c38f
mm-core: 8916: Clean up HEVC hybrid and full DSP from registry table

Modify registry table to clean up HEVC hybrid and full DSP
solutions for 8916 target.

Change-Id: I57e3a1de0cf7e7ae61b54d89968e07b2abf75d93
mm-core: Add mpeg2 secure component role in 8916 registry table

During mpeg2 secure playback, the client calls the OMX_GetHandle
method which locates the component specified by the component name,
OMX.qcom.video.decoder.mpeg2.secure,and loads that component
into the memory.

This change adds mpeg2 secure component role in 8916 registry table.

Change-Id: Ie617a464ea866b11147c6d3b0d9d91637fad1341
mm-core: vdec: Add HEVC Hw video decoder support

Add new OMX component role for HEVC HW video decoder which
support on msm8939.

Change-Id: If4e77038d5213fa8973ff7f56d39bb87d0111830
mm-video: vidc: add support for 601 to 709 clamping in encoding

In meta mode, If input buffers received from Camera source contain 701 flag
then propagate same to video driver.

Change-Id: I184132d2e9cacc5249e132763b89b84fe3d13f04
mm-video: venc: handle zero-length invalid EOS buffers

Some clients (like GraphicsBufferSource) can queue meta buffer
with invalid handle for EOS, with filled length being empty.
Handle this case by queueing an internal color-conversion
buffer (if available) to propagate the EOS to output.
If a conversion buffer is not available, wait for a buffer
to be returned by the encoder.

Change-Id: Ib30e7063960939e7b764088afe9715f3c3d86d9f
mm-video: venc: Add property to enable narrow search range

Narrow search range is not required on 8916 target anymore
after the venus firmware version 21. Hence disabling narrow
search range parameter by adding a property command.
Use below property command to enable it when required.

adb shell setprop vidc.enc.narrow.searchrange 1

By default the property is disabled.

Change-Id: I1198646948d0b8f583c9c42a333fe01d7ea4d9d2
mm-video-v4l2: venc: Amend check for camera meta data buffer flags

Added a check to refer camera meta data buffer
flag only when it is allocated.

CRs-Fixed: 646476
Change-Id: Ie5dd9ef77af8b124801f83c91a4bcd78d365e755
mm-video: vidc: venc: add set ctrl to request sequence header

The omx component can explicitly request for sequence header
using the set ctrl id - V4L2_CID_MPEG_VIDC_VIDEO_REQUEST_SEQ_HEADER.
The omx component should not rely on the driver to
send sequence header on it's own.

Change-Id: Ie5c2adc11c15b84a7f659d75357a09b7758ea199
Kernel 3.10 compatibility

3.10 renamed a bunch of ioctls by prepending MSM_VIDC_ to them, so
make us compatible with those branches by aliasing these controls

Change-Id: I3f8dce6d172ab9b0d650f76ea36673f91d67728f
mm-video: vidc: Add OMX Vdec hevc component support for 8916

Modify make file to compile OMX Vdec HEVC SwVdec component
for 8916 target and modify the component code to use IOMMU
heap id instead of ADSP heap id.

Change-Id: I66ed9643a310f4ffd43d4a6f95961009395f580a

mm-video: vidc: Add port reconfig support to HEVC FULL SW

Add port reconfig support to OMX component for
HEVC full software solution.

Change-Id: I3f93d0533c83dd93cdf2c94b3a84781288ca3f33
CRs-Fixed: 645631

mm-video: vidc: Update codec config flag appropriately

Update codec config flag appropriately for HEVC full
SW. Also, fix heap corruption by freeing swvdec
output buffer pointer during free buffer.

Change-Id: I473504940214afce5011e2947b0d0cf47c5bde21
CRs-Fixed: 642370

mm-video: vidc: Add adaptive playback support for HEVC full SW

Add adaptive playback support for HEVC full SW and also
modify codec config flag appropriately.
Added error handling for SwVdec APIs

Change-Id: Ia531215da914e8d9e675acdabcc5d8a5b872988b
CRs-Fixed: 645631

mm-video: vidc: Added handling of error event from HEVC core module

Report hw error to client upon getting error event from HEVC core

CRs-Fixed: 652414

Change-Id: Ia182d67285752bfd9e742b4218b28ec0821efeab

mm-video-v4l2: Adjust p-frame count if b-frame count is modified

If the b-frame count is modified due to system limitations,
then the p-frame count needs to be adjusted so that i-frames
are returned at proper intervals.

Change-Id: I1d0daef40381086ee43174f8a276f7e7f6359123

mm-video: add hevc secure decoder component on 8939

Register a secure role for hevc decoder

Change-Id: Id0a763e47f479de174db55ff8067739332c7c6f3

mm-video: vidc: Switch HEVC over to the standard component

For targets which have Venus support for HEVC (8084 and 8092) use the
default component for decoder sessions.  This allows the specialised HEVC
component (libOmxVdecHevc) to be Q6 specific.

Change-Id: Ia1d47c0361b1c9261d29758590e3c2b89cd09ecd

mm-video: Define compatibility ioctls for 3.10 in HEVC SW decoder

Change-Id: I209b1369cf70f7e7b41124c850a0b26f20a02cf5
Don't build this dashplayer on 8916

 * Use the newer on in mm-dash instead.

Change-Id: I247208fd6439acf47566e399c3549067638b8da3