linux-4.4.1/vb2_mem_ops
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#ld0d014f]
#backlinks
*説明 [#b0026233]
-パス: [[linux-4.4.1/include/media/videobuf2-core.h]]
-FIXME: これは何?
--説明
**参考 [#i3c90cd1]
-現在のところ、実装は 3つある。
--[[linux-4.4.1/vb2_dma_contig_memops(global)]]
--[[linux-4.4.1/vb2_dma_sg_memops(global)]]
--[[linux-4.4.1/vb2_vmalloc_memops(global)]]
*実装 [#x362f2aa]
/**
* struct vb2_mem_ops - memory handling/memory allocator...
* @alloc: allocate video memory and, optionally, a...
* return NULL on failure or a pointer to a...
* per-buffer data on success; the returned...
* will then be passed as buf_priv argument...
* structure. Additional gfp_flags to use w...
* are also passed to this operation. These...
* gfp_flags field of vb2_queue.
* @put: inform the allocator that the buffer wil...
* usually will result in the allocator fre...
* no other users of this buffer are presen...
* argument is the allocator private per-bu...
* previously returned from the alloc callb...
* @get_dmabuf: acquire userspace memory for a hardware ...
* DMABUF memory types.
* @get_userptr: acquire userspace memory for a hardware...
* USERPTR memory types; vaddr is the addr...
* videobuf layer when queuing a video buf...
* should return an allocator private per-...
* associated with the buffer on success, ...
* the returned private structure will the...
* argument to other ops in this structure.
* @put_userptr: inform the allocator that a USERPTR buf...
* be used.
* @attach_dmabuf: attach a shared struct dma_buf for a ...
* used for DMABUF memory types; alloc_c...
* dbuf is the shared dma_buf; returns N...
* allocator private per-buffer structur...
* this needs to be used for further acc...
* @detach_dmabuf: inform the exporter of the buffer tha...
* buffer is no longer used; the buf_pri...
* allocator private per-buffer structur...
* from the attach_dmabuf callback.
* @map_dmabuf: request for access to the dmabuf from al...
* of dmabuf is informed that this driver i...
* dmabuf.
* @unmap_dmabuf: releases access control to the dmabuf ...
* that this driver is done using the dma...
* @prepare: called every time the buffer is passed f...
* driver, useful for cache synchronisation...
* @finish: called every time the buffer is passed b...
* to the userspace, also optional.
* @vaddr: return a kernel virtual address to a giv...
* associated with the passed private struc...
* such mapping exists.
* @cookie: return allocator specific cookie for a g...
* associated with the passed private struc...
* available.
* @num_users: return the current number of users of a ...
* return 1 if the videobuf layer (or actua...
* it) is the only user.
* @mmap: setup a userspace mapping for a given me...
* the provided virtual memory region.
*
* Required ops for USERPTR types: get_userptr, put_user...
* Required ops for MMAP types: alloc, put, num_users, m...
* Required ops for read/write access types: alloc, put,...
* Required ops for DMABUF types: attach_dmabuf, detach_...
* unmap_dmabuf.
*/
struct vb2_mem_ops {
void *(*alloc)(void *alloc_ctx, unsig...
enum dma_data_directio...
gfp_t gfp_flags);
-
--[[linux-4.4.1/dma_data_direction]]
--[[linux-4.4.1/gfp_t]]
void (*put)(void *buf_priv);
struct dma_buf *(*get_dmabuf)(void *buf_priv, un...
-
--[[linux-4.4.1/dma_buf]]
void *(*get_userptr)(void *alloc_ctx,...
unsigned long si...
enum dma_data_di...
void (*put_userptr)(void *buf_priv);
void (*prepare)(void *buf_priv);
void (*finish)(void *buf_priv);
void *(*attach_dmabuf)(void *alloc_ct...
unsigned long ...
enum dma_data_...
void (*detach_dmabuf)(void *buf_priv);
int (*map_dmabuf)(void *buf_priv);
void (*unmap_dmabuf)(void *buf_priv);
void *(*vaddr)(void *buf_priv);
void *(*cookie)(void *buf_priv);
unsigned int (*num_users)(void *buf_priv);
int (*mmap)(void *buf_priv, struct v...
-
--[[linux-4.4.1/vm_area_struct]]
};
*コメント [#a006e2bf]
終了行:
*参照元 [#ld0d014f]
#backlinks
*説明 [#b0026233]
-パス: [[linux-4.4.1/include/media/videobuf2-core.h]]
-FIXME: これは何?
--説明
**参考 [#i3c90cd1]
-現在のところ、実装は 3つある。
--[[linux-4.4.1/vb2_dma_contig_memops(global)]]
--[[linux-4.4.1/vb2_dma_sg_memops(global)]]
--[[linux-4.4.1/vb2_vmalloc_memops(global)]]
*実装 [#x362f2aa]
/**
* struct vb2_mem_ops - memory handling/memory allocator...
* @alloc: allocate video memory and, optionally, a...
* return NULL on failure or a pointer to a...
* per-buffer data on success; the returned...
* will then be passed as buf_priv argument...
* structure. Additional gfp_flags to use w...
* are also passed to this operation. These...
* gfp_flags field of vb2_queue.
* @put: inform the allocator that the buffer wil...
* usually will result in the allocator fre...
* no other users of this buffer are presen...
* argument is the allocator private per-bu...
* previously returned from the alloc callb...
* @get_dmabuf: acquire userspace memory for a hardware ...
* DMABUF memory types.
* @get_userptr: acquire userspace memory for a hardware...
* USERPTR memory types; vaddr is the addr...
* videobuf layer when queuing a video buf...
* should return an allocator private per-...
* associated with the buffer on success, ...
* the returned private structure will the...
* argument to other ops in this structure.
* @put_userptr: inform the allocator that a USERPTR buf...
* be used.
* @attach_dmabuf: attach a shared struct dma_buf for a ...
* used for DMABUF memory types; alloc_c...
* dbuf is the shared dma_buf; returns N...
* allocator private per-buffer structur...
* this needs to be used for further acc...
* @detach_dmabuf: inform the exporter of the buffer tha...
* buffer is no longer used; the buf_pri...
* allocator private per-buffer structur...
* from the attach_dmabuf callback.
* @map_dmabuf: request for access to the dmabuf from al...
* of dmabuf is informed that this driver i...
* dmabuf.
* @unmap_dmabuf: releases access control to the dmabuf ...
* that this driver is done using the dma...
* @prepare: called every time the buffer is passed f...
* driver, useful for cache synchronisation...
* @finish: called every time the buffer is passed b...
* to the userspace, also optional.
* @vaddr: return a kernel virtual address to a giv...
* associated with the passed private struc...
* such mapping exists.
* @cookie: return allocator specific cookie for a g...
* associated with the passed private struc...
* available.
* @num_users: return the current number of users of a ...
* return 1 if the videobuf layer (or actua...
* it) is the only user.
* @mmap: setup a userspace mapping for a given me...
* the provided virtual memory region.
*
* Required ops for USERPTR types: get_userptr, put_user...
* Required ops for MMAP types: alloc, put, num_users, m...
* Required ops for read/write access types: alloc, put,...
* Required ops for DMABUF types: attach_dmabuf, detach_...
* unmap_dmabuf.
*/
struct vb2_mem_ops {
void *(*alloc)(void *alloc_ctx, unsig...
enum dma_data_directio...
gfp_t gfp_flags);
-
--[[linux-4.4.1/dma_data_direction]]
--[[linux-4.4.1/gfp_t]]
void (*put)(void *buf_priv);
struct dma_buf *(*get_dmabuf)(void *buf_priv, un...
-
--[[linux-4.4.1/dma_buf]]
void *(*get_userptr)(void *alloc_ctx,...
unsigned long si...
enum dma_data_di...
void (*put_userptr)(void *buf_priv);
void (*prepare)(void *buf_priv);
void (*finish)(void *buf_priv);
void *(*attach_dmabuf)(void *alloc_ct...
unsigned long ...
enum dma_data_...
void (*detach_dmabuf)(void *buf_priv);
int (*map_dmabuf)(void *buf_priv);
void (*unmap_dmabuf)(void *buf_priv);
void *(*vaddr)(void *buf_priv);
void *(*cookie)(void *buf_priv);
unsigned int (*num_users)(void *buf_priv);
int (*mmap)(void *buf_priv, struct v...
-
--[[linux-4.4.1/vm_area_struct]]
};
*コメント [#a006e2bf]
ページ名: