]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: mtk-vcodec: venc: support START and STOP commands
authorAlexandre Courbot <acourbot@chromium.org>
Fri, 6 Aug 2021 04:15:21 +0000 (06:15 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 12 Aug 2021 13:45:31 +0000 (15:45 +0200)
commitedc06520deca1a2253f79c0e26b81010228d2ba7
treedd6ff9044c781f01be849d400f02dd878ba44508
parent3f6d11fd8b7b0cc2d36f2f9bb0bf0d0cf1e2d80b
media: mtk-vcodec: venc: support START and STOP commands

The V4L2 encoder specification requires encoders to support the
V4L2_ENC_CMD_START and V4L2_ENC_CMD_STOP commands. Add support for these
to the mtk-vcodec encoder by reusing the same flush buffer as used by
the decoder driver.

[hsinyi: fix double-free issue if flush buffer was not dequeued by the
time streamoff is called]

Signed-off-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h
drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c