*参照元 [#o6bee225] #backlinks *説明 [#n1cfeb1d] -パス: [[linux-4.4.1/]] -パス: [[linux-4.4.1/drivers/media/v4l2-core/videobuf2-vmalloc.c]] -FIXME: これは何? --説明 **引数 [#jf066c5b] -void *buf_priv -- -unsigned long flags -- **返り値 [#r3f13b11] -struct dma_buf * -- --[[linux-4.4.1/dma_buf]] **参考 [#v40a6fc4] *実装 [#x636b7dc] static struct dma_buf *vb2_vmalloc_get_dmabuf(void *buf_priv, unsigned long flags) { struct vb2_vmalloc_buf *buf = buf_priv; struct dma_buf *dbuf; DEFINE_DMA_BUF_EXPORT_INFO(exp_info); - --[[linux-4.4.1/vb2_vmalloc_buf]] --[[linux-4.4.1/dma_buf]] --[[linux-4.4.1/DEFINE_DMA_BUF_EXPORT_INFO()]] exp_info.ops = &vb2_vmalloc_dmabuf_ops; exp_info.size = buf->size; exp_info.flags = flags; exp_info.priv = buf; - --[[linux-4.4.1/vb2_vmalloc_dmabuf_ops(global)]] if (WARN_ON(!buf->vaddr)) return NULL; - --[[linux-4.4.1/WARN_ON()]] dbuf = dma_buf_export(&exp_info); if (IS_ERR(dbuf)) return NULL; - --[[linux-4.4.1/dma_buf_export()]] /* dmabuf keeps reference to vb2 buffer */ atomic_inc(&buf->refcount); - --[[linux-4.4.1/atomic_inc()]] return dbuf; } *コメント [#sa200d48]