On Wed, Jan 15, 2014 at 11:45 PM, m silverstri < michael.j.silverstri@gmail.com> wrote:
Hi,
If my application allocate memory for input and output buffers, and pass the pointer to a kernel driver (via v4l2 queue buffer operation), can the kernel driver access it? Do I need to setup DMA before teh kernel driver can read/write to it?
You can transfer data to & from kernelspace/userspace by using copy_to/from_user() API. However, for DMA I think you might also want to lock the user pages in memory so that they are not invalidated when the owning process is scheduled out. This is a very high-level gist, but there a lot of resources out there which show how this can be done. HTH, -mandeep
Thank you.
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies