*参照元 [#yd3b43ff] #backlinks *説明 [#v1a6f621] -パス: [[linux-4.4.1/]] -パス: [[linux-4.4.1/drivers/media/v4l2-core/videobuf2-dma-sg.c]] -FIXME: これは何? --説明 **引数 [#l7226f92] - -void *buf_priv -- -unsigned long flags -- **返り値 [#n423004a] - -struct dma_buf * -- --[[linux-4.4.1/dma_buf]] **参考 [#fe281c38] *実装 [#kcd6fd51] static struct dma_buf *vb2_dma_sg_get_dmabuf(void *buf_priv, unsigned long flags) { struct vb2_dma_sg_buf *buf = buf_priv; struct dma_buf *dbuf; DEFINE_DMA_BUF_EXPORT_INFO(exp_info); - --[[linux-4.4.1/vb2_dma_sg_buf]] --[[linux-4.4.1/dma_buf]] --[[linux-4.4.1/DEFINE_DMA_BUF_EXPORT_INFO()]] exp_info.ops = &vb2_dma_sg_dmabuf_ops; exp_info.size = buf->size; exp_info.flags = flags; exp_info.priv = buf; - --[[linux-4.4.1/vb2_dma_sg_dmabuf_ops(global)]] if (WARN_ON(!buf->dma_sgt)) 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()]] --[[linux-4.4.1/IS_ERR()]] /* dmabuf keeps reference to vb2 buffer */ atomic_inc(&buf->refcount); - --[[linux-4.4.1/atomic_inc()]] return dbuf; } *コメント [#h148ce75]