aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/coda
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2015-01-23 13:51:35 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-02-02 10:38:21 -0200
commitcb06b705e3eaf2e3f69e6e5e2ded8b07b2711627 (patch)
treec0afebe888f38325a1d16f675b71bfb5cc45ab11 /drivers/media/platform/coda
parent[media] coda: allocate bitstream ringbuffer only for BIT decoder (diff)
downloadlinux-dev-cb06b705e3eaf2e3f69e6e5e2ded8b07b2711627.tar.xz
linux-dev-cb06b705e3eaf2e3f69e6e5e2ded8b07b2711627.zip
[media] coda: simplify check in coda_buf_queue
Now that the bitstream buffer is only allocated for the BIT decoder case, we can use bitstream.size to check for bitstream ringbuffer operation. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/coda')
-rw-r--r--drivers/media/platform/coda/coda-common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index 8bd1611cbb89..6f32e6d6b156 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -1154,6 +1154,7 @@ static int coda_buf_prepare(struct vb2_buffer *vb)
static void coda_buf_queue(struct vb2_buffer *vb)
{
struct coda_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue);
+ struct vb2_queue *vq = vb->vb2_queue;
struct coda_q_data *q_data;
q_data = get_q_data(ctx, vb->vb2_queue->type);
@@ -1162,8 +1163,7 @@ static void coda_buf_queue(struct vb2_buffer *vb)
* In the decoder case, immediately try to copy the buffer into the
* bitstream ringbuffer and mark it as ready to be dequeued.
*/
- if (ctx->use_bit && ctx->inst_type == CODA_INST_DECODER &&
- vb->vb2_queue->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) {
+ if (ctx->bitstream.size && vq->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) {
/*
* For backwards compatibility, queuing an empty buffer marks
* the stream end