
Pull media updates from Mauro Carvalho Chehab: "A series of patches that move part of the code used to allocate memory from the media subsystem to the mm subsystem" [ The mm parts have been acked by VM people, and the series was apparently in -mm for a while - Linus ] * tag 'media/v4.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] drm/exynos: Convert g2d_userptr_get_dma_addr() to use get_vaddr_frames() [media] media: vb2: Remove unused functions [media] media: vb2: Convert vb2_dc_get_userptr() to use frame vector [media] media: vb2: Convert vb2_vmalloc_get_userptr() to use frame vector [media] media: vb2: Convert vb2_dma_sg_get_userptr() to use frame vector [media] vb2: Provide helpers for mapping virtual addresses [media] media: omap_vout: Convert omap_vout_uservirt_to_phys() to use get_vaddr_pfns() [media] mm: Provide new get_vaddr_frames() helper [media] vb2: Push mmap_sem down to memops
41 lines
1.1 KiB
C
41 lines
1.1 KiB
C
/*
|
|
* videobuf2-memops.h - generic memory handling routines for videobuf2
|
|
*
|
|
* Copyright (C) 2010 Samsung Electronics
|
|
*
|
|
* Author: Pawel Osciak <pawel@osciak.com>
|
|
* Marek Szyprowski <m.szyprowski@samsung.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef _MEDIA_VIDEOBUF2_MEMOPS_H
|
|
#define _MEDIA_VIDEOBUF2_MEMOPS_H
|
|
|
|
#include <media/videobuf2-core.h>
|
|
#include <linux/mm.h>
|
|
|
|
/**
|
|
* struct vb2_vmarea_handler - common vma refcount tracking handler
|
|
*
|
|
* @refcount: pointer to refcount entry in the buffer
|
|
* @put: callback to function that decreases buffer refcount
|
|
* @arg: argument for @put callback
|
|
*/
|
|
struct vb2_vmarea_handler {
|
|
atomic_t *refcount;
|
|
void (*put)(void *arg);
|
|
void *arg;
|
|
};
|
|
|
|
extern const struct vm_operations_struct vb2_common_vm_ops;
|
|
|
|
struct frame_vector *vb2_create_framevec(unsigned long start,
|
|
unsigned long length,
|
|
bool write);
|
|
void vb2_destroy_framevec(struct frame_vector *vec);
|
|
|
|
#endif
|