linux-4.4.1/ion_sync_for_device()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#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...
{
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 ano...
__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->s...
buffer->sg_table->nents, ...
-
--[[linux-4.4.1/dma_sync_sg_for_device()]]
dma_buf_put(dmabuf);
return 0;
}
*コメント [#ee09b20f]
終了行:
*参照元 [#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...
{
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 ano...
__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->s...
buffer->sg_table->nents, ...
-
--[[linux-4.4.1/dma_sync_sg_for_device()]]
dma_buf_put(dmabuf);
return 0;
}
*コメント [#ee09b20f]
ページ名: