msm: vidc: Separate meta buffers support in secure mode

Extradata is appended at the end of each output buffer
in non secure video use case but in secure video playback,
the client/CPU don't have access to the output buffer
to parse the extradata. This change allows the client/CPU
to parse the extradata by allocating separate buffers for
video hardware to store extradata.

Change-Id: I12927ea3d142b9cecd6fb1ae1086c5624d0e08d6
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
msm: vidc: Remove kernel mapping on input/output buffers

This change will remove the kernel mapping of input and
output buffers for both video encoder and decoder to
avoid the errors resulting from ion_map_kernel() for
high resolution video concurrency use cases due to the
limited vmalloc space. It also removed the metadata
processing in kerner video driver as kernel virtual
address is removed. The metadata processing can be
done in user space video component.

Change-Id: I3f2c9b7c13b3e09097ce07ca7b59154b97401052
CRs-fixed: 471135
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
msm: vidc: Fix various NULL pointer accesses, memory leaks.

This commit fixes various NULL pointer and memory leak bugs.

Change-Id: I3b3ac40b5e440b9665858913921a06de14741b6f
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
msm: vidc: Add a check for separate metadata buffers

Added a check for separate metadata buffers based on
the board specific platform data.

Change-Id: I24d51329d93215da75d115ccfa8fc1f3fe260b7f
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
msm: vidc: Fix metadata buffer size issue

- Metadata buffer size is being set to zero when
  client calls set buffer requirements to video driver.
  This change fix it by properly assigning the
  metadata buffer size to video driver.
- When continuous mode enabled, do not get min_dpb
  from resource tracker for non-H264 codecs,
  for H264 codec get min_dpb from resource tracker.

Change-Id: Ie16bc47605edc6f67dbf3ae77290d4d764c5c613
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
msm: vidc: Allow client to set turbo mode

- Allow client to set TURBO performance level
  to video driver.
- Update max performance level to TURBO perf level
  on supported targets.

Change-Id: I0b3b38140d777984ba5062ddd614c07a002389ba
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
msm: vidc: Get the current performance level

This change supports client to get the current
performance level of the video driver via
IOCTL_GET_PERF_LEVEL. The current performance
level indicate the number of MBs per second
is being processed by video hardware.

Change-Id: Ic6f5b2b14e0d77bf801c4f857f8a0e20339c199f
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>