mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[media] videobuf2: Add support for file access mode flags for DMABUF exporting
Currently it is not possible for userspace to map a DMABUF exported buffer with write permissions. This patch allows to also pass O_RDONLY/O_RDWR when exporting the buffer, so that userspace may map it with write permissions. Signed-off-by: Philipp Zabel <[email protected]> Signed-off-by: Sylwester Nawrocki <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
parent
c7223f8f66
commit
c1b96a236e
4 changed files with 12 additions and 10 deletions
|
|
@ -83,7 +83,7 @@ struct vb2_fileio_data;
|
|||
struct vb2_mem_ops {
|
||||
void *(*alloc)(void *alloc_ctx, unsigned long size, gfp_t gfp_flags);
|
||||
void (*put)(void *buf_priv);
|
||||
struct dma_buf *(*get_dmabuf)(void *buf_priv);
|
||||
struct dma_buf *(*get_dmabuf)(void *buf_priv, unsigned long flags);
|
||||
|
||||
void *(*get_userptr)(void *alloc_ctx, unsigned long vaddr,
|
||||
unsigned long size, int write);
|
||||
|
|
|
|||
Loading…
Reference in a new issue