Skip to content

Commit

Permalink
Revert "[media] V4L: videobuf, don't use dma addr as physical"
Browse files Browse the repository at this point in the history
This reverts commit 35d9f51.

Quoth Jiri Slaby:
 "It fixes mmap when IOMMU is used on x86 only, but breaks architectures
  like ARM or PPC where virt_to_phys(dma_alloc_coherent) doesn't work.
  We need there dma_mmap_coherent or similar (the trickery what
  snd_pcm_default_mmap does but in some saner way).  But this cannot be
  done at this phase."

Requested-by: Jiri Slaby <[email protected]>
Cc: Russell King - ARM Linux <[email protected]>
Cc: Janusz Krzysztofik <[email protected]>
Acked-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
torvalds committed Apr 19, 2011
1 parent f28c617 commit 71460af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/videobuf-dma-contig.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ static int __videobuf_mmap_mapper(struct videobuf_queue *q,

vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
retval = remap_pfn_range(vma, vma->vm_start,
PFN_DOWN(virt_to_phys(mem->vaddr)),
mem->dma_handle >> PAGE_SHIFT,
size, vma->vm_page_prot);
if (retval) {
dev_err(q->dev, "mmap: remap failed with error %d. ", retval);
Expand Down

0 comments on commit 71460af

Please sign in to comment.