media: coda: always hold back decoder jobs until we have enough bitstream payload
authorPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 5 Nov 2018 15:25:01 +0000 (10:25 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 23 Nov 2018 10:26:24 +0000 (05:26 -0500)
commit51407c2da0b7baac581d0d9fbfc297d10b7d0424
tree6897d63239c5792b443f8eaf8cdce1a6a4ac2b32
parent6c0f5d236fd0205a8dca24b82cfad1b1c6c0a1e0
media: coda: always hold back decoder jobs until we have enough bitstream payload

The bitstream prefetch unit reads data in 256 byte blocks with some kind
of queueing. For the decoder to see data up to a desired position in the
next run, the bitstream has to be filled for 2 256 byte blocks past that
position aligned up to the next 256 byte boundary.
This should make sure we never run into a buffer underrun condition if
userspace does not supply new input buffers fast enough.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/coda/coda-common.c
drivers/media/platform/coda/coda.h