diff mbox

[5/5] s5p-fimc: Reuse calculated sizes

Message ID 1395780812.11851.20.camel@nicolas-tpx230 (mailing list archive)
State New, archived
Headers show

Commit Message

Nicolas Dufresne March 25, 2014, 8:53 p.m. UTC
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>
---
 drivers/media/platform/exynos4-is/fimc-m2m.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/media/platform/exynos4-is/fimc-m2m.c b/drivers/media/platform/exynos4-is/fimc-m2m.c
index 07b8f97..c648e5f 100644
--- a/drivers/media/platform/exynos4-is/fimc-m2m.c
+++ b/drivers/media/platform/exynos4-is/fimc-m2m.c
@@ -197,7 +197,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;