Hi,
(userspace DMA)
I'm writing a device driver for a h/w decoder which (dma) source buffers should (preferably) be visible to userspace (mmap'ed) so that the application can directly load data into these.
The h/w expects the buffer to be circular in physical ram (ring buffer) with data starting from the middle of it, whereas userspace would be providing a vma when mmap()'ing which is linear in its virtual address space.
Is it possible to alter the incoming vma so that a first region of that vma is mapped to the bottom of the dma buffer whereas a second region of the vma is mapped to the beginning of the dma buffer? This way the circular layout constraint of the dma buffer won't be visible to the userspace application, while also enabling it to directly load data in the correct order.
Is it possible to achieve this (such as via split_vma() and a couple of remap_pfn_range() calls into the mmap handler)?
Thanks,
Ilyes
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies