mm-video: venc: allocate input buffers as uncached

YUV data written by CPU producers (MediaCodec apps) are not

Bug: 10192531

Change-Id: I1975b9b63ad4af474340ac366af32c8c3863b4bb
Merge "mm-video: venc: allocate input buffers as uncached" into klp-dev
am ed5cb4ad: Merge "mm-video: fix arithmetic on a pointer to void"

* commit 'ed5cb4add6597af7adb45c9c1b6fb63293c3461f':
  mm-video: fix arithmetic on a pointer to void
mm-video: vidc: Fix codec config behavior in flush

Send pending codec config data to the driver when flushing.
Reset intermediate buffers handles when input port is
disabled and port buffers are freed.

Bug: 11099331

Signed-off: Leena Winterrowd <lenhardw@codeaurora.org>
Change-Id: Ifd674b71ce04a4be16b564c53122ce5c5e4d92f1
mm-video: vidc: stability fixes in decoder

Synchronize access to extradata buffer which is allocated
and accessed in separate threads.
Do not unmap output handles in dynamic buffer mode when
buffers are freed (since they are unmapped already in FBD)

Bug: 11099331
Bug: 11366221

Signed-off: Leena Winterrowd <lenhardw@codeaurora.org>
Change-Id: I26d02c183d8496a52d4ded51c53f44eaf5e6e0b0
am a7cc922a: mm-video: vidc: Fix codec config behavior in flush

* commit 'a7cc922ab8aacc121d0abca2ba687d5551ad7523':
  mm-video: vidc: Fix codec config behavior in flush
am a943a925: mm-video: vidc: stability fixes in decoder

* commit 'a943a925f77029181f0bd74f6794ea4175819582':
  mm-video: vidc: stability fixes in decoder
mm-video: vidc: Fix codec config behavior in flush

Send pending codec config data to the driver when flushing.
Reset intermediate buffers handles when input port is
disabled and port buffers are freed.

Bug: 11099331

Signed-off: Leena Winterrowd <lenhardw@codeaurora.org>
Change-Id: Ifd674b71ce04a4be16b564c53122ce5c5e4d92f1
mm-video: vidc: stability fixes in decoder

Synchronize access to extradata buffer which is allocated
and accessed in separate threads.
Do not unmap output handles in dynamic buffer mode when
buffers are freed (since they are unmapped already in FBD)

Bug: 11099331
Bug: 11366221

Signed-off: Leena Winterrowd <lenhardw@codeaurora.org>
Change-Id: I26d02c183d8496a52d4ded51c53f44eaf5e6e0b0
merge in release branch changes (no-op).
am a44fe520: merge in release branch changes (no-op).

* commit 'a44fe520fdabcc8960f93dad69ac3ab01bf8509f':
  mm-video: vidc: stability fixes in decoder
  mm-video: vidc: Fix codec config behavior in flush
mm-video: vidc:  release registered buffers from driver

In some scenarios, component may restart from loaded to idle
state in the same context and it is resulting in the preapare
buf failure as previous buffers are not unregistered. Unregister
the buffers from driver while stopping the component.

b/11051201

Signed-off: Manikanta Kanamarlapudi<kmanikan@codeaurora.org>

Change-Id: I048cf715d2e83b05df99eaf10776cff0bbb2acd2
mm-video: venc: switch between executing and loaded.

when the v4l2 modules stopped, it will free all output
and input buffers. So when it is re-started again,
re-do the VIDIOC_REQBUFS command again.

b/11051201
Signed-off: Kim Zhang<xiazhang@codeaurora.org>
Change-Id: I7c6de237fdd7476ca4ebc7d1f1016e86f3af9d95
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.

b/11051201

Change-Id: Ie5c2adc11c15b84a7f659d75357a09b7758ea199
am 9051a983: mm-video: vidc:  release registered buffers from driver

* commit '9051a9833db84a4dad38adebc94fdb0861ae3b94':
  mm-video: vidc:  release registered buffers from driver
am 2e277fbe: mm-video: venc: switch between executing and loaded.

* commit '2e277fbebd51de1d4f029f7950ed2a98731177dc':
  mm-video: venc: switch between executing and loaded.
am cf840818: mm-video: vidc: venc: add set ctrl to request sequence header

* commit 'cf8408186605323a6797e5f431192ab434e79fff':
  mm-video: vidc: venc: add set ctrl to request sequence header
libc2dcolorconvert: fix arithmetic on a pointer to void

Use char* instead of void* for this
pointer arithmetic. Fixes the following:

hardware/qcom/media/libc2dcolorconvert/C2DColorConverter.cpp:321:70: error: arithmetic on a pointer to void
        srcSurfaceDef->phys0  = getMappedGPUAddr(fd, data, mSrcSize) + ((uint8_t *)data - (uint8_t *)base);
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
hardware/qcom/media/libc2dcolorconvert/C2DColorConverter.cpp:333:70: error: arithmetic on a pointer to void
        dstSurfaceDef->phys0  = getMappedGPUAddr(fd, data, mDstSize) + ((uint8_t *)data - (uint8_t *)base);
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^

Change-Id: Ia3d17a9e47811da118abc7802e64adc1d5c0cddf
Merge "libc2dcolorconvert: fix arithmetic on a pointer to void"
Merge commit '0405148deab7219f9d79ae521601c7bf29966702' into HEAD