This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media_tree.git tree:

Subject: [media] v4l: vb2-dma-contig: align buffer size to PAGE_SIZE
Author:  Tomasz Stanislawski <[email protected]>
Date:    Tue Oct 9 14:07:41 2012 -0300

Most operations on DMA and DMABUF framework require the size of a buffer to be
page aligned. This patch guarantees the requirement is satisfied for all
vb2-dma-contig buffers.

Signed-off-by: Tomasz Stanislawski <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/v4l2-core/videobuf2-dma-contig.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

---

http://git.linuxtv.org/media_tree.git?a=commitdiff;h=a812a9665d7d89257f8203dba504a33faa59c45b

diff --git a/drivers/media/v4l2-core/videobuf2-dma-contig.c 
b/drivers/media/v4l2-core/videobuf2-dma-contig.c
index 27de1bb..10beaee 100644
--- a/drivers/media/v4l2-core/videobuf2-dma-contig.c
+++ b/drivers/media/v4l2-core/videobuf2-dma-contig.c
@@ -162,6 +162,9 @@ static void *vb2_dc_alloc(void *alloc_ctx, unsigned long 
size)
        if (!buf)
                return ERR_PTR(-ENOMEM);
 
+       /* align image size to PAGE_SIZE */
+       size = PAGE_ALIGN(size);
+
        buf->vaddr = dma_alloc_coherent(dev, size, &buf->dma_addr, GFP_KERNEL);
        if (!buf->vaddr) {
                dev_err(dev, "dma_alloc_coherent of size %ld failed\n", size);

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to