diff mbox

V4L - Fix videobuf_dma_contig_user_get() getting page aligned physical address

Message ID 1259681414-30246-1-git-send-email-m-karicheri2@ti.com (mailing list archive)
State Changes Requested
Headers show

Commit Message

Murali Karicheri Dec. 1, 2009, 3:30 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/video/videobuf-dma-contig.c b/drivers/media/video/videobuf-dma-contig.c
index d25f284..928dfa1 100644
--- a/drivers/media/video/videobuf-dma-contig.c
+++ b/drivers/media/video/videobuf-dma-contig.c
@@ -166,7 +166,8 @@  static int videobuf_dma_contig_user_get(struct videobuf_dma_contig_memory *mem,
 			break;
 
 		if (pages_done == 0)
-			mem->dma_handle = this_pfn << PAGE_SHIFT;
+			mem->dma_handle = (this_pfn << PAGE_SHIFT) +
+						(vb->baddr & ~PAGE_MASK);
 		else if (this_pfn != (prev_pfn + 1))
 			ret = -EFAULT;