summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2012-04-20 16:45:30 +0200
committerSumit Semwal <sumit.semwal@ti.com>2012-04-24 16:14:02 +0530
commit7110dcb793e1f3593d3910c5f1b8dffded114d57 (patch)
tree8fbb64c0db3ebcc89095c949ac2eeb640d54c490 /include/media
parent5f2a7290c56ba18498f2b593705f29ca1da7e4b6 (diff)
v4l: vb2: add prepare/finish callbacks to allocators
This patch adds support for prepare/finish callbacks in VB2 allocators. These callback are used for buffer flushing. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/videobuf2-core.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
index 859bbafc1dc8..d079f92b6030 100644
--- a/include/media/videobuf2-core.h
+++ b/include/media/videobuf2-core.h
@@ -56,6 +56,10 @@ struct vb2_fileio_data;
* dmabuf
* @unmap_dmabuf: releases access control to the dmabuf - allocator is notified
* that this driver is done using the dmabuf for now
+ * @prepare: called everytime the buffer is passed from userspace to the
+ * driver, usefull for cache synchronisation, optional
+ * @finish: called everytime the buffer is passed back from the driver
+ * to the userspace, also optional
* @vaddr: return a kernel virtual address to a given memory buffer
* associated with the passed private structure or NULL if no
* such mapping exists
@@ -82,6 +86,9 @@ struct vb2_mem_ops {
unsigned long size, int write);
void (*put_userptr)(void *buf_priv);
+ void (*prepare)(void *buf_priv);
+ void (*finish)(void *buf_priv);
+
void *(*attach_dmabuf)(void *alloc_ctx, struct dma_buf *dbuf,
unsigned long size, int write);
void (*detach_dmabuf)(void *buf_priv);