[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>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
b601fe5688
commit
7b4eeed174
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user