This patch is dependent on the patch
[PATCH 4/4] OMAP2/3 V4L2: Add support for OMAP2/3 V4L2 driver on top of DSS2

>From eb4302232f15e0af075604a9cf24fcaa9688e8a5 Mon Sep 17 00:00:00 2001
From: Kishore Y <kishor...@ti.com>
Date: Tue, 10 Nov 2009 21:44:10 +0530
Subject: [PATCH] omap_vout: Change allocated buffer to only needed size
 This patch change allocation size of IO buffers to allocate
 only needed size depending on pix.width, pix.height and bytes
 per pixel. The buffer size is rounded to allocate always a PAGE_SIZE multiple

Signed-off-by:  Kishore Y <kishor...@ti.com>
---
 drivers/media/video/omap/omap_vout.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/omap/omap_vout.c 
b/drivers/media/video/omap/omap_vout.c
index a13f65e..8064c2d 100644
--- a/drivers/media/video/omap/omap_vout.c
+++ b/drivers/media/video/omap/omap_vout.c
@@ -855,6 +855,8 @@ static int omap_vout_buffer_setup(struct videobuf_queue *q, 
unsigned int *count,
 
        /* Now allocated the V4L2 buffers */
        *size = vout->buffer_size;
+       *size = vout->pix.width * vout->pix.height * vout->bpp;
+       *size = PAGE_ALIGN(*size);
        startindex = (vout->vid == OMAP_VIDEO1) ?
                video1_numbuffers : video2_numbuffers;
        for (i = startindex; i < *count; i++) {
-- 
1.5.4.3


Regards,
Kishore Y
Ph:- +918039813085

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to