Skip to contentSkip to conversation

I/O USERPTR for videobuf2-dma-sg

DISCUSSION Matthias Wächter 1 participant 1 message Oct 21, 2013 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hi everyone,

I’m in the process of providing a driver for a camera input and have just finished SG DMA operation to work in hardware and driver. Now I’m quite surprised that videobuf2-dma-sg is lacking basic support for user pointers to I/O memory (i.e., to graphics card). However, videobuf2-dma-contig does have support for it, at least from reading the code I see that vb2_dc_get_userptr() can tell I/O memory from RAM and as such do the right thing for I/O. OTOH, vb2_dma_sg_get_userptr() just does plain get_user_pages() which is not returning any page information for I/O memory.

Is this missing just because no-one has bothered to do it, or is there a known problem ? Right now it seems that only one driver in the kernel tree is actually using videobuf2-dma-sg, so maybe it hasn’t been worth the effort. Similarly, DMABUF has not been implemented in videobuf2-dma-sg.

Would a patch for adding I/O USERPTR functionality similar to vb2_dc_get/put_userptr() be accepted? Any known problems with this task I’m going to face?

Thanks,
– Matthias