diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2019-06-18 12:45:20 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-06-24 14:31:23 -0400 |
commit | f74c0a29eca57e0024d31d41cbc4fc3d020bb42a (patch) | |
tree | 6f04bdd1af434562fee9945f475873a25a4bdbda /drivers/media | |
parent | 2719ef7d1b1107892923a1f5b7cbc28cccbdea3d (diff) | |
download | linux-f74c0a29eca57e0024d31d41cbc4fc3d020bb42a.tar.bz2 |
media: coda: do not enforce 512-byte initial bitstream payload on CODA960
On CODA960, sequence initialization can succeed if less than 512 bytes
are ready in the bitstream ring buffer.
On other variants, warn about too small payload in start_streaming.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/coda/coda-common.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index 19e3afa4f24d..1f1eb9685bc4 100644 --- a/drivers/media/platform/coda/coda-common.c +++ b/drivers/media/platform/coda/coda-common.c @@ -1790,7 +1790,9 @@ static int coda_start_streaming(struct vb2_queue *q, unsigned int count) coda_fill_bitstream(ctx, &list); mutex_unlock(&ctx->bitstream_mutex); - if (coda_get_bitstream_payload(ctx) < 512) { + if (ctx->dev->devtype->product != CODA_960 && + coda_get_bitstream_payload(ctx) < 512) { + v4l2_err(v4l2_dev, "start payload < 512\n"); ret = -EINVAL; goto err; } |