> 2) Identification: > A driver supporting DMA to userspace will set the V4L2_FLAG_DMA flag, as > returned by QUERYCAP. Hmm, V4L2_FLAG_DMA is a bad name. Capture to mmap()'ed kernel buffers is DMA too... > struct v4l2_dmabuffer *dmabuf; > struct v4l2_dmabuffer > { > void *start; > unsigned long size; > unsigned long stride; > unsigned long reserved[2]; > }; > > The dmabuf pointer passed by the application is a pointer to an array of > struct v4l2_dmabuffer, with one element for each plane in the color > format (for the current formats, that would be one plane for the packed > formats, and 3 for the planar formats). > > *start is the start address of the buffer. > size is the size in bytes of the buffer. > stride is the length in bytes of a line in the buffer. Hmm, you mix up buffers + format here. "stride" is redundant with v4l2_pix_format.bytesperline, which is a bad idea IMHO. Why the extra struct in the first place? Why not simply put a pointer to the userspace buffer into the struct v4l2_buffer? Gerd -- Get back there in front of the computer NOW. Christmas can wait. -- Linus "the Grinch" Torvalds, 24 Dec 2000 on linux-kernel