Re: DMA memory mapping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Usman S. Ansari wrote:

>When user process calls mmap system call, this address is setup by the kernel along with size,
>this I figure is setup in some suitable place in the user process virtual space.
>
>Usman
>
But since I am the device driver writer, I am responsible for 
this...correct?

>
>
>--- David Stroupe <dstroupe@keyed-upsoftware.com> wrote:
>
>>I am developing a framegrabber driver.  I need to map memory for the 
>>grabber to DMA the images into.  I have it working currently where the 
>>grab happens into kernel memory and then I copy_to_user to get the 
>>buffer into user space.  I think I can eliminate this step by using 
>>remap_page_range which would allow me to access the grabbed images 
>>directly from user space.  The argument to remap_page_range that I don't 
>>understand is the first argument...the virtual address.  I know how big 
>>the buffer is, I know the physical address of the buffer allocated in 
>>the kernel, I have to set the protection such that the pages are not 
>>swapped...how do I get a virtual address to pass to the driver so that 
>>this mapping can take place?
>>



Best regards,
David Stroupe
Keyed-Up Software
5307 Faireast Court
Arlington, Texas 76018-1683
817/557-4903 voice
817/472-0408 fax



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux