summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.h
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@chromium.org>2021-08-06 06:15:20 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-09-30 10:07:41 +0200
commit69466c22f51bb0085ed886f5a5b3db7368245872 (patch)
treef15ce6dcbe6ad58985156c52850bd293076c5ab7 /drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.h
parent25e7f7d3c483dc91a1d5ea008c9ff14b72fb5050 (diff)
downloadlinux-69466c22f51bb0085ed886f5a5b3db7368245872.tar.bz2
media: mtk-vcodec: make flush buffer reusable by encoder
The flush buffer is a special buffer that tells the decoder driver to send an empty CAPTURE frame to the client with V4L2_BUF_FLAG_LAST set. We need similar functionality for the encoder ; however currently the flush buffer depends on decoder-specific structures and thus cannot be reused with the encoder. Fix this by testing for this buffer by its VB2 address, and not through a dedicated flag stored in a higher-level decoder structure. This also allows us to remove said flag and simplify the code a bit. Since the flush buffer should never be used in the stateless decoder, also add safeguards to check against it. Signed-off-by: Alexandre Courbot <acourbot@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>
Diffstat (limited to 'drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.h')
-rw-r--r--drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.h b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.h
index cf26b6c1486a..1f8b7300dce6 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.h
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.h
@@ -40,7 +40,6 @@ struct vdec_fb {
* @queued_in_vb2: Capture buffer is queue in vb2
* @queued_in_v4l2: Capture buffer is in v4l2 driver, but not in vb2
* queue yet
- * @lastframe: Intput buffer is last buffer - EOS
* @error: An unrecoverable error occurs on this buffer.
* @frame_buffer: Decode status, and buffer information of Capture buffer
*
@@ -52,7 +51,6 @@ struct mtk_video_dec_buf {
bool used;
bool queued_in_vb2;
bool queued_in_v4l2;
- bool lastframe;
bool error;
struct vdec_fb frame_buffer;
};