]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blame - include/media/videobuf2-memops.h
UBUNTU: Ubuntu-5.11.0-22.23
[mirror_ubuntu-hirsute-kernel.git] / include / media / videobuf2-memops.h
CommitLineData
004cc378
MS
1/*
2 * videobuf2-memops.h - generic memory handling routines for videobuf2
3 *
4 * Copyright (C) 2010 Samsung Electronics
5 *
95072084 6 * Author: Pawel Osciak <pawel@osciak.com>
004cc378
MS
7 * Marek Szyprowski <m.szyprowski@samsung.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation.
12 */
13
14#ifndef _MEDIA_VIDEOBUF2_MEMOPS_H
15#define _MEDIA_VIDEOBUF2_MEMOPS_H
16
c139990e 17#include <media/videobuf2-v4l2.h>
21fb0cb7 18#include <linux/mm.h>
6c4bb65d 19#include <linux/refcount.h>
004cc378
MS
20
21/**
9fbe71b4 22 * struct vb2_vmarea_handler - common vma refcount tracking handler.
b6836a6f 23 *
9fbe71b4
MCC
24 * @refcount: pointer to &refcount_t entry in the buffer.
25 * @put: callback to function that decreases buffer refcount.
26 * @arg: argument for @put callback.
004cc378
MS
27 */
28struct vb2_vmarea_handler {
6c4bb65d 29 refcount_t *refcount;
004cc378
MS
30 void (*put)(void *arg);
31 void *arg;
32};
33
34extern const struct vm_operations_struct vb2_common_vm_ops;
35
21fb0cb7 36struct frame_vector *vb2_create_framevec(unsigned long start,
70794724 37 unsigned long length);
21fb0cb7 38void vb2_destroy_framevec(struct frame_vector *vec);
004cc378
MS
39
40#endif