media: amphion: decoder copy timestamp from output to capture
authorMing Qian <ming.qian@nxp.com>
Wed, 20 Apr 2022 11:34:53 +0000 (13:34 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 13 May 2022 09:02:19 +0000 (11:02 +0200)
commita4dca209f23470f20b61b40cca417a5bf6ea8533
tree85808691a9a6fa0f801be30b6b460c10d5da1d55
parent215d49a41709610b9e82a49b27269cfaff1ef0b6
media: amphion: decoder copy timestamp from output to capture

copy the timestamp using the helper function
V4L2_BUF_FLAG_TIMESTAMP_COPY

To implement this, driver will keep the output buffer until it's
decoded, in previous, driver will return the output buffer immediately
after copying data to stream buffer.

After that, there is no need to make a workaround for poll function.
driver can use v4l2_m2m_fop_poll directly.
Also, driver don't need to keep a input threshold
as the buffer count is up to only 32.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/amphion/vdec.c
drivers/media/platform/amphion/vpu_malone.c
drivers/media/platform/amphion/vpu_v4l2.c
drivers/media/platform/amphion/vpu_v4l2.h