summaryrefslogtreecommitdiffstats
path: root/include/media/videobuf-dma-sg.h
diff options
context:
space:
mode:
authorJames Harper <james.harper@ejbdigital.com.au>2014-06-12 11:53:38 +0200
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-26 16:33:15 +0200
commit7b4eeed174b71c325705ff8c53f333bc79d0ee7a (patch)
tree3f23ad213911ab98dd30694109c6c0bcfe17afd7 /include/media/videobuf-dma-sg.h
parent[media] media: drx39xyj - use drxj_set_lna_state() and remove duplicate LNA code (diff)
downloadlinux-7b4eeed174b71c325705ff8c53f333bc79d0ee7a.tar.xz
linux-7b4eeed174b71c325705ff8c53f333bc79d0ee7a.zip
[media] vmalloc_sg: make sure all pages in vmalloc area are really DMA-ready
Patch originally written by Konrad. Rebased on current linux media tree. Under Xen, vmalloc_32() isn't guaranteed to return pages which are really under 4G in machine physical addresses (only in virtual pseudo-physical addresses). To work around this, implement a vmalloc variant which allocates each page with dma_alloc_coherent() to guarantee that each page is suitable for the device in question. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: James Harper <james.harper@ejbdigital.com.au> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'include/media/videobuf-dma-sg.h')
-rw-r--r--include/media/videobuf-dma-sg.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/media/videobuf-dma-sg.h b/include/media/videobuf-dma-sg.h
index d8fb6012c10d..fb6fd4d8f4ed 100644
--- a/include/media/videobuf-dma-sg.h
+++ b/include/media/videobuf-dma-sg.h
@@ -53,6 +53,9 @@ struct videobuf_dmabuf {
/* for kernel buffers */
void *vaddr;
+ struct page **vaddr_pages;
+ dma_addr_t *dma_addr;
+ struct device *dev;
/* for overlay buffers (pci-pci dma) */
dma_addr_t bus_addr;