linux-4.4.1/vb2_dc_mmap()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#iee3097d]
#backlinks
*説明 [#bd88744f]
-パス: [[linux-4.4.1/drivers/media/v4l2-core/videobuf2-dm...
-FIXME: これは何?
--説明
**引数 [#i4ab618c]
-void *buf_priv
--
-struct vm_area_struct *vma
--
--[[linux-4.4.1/vm_area_struct]]
**返り値 [#t730a432]
-int
--
**参考 [#ee78681f]
*実装 [#x7f8bdbb]
static int vb2_dc_mmap(void *buf_priv, struct vm_area_st...
{
struct vb2_dc_buf *buf = buf_priv;
int ret;
-
--[[linux-4.4.1/vb2_dc_buf]]
if (!buf) {
printk(KERN_ERR "No buffer to map\n");
return -EINVAL;
}
-
--[[linux-4.4.1/printk()]]
/*
* dma_mmap_* uses vm_pgoff as in-buffer offset,...
* map whole buffer
*/
vma->vm_pgoff = 0;
ret = dma_mmap_coherent(buf->dev, vma, buf->vaddr,
buf->dma_addr, buf->size);
if (ret) {
pr_err("Remapping memory failed, error: ...
return ret;
}
-
--[[linux-4.4.1/dma_mmap_coherent()]]
--[[linux-4.4.1/pr_err()]]
vma->vm_flags |= VM_DONTEXPAND | VM_DO...
vma->vm_private_data = &buf->handler;
vma->vm_ops = &vb2_common_vm_ops;
-
--[[linux-4.4.1/vb2_common_vm_ops(global)]]
vma->vm_ops->open(vma);
-
--vma->vm_ops は struct vm_operations_struct * 型
--[[linux-4.4.1/vm_operations_struct]]
pr_debug("%s: mapped dma addr 0x%08lx at 0x%08lx...
__func__, (unsigned long)buf->dma_addr, ...
buf->size);
-
--[[linux-4.4.1/pr_debug()]]
return 0;
}
*コメント [#d266552f]
終了行:
*参照元 [#iee3097d]
#backlinks
*説明 [#bd88744f]
-パス: [[linux-4.4.1/drivers/media/v4l2-core/videobuf2-dm...
-FIXME: これは何?
--説明
**引数 [#i4ab618c]
-void *buf_priv
--
-struct vm_area_struct *vma
--
--[[linux-4.4.1/vm_area_struct]]
**返り値 [#t730a432]
-int
--
**参考 [#ee78681f]
*実装 [#x7f8bdbb]
static int vb2_dc_mmap(void *buf_priv, struct vm_area_st...
{
struct vb2_dc_buf *buf = buf_priv;
int ret;
-
--[[linux-4.4.1/vb2_dc_buf]]
if (!buf) {
printk(KERN_ERR "No buffer to map\n");
return -EINVAL;
}
-
--[[linux-4.4.1/printk()]]
/*
* dma_mmap_* uses vm_pgoff as in-buffer offset,...
* map whole buffer
*/
vma->vm_pgoff = 0;
ret = dma_mmap_coherent(buf->dev, vma, buf->vaddr,
buf->dma_addr, buf->size);
if (ret) {
pr_err("Remapping memory failed, error: ...
return ret;
}
-
--[[linux-4.4.1/dma_mmap_coherent()]]
--[[linux-4.4.1/pr_err()]]
vma->vm_flags |= VM_DONTEXPAND | VM_DO...
vma->vm_private_data = &buf->handler;
vma->vm_ops = &vb2_common_vm_ops;
-
--[[linux-4.4.1/vb2_common_vm_ops(global)]]
vma->vm_ops->open(vma);
-
--vma->vm_ops は struct vm_operations_struct * 型
--[[linux-4.4.1/vm_operations_struct]]
pr_debug("%s: mapped dma addr 0x%08lx at 0x%08lx...
__func__, (unsigned long)buf->dma_addr, ...
buf->size);
-
--[[linux-4.4.1/pr_debug()]]
return 0;
}
*コメント [#d266552f]
ページ名: