[media] vmalloc_sg: make sure all pages in vmalloc area are really DMA-ready
authorJames Harper <james.harper@ejbdigital.com.au>
Thu, 12 Jun 2014 09:53:38 +0000 (06:53 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Sat, 26 Jul 2014 14:33:15 +0000 (11:33 -0300)
commit7b4eeed174b71c325705ff8c53f333bc79d0ee7a
tree3f23ad213911ab98dd30694109c6c0bcfe17afd7
parentb601fe5688ae285693c64e833003c14acb38378a
[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>
drivers/media/v4l2-core/videobuf-dma-sg.c
include/media/videobuf-dma-sg.h