Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e55317e7 authored by Philipp Zabel's avatar Philipp Zabel Committed by Mauro Carvalho Chehab
Browse files

[media] coda: allocate bitstream ringbuffer only for BIT decoder



The BIT encoder does not use a per-context bitstream ringbuffer as it encodes
directly into the videobuf2 capture queue's buffers. Avoid allocation of the
bitstream ringbuffer for encoder contexts.

Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarKamil Debski <k.debski@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent a22496c6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1689,7 +1689,8 @@ static int coda_open(struct file *file)
			v4l2_err(&dev->v4l2_dev, "failed to allocate parabuf");
			goto err_dma_alloc;
		}

	}
	if (ctx->use_bit && ctx->inst_type == CODA_INST_DECODER) {
		ctx->bitstream.size = CODA_MAX_FRAME_SIZE;
		ctx->bitstream.vaddr = dma_alloc_writecombine(
				&dev->plat_dev->dev, ctx->bitstream.size,