[media] coda: fix internal framebuffer allocation size
authorPhilipp Zabel <p.zabel@pengutronix.de>
Fri, 11 Jul 2014 09:36:15 +0000 (06:36 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Mon, 21 Jul 2014 18:52:37 +0000 (15:52 -0300)
This error was introduced by 5677e3b04d3b3961200aa2bb9cc715e709eafeb9
"[media] coda: update CODA7541 to firmware 1.4.50".

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>
drivers/media/platform/coda.c

index d7778015575c2e089ccf8eb6445e356958750a28..21c272ec481c5db5e8f5e253be94068a2f8e79cd 100644 (file)
@@ -1525,10 +1525,10 @@ static int coda_alloc_framebuffers(struct coda_ctx *ctx, struct coda_q_data *q_d
        for (i = 0; i < ctx->num_internal_frames; i++) {
                size_t size;
 
-               size = q_data->sizeimage;
+               size = ysize + ysize / 2;
                if (ctx->codec->src_fourcc == V4L2_PIX_FMT_H264 &&
                    dev->devtype->product != CODA_DX6)
-                       ctx->internal_frames[i].size += ysize/4;
+                       size += ysize / 4;
                ret = coda_alloc_context_buf(ctx, &ctx->internal_frames[i], size);
                if (ret < 0) {
                        coda_free_framebuffers(ctx);