Browse Source

[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 <nicolas.dufresne@collabora.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Nicolas Dufresne 11 years ago
parent
commit
b9684a6032
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/media/platform/exynos4-is/fimc-m2m.c

+ 1 - 1
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;
 	*num_planes = f->fmt->memplanes;
 	for (i = 0; i < f->fmt->memplanes; i++) {
 	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;
 		allocators[i] = ctx->fimc_dev->alloc_ctx;
 	}
 	}
 	return 0;
 	return 0;