q->ops->queue_setup此函数允许我们的驱动函数自定义分配空间的大小 __vb2_queue_alloc 分配vivi_buffer结构体的空间(缓存区头部信息), 如果使用的是V4L2_MEMORY_MMAP类型则 调用==>__vb2_buf_mem_alloc ==> q->mem_ops->alloc 即vb2_vmalloc_alloc 分配空间,将分配的空间指向vb2_buffer->planes[0].mem_...
static const struct vb2_ops skel_qops = { .queue_setup = queue_setup, .buf_prepare = buffer_prepare, .buf_queue = buffer_queue, .start_streaming = start_streaming, .stop_streaming = stop_streaming, .wait_prepare = vb2_ops_wait_prepare, ...
this patch moves the initialization of vb2 queue and the DMA context to probe() and clean up in remove() callback respectively. Signed-off-by: Lad, Prabhakar <prabhakar.cse...@gmail.com> --- drivers/media/platform/davinci/vpbe_display.c | 128 +++++++--- 1 file changed, 60 insertio...
static struct vb2_ops msm_vb2_get_q_op = { .queue_setup = msm_vb2_queue_setup, .buf_init = msm_vb2_buf_init, .buf_queue = msm_vb2_buf_queue, .buf_finish = msm_vb2_buf_finish, .stop_streaming = msm_vb2_stop_stream, }; struct vb2_ops *msm_vb2_get_q_ops(void) { return ...