aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/coda/coda.h
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel@collabora.com>2020-11-03 22:32:37 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-11-16 10:31:16 +0100
commit8297ae5c29fc715d1da2e057852053dd900c99a6 (patch)
tree81a2daaaec255a1bfd638c93a702ef4af30256cf /drivers/media/platform/coda/coda.h
parentmedia: staging: rkisp1: isp: set metadata pads to MEDIA_BUS_FMT_METADATA_FIXED (diff)
downloadlinux-dev-8297ae5c29fc715d1da2e057852053dd900c99a6.tar.xz
linux-dev-8297ae5c29fc715d1da2e057852053dd900c99a6.zip
media: coda: coda_buffer_meta housekeeping fix
It's possible that the VPU was initialized using just one buffer, containing only codec headers. In this case, right after the initialization and after updating the FIFO read pointer, we need to iterate through all the coda_buffer_meta and release any metas that have been already used by the VPU. This issue is affecting indirectly the bitstream buffer fill threshold, which depends on the meta end position of the first queued meta, which is passed to coda_bitstream_can_fetch_past(). Without this fix, it's possible that for certain videos, the bitstream buffer level is not filled properly, resulting in a PIC_RUN timeout. Reported-by: Benjamin Bara <benjamin.bara@skidata.com> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> 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/coda/coda.h')
-rw-r--r--drivers/media/platform/coda/coda.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/coda/coda.h b/drivers/media/platform/coda/coda.h
index b81f3aca9209..e53f7a65d532 100644
--- a/drivers/media/platform/coda/coda.h
+++ b/drivers/media/platform/coda/coda.h
@@ -259,6 +259,7 @@ struct coda_ctx {
struct list_head buffer_meta_list;
spinlock_t buffer_meta_lock;
int num_metas;
+ unsigned int first_frame_sequence;
struct coda_aux_buf workbuf;
int num_internal_frames;
int idx;