__vb2_queue_alloc 分配vivi_buffer结构体的空间(缓存区头部信息), 如果使用的是V4L2_MEMORY_MMAP类型则 调用==>__vb2_buf_mem_alloc ==> q->mem_ops->alloc 即vb2_vmalloc_alloc 分配空间,将分配的空间指向vb2_buffer->planes[0].mem_priv ,该指针保存着分配到的空间,该指针指向vb2_vmalloc_buf结构体 ...
queue->queue.buf_struct_size = sizeof(struct uvc_buffer); queue->queue.ops = &uvc_queue_qops; queue->queue.mem_ops = &vb2_vmalloc_memops; - vb2_queue_init(&queue->queue); + ret = vb2_queue_init(&queue->queue); + if (ret) + return ret; mutex_init(&queue->mutex); spin_l...
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...
q->mem_ops = msm_vb2_get_q_mem_ops(); q->ops = msm_vb2_get_q_ops(); /* default queue type */ q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; q->io_modes = VB2_USERPTR; } vb2_queue中vuffer的初始化分配: msm_fd_dev.c中,static int fd_probe(struct platform_device *pdev)中...