v4l2: mpeg2: support multi-planar [1/1]
PD#SWPL-12624
Problem:
1. Enable V4L2 Mpeg2 decoder
2. Enable V4L2 Mpeg2 ucode parser to support secure mode
Solution:
* Use canvas linear mode
* Support NV21
* Add frame dump feature in aml_port
* Use width/heigh from IF layer before ucode is enable to parse it, it
will make sure canvas is correctly configured (not 0 width and height).
* Add 00 00 01 00 padding for every frame in unsecure mode
* pass buffer margin number from interface to decoder. Make sure
vdec_mpeg12_hw_s->buf_num and aml_vcodec_ctx->dpb_size are in sync.
* use completion to wait for decoder to parse the stream
* Also limite the buffer number returned from REQBUFS to ctx->dbp_size
It will prevent application from allocate more memory than enough.
Verify:
U212
Change-Id: Ib7542fccdde6a10f9ec38b5584b8b523d4d378dc
Signed-off-by: Song Zhao <song.zhao@amlogic.com>