diff mbox

[RFC] omap_vout: Change allocated buffer to only needed size

Message ID E0D41E29EB0DAC4E9F3FF173962E9E940254299E21@dbde02.ent.ti.com (mailing list archive)
State Awaiting Upstream, archived
Headers show

Commit Message

Y, Kishore Nov. 17, 2009, 2:31 p.m. UTC
None
diff mbox

Patch

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++) {