diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2018-06-29 14:46:47 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-07-04 14:23:24 +0200 |
commit | 86b30a671b3bbe376ad7679ae3c1436c2a8f4510 (patch) | |
tree | ab985588a0df56c9f72960439176957cd3365414 /drivers | |
parent | media: coda: jpeg: allow non-JPEG colorspace (diff) | |
download | linux-86b30a671b3bbe376ad7679ae3c1436c2a8f4510.tar.xz linux-86b30a671b3bbe376ad7679ae3c1436c2a8f4510.zip |
media: coda: jpeg: only queue two buffers into the bitstream for JPEG on CODA7541
Padding the bitstream buffer is not enough to reliably avoid prefetch
failures. Picture runs with the next buffer's header already visible to
the CODA7541 succeed much more reliably, so always queue two JPEG frames
into the bitstream buffer.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/platform/coda/coda-bit.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c index 36c19983910b..e2994b3ddbf2 100644 --- a/drivers/media/platform/coda/coda-bit.c +++ b/drivers/media/platform/coda/coda-bit.c @@ -261,11 +261,12 @@ void coda_fill_bitstream(struct coda_ctx *ctx, struct list_head *buffer_list) while (v4l2_m2m_num_src_bufs_ready(ctx->fh.m2m_ctx) > 0) { /* - * Only queue a single JPEG into the bitstream buffer, except - * to increase payload over 512 bytes or if in hold state. + * Only queue two JPEGs into the bitstream buffer to keep + * latency low. We need at least one complete buffer and the + * header of another buffer (for prescan) in the bitstream. */ if (ctx->codec->src_fourcc == V4L2_PIX_FMT_JPEG && - (coda_get_bitstream_payload(ctx) >= 512) && !ctx->hold) + ctx->num_metas > 1) break; src_buf = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx); |