aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/coda.c
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2013-06-21 03:55:29 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-07-26 12:15:03 -0300
commit2039749ec219b7cbc81dfa509423d3330eaf07d0 (patch)
tree68adbfba25666b330ad691a50687a5bcacab0345 /drivers/media/platform/coda.c
parent[media] coda: dynamic IRAM setup for encoder (diff)
downloadlinux-dev-2039749ec219b7cbc81dfa509423d3330eaf07d0.tar.xz
linux-dev-2039749ec219b7cbc81dfa509423d3330eaf07d0.zip
[media] coda: do not allocate maximum number of framebuffers for encoder
The encoder only ever needs two buffers, but we'll have to increase CODA_MAX_FRAMEBUFFERS for the decoder. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/coda.c')
-rw-r--r--drivers/media/platform/coda.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index f6d790af5a2d..6597d6707f13 100644
--- a/drivers/media/platform/coda.c
+++ b/drivers/media/platform/coda.c
@@ -1006,7 +1006,6 @@ static int coda_alloc_framebuffers(struct coda_ctx *ctx, struct coda_q_data *q_d
ysize = round_up(q_data->width, 8) * height;
/* Allocate frame buffers */
- ctx->num_internal_frames = CODA_MAX_FRAMEBUFFERS;
for (i = 0; i < ctx->num_internal_frames; i++) {
ctx->internal_frames[i].size = q_data->sizeimage;
if (fourcc == V4L2_PIX_FMT_H264 && dev->devtype->product != CODA_DX6)
@@ -1356,6 +1355,7 @@ static int coda_start_streaming(struct vb2_queue *q, unsigned int count)
goto out;
}
+ ctx->num_internal_frames = 2;
ret = coda_alloc_framebuffers(ctx, q_data_src, dst_fourcc);
if (ret < 0) {
v4l2_err(v4l2_dev, "failed to allocate framebuffers\n");