From: Nicolas Dufresne Date: Tue, 25 Mar 2014 20:53:32 +0000 (-0300) Subject: [media] s5p-fimc: Reuse calculated sizes X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b9684a60328255aadcfff0893b7eaec0e8a308d2;p=linux-beck.git [media] s5p-fimc: Reuse calculated sizes This formula did not take into account the required tiled alignement for NV12MT format. As this was already computed an stored in payload array initially, reuse that value. Signed-off-by: Nicolas Dufresne Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/exynos4-is/fimc-m2m.c b/drivers/media/platform/exynos4-is/fimc-m2m.c index 417a6781e93f..0ad1b6f84a27 100644 --- a/drivers/media/platform/exynos4-is/fimc-m2m.c +++ b/drivers/media/platform/exynos4-is/fimc-m2m.c @@ -196,7 +196,7 @@ static int fimc_queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt, *num_planes = f->fmt->memplanes; for (i = 0; i < f->fmt->memplanes; i++) { - sizes[i] = (f->f_width * f->f_height * f->fmt->depth[i]) / 8; + sizes[i] = f->payload[i]; allocators[i] = ctx->fimc_dev->alloc_ctx; } return 0;