Question about v4l2 mem2mem driver mem_ops
m silverstri
michael.j.silverstri at gmail.com
Fri Jan 17 14:01:12 EST 2014
Hi,
I am working on v4l2 mem2mem driver.
I think the sequence of using a V4L2 codec mem2mem driver from user
space side is like this:
1. queue buffer for input buffer
2. queue buffer for output buffer
3. Streamon Output plane
4. Streamoff Capture plane
5. dequeue buffer for input buffer
6. dequeue buffer for output buffer
And for the driver implementation, I see it needs to setup mem_ops for
source and destination queue:
for example,
http://lxr.free-electrons.com/source/drivers/media/platform/s5p-jpeg/jpeg-core.c
src_vq->mem_ops = &vb2_dma_contig_memops;
dst_vq->mem_ops = &vb2_dma_contig_memops;
My question is why we need the mem_ops in source and destination
queues. In other woreds, why the driver need to allocate memory when
user space applcation has provided the memory via #1 and #2 above?
Thank you.
More information about the Kernelnewbies
mailing list