*参照元 [#q84ea73a]
#backlinks

*説明 [#m369bca4]
-パス: [[linux-4.4.1/drivers/staging/android/ion/ion.c]]

-FIXME: これは何?
--説明


**引数 [#k5c0852d]
-struct ion_client *client
--
--[[linux-4.4.1/ion_client]]
-int fd
--


**返り値 [#ja6bb827]
-int
--


**参考 [#w204ec2c]


*実装 [#t3693616]
 static int ion_sync_for_device(struct ion_client *client, int fd)
 {
         struct dma_buf *dmabuf;
         struct ion_buffer *buffer;
 
-
--[[linux-4.4.1/dma_buf]]
--[[linux-4.4.1/ion_buffer]]

         dmabuf = dma_buf_get(fd);
         if (IS_ERR(dmabuf))
                 return PTR_ERR(dmabuf);
 
-
--[[linux-4.4.1/dma_buf_get()]]
--[[linux-4.4.1/IS_ERR()]]
--[[linux-4.4.1/PTR_ERR()]]

         /* if this memory came from ion */
         if (dmabuf->ops != &dma_buf_ops) {
                 pr_err("%s: can not sync dmabuf from another exporter\n",
                        __func__);
                 dma_buf_put(dmabuf);
                 return -EINVAL;
         }
         buffer = dmabuf->priv;
 
-
--[[linux-4.4.1/dma_buf_ops(global)]]
--[[linux-4.4.1/dma_buf_put()]]

         dma_sync_sg_for_device(NULL, buffer->sg_table->sgl,
                                buffer->sg_table->nents, DMA_BIDIRECTIONAL);
-
--[[linux-4.4.1/dma_sync_sg_for_device()]]

         dma_buf_put(dmabuf);
         return 0;
 }


*コメント [#ee09b20f]


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS