Hi Hans-Petter, On Monday 02 July 2012 21:07:56 Hans Petter Selasky wrote: > Hi Laurent and Sakari, > > For the sake of the matter, here is the driver in question: > http://www.freshports.org/multimedia/webcamd/ > > Under native-Linux (kernel mode): > > I've looked at the linux-media code a bit and it appears that video data is > copied directly from the USB callback functions to the destination process > in userspace. This works because the userspace buffer is mapped into kernel > memory it appears. Correct me if I'm wrong: > > video/videobuf-core.c: > > err = __videobuf_mmap_setup(q, count, size, V4L2_MEMORY_USERPTR); It's hard to tell from that line only. V4L2_MEMORY_USERPTR takes a memory pointer from userspace and uses it in the kernel. How the memory is used depends on the driver, it can be converted to a scatter list of physical memory and passed to the hardware, mapped to the kernel, be accessed using copy_from_user/copy_to_user, ... BTW videobuf1 is outdated, drivers will eventually be ported to videobuf2. > Under FreeBSD where the Linux kernel code is running in user-space as a > driver daemon, this part cannot be done exactly like this, so I've just > patched out the V4L2_MEMORY_USERPTR feature until further. > > Am I clear? -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html