]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blame - include/media/videobuf-vmalloc.h
Merge tag 'v5.10-rc1' into kvmarm-master/next
[mirror_ubuntu-hirsute-kernel.git] / include / media / videobuf-vmalloc.h
CommitLineData
77512baa 1/* SPDX-License-Identifier: GPL-2.0-only */
87b9ad07
MCC
2/*
3 * helper functions for vmalloc capture buffers
4 *
5d6aaf50 5 * The functions expect the hardware being able to scatter gather
87b9ad07
MCC
6 * (i.e. the buffers are not linear in physical memory, but fragmented
7 * into PAGE_SIZE chunks). They also assume the driver does not need
8 * to touch the video data.
9 *
32590819 10 * (c) 2007 Mauro Carvalho Chehab, <mchehab@kernel.org>
87b9ad07 11 */
59d34489
MCC
12#ifndef _VIDEOBUF_VMALLOC_H
13#define _VIDEOBUF_VMALLOC_H
87b9ad07
MCC
14
15#include <media/videobuf-core.h>
16
17/* --------------------------------------------------------------------- */
18
7a02264c 19struct videobuf_vmalloc_memory {
87b9ad07
MCC
20 u32 magic;
21
bb6dbe74 22 void *vaddr;
87b9ad07 23
7a02264c
PO
24 /* remap_vmalloc_range seems to need to run
25 * after mmap() on some cases */
87b9ad07
MCC
26 struct vm_area_struct *vma;
27};
28
7a02264c 29void videobuf_queue_vmalloc_init(struct videobuf_queue *q,
38a54f35 30 const struct videobuf_queue_ops *ops,
f8b0bca1 31 struct device *dev,
87b9ad07
MCC
32 spinlock_t *irqlock,
33 enum v4l2_buf_type type,
34 enum v4l2_field field,
35 unsigned int msize,
08bff03e
HV
36 void *priv,
37 struct mutex *ext_lock);
87b9ad07 38
7a02264c 39void *videobuf_to_vmalloc(struct videobuf_buffer *buf);
87b9ad07 40
7a02264c 41void videobuf_vmalloc_free(struct videobuf_buffer *buf);
59d34489
MCC
42
43#endif