Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
videobuf-dma-sg.c File Reference
#include <linux/init.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/dma-mapping.h>
#include <linux/vmalloc.h>
#include <linux/pagemap.h>
#include <linux/scatterlist.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <media/videobuf-dma-sg.h>

Go to the source code of this file.

Macros

#define MAGIC_DMABUF   0x19721112
 
#define MAGIC_SG_MEM   0x17890714
 
#define MAGIC_CHECK(is, should)
 
#define dprintk(level, fmt, arg...)
 

Functions

 module_param (debug, int, 0644)
 
 MODULE_DESCRIPTION ("helper module to manage video4linux dma sg buffers")
 
 MODULE_AUTHOR ("Mauro Carvalho Chehab <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 
struct videobuf_dmabufvideobuf_to_dma (struct videobuf_buffer *buf)
 
 EXPORT_SYMBOL_GPL (videobuf_to_dma)
 
void videobuf_dma_init (struct videobuf_dmabuf *dma)
 
 EXPORT_SYMBOL_GPL (videobuf_dma_init)
 
int videobuf_dma_init_user (struct videobuf_dmabuf *dma, int direction, unsigned long data, unsigned long size)
 
 EXPORT_SYMBOL_GPL (videobuf_dma_init_user)
 
int videobuf_dma_init_kernel (struct videobuf_dmabuf *dma, int direction, int nr_pages)
 
 EXPORT_SYMBOL_GPL (videobuf_dma_init_kernel)
 
int videobuf_dma_init_overlay (struct videobuf_dmabuf *dma, int direction, dma_addr_t addr, int nr_pages)
 
 EXPORT_SYMBOL_GPL (videobuf_dma_init_overlay)
 
int videobuf_dma_map (struct device *dev, struct videobuf_dmabuf *dma)
 
 EXPORT_SYMBOL_GPL (videobuf_dma_map)
 
int videobuf_dma_unmap (struct device *dev, struct videobuf_dmabuf *dma)
 
 EXPORT_SYMBOL_GPL (videobuf_dma_unmap)
 
int videobuf_dma_free (struct videobuf_dmabuf *dma)
 
 EXPORT_SYMBOL_GPL (videobuf_dma_free)
 
voidvideobuf_sg_alloc (size_t size)
 
 EXPORT_SYMBOL_GPL (videobuf_sg_alloc)
 
void videobuf_queue_sg_init (struct videobuf_queue *q, const struct videobuf_queue_ops *ops, struct device *dev, spinlock_t *irqlock, enum v4l2_buf_type type, enum v4l2_field field, unsigned int msize, void *priv, struct mutex *ext_lock)
 
 EXPORT_SYMBOL_GPL (videobuf_queue_sg_init)
 

Macro Definition Documentation

#define dprintk (   level,
  fmt,
  arg... 
)
Value:
if (debug >= level) \
printk(KERN_DEBUG "vbuf-sg: " fmt , ## arg)

Definition at line 54 of file videobuf-dma-sg.c.

#define MAGIC_CHECK (   is,
  should 
)
Value:
if (unlikely((is) != (should))) { \
printk(KERN_ERR "magic mismatch: %x (expected %x)\n", \
is, should); \
BUG(); \
}

Definition at line 40 of file videobuf-dma-sg.c.

#define MAGIC_DMABUF   0x19721112

Definition at line 37 of file videobuf-dma-sg.c.

#define MAGIC_SG_MEM   0x17890714

Definition at line 38 of file videobuf-dma-sg.c.

Function Documentation

EXPORT_SYMBOL_GPL ( videobuf_to_dma  )
EXPORT_SYMBOL_GPL ( videobuf_dma_init  )
EXPORT_SYMBOL_GPL ( videobuf_dma_init_user  )
EXPORT_SYMBOL_GPL ( videobuf_dma_init_kernel  )
EXPORT_SYMBOL_GPL ( videobuf_dma_init_overlay  )
EXPORT_SYMBOL_GPL ( videobuf_dma_map  )
EXPORT_SYMBOL_GPL ( videobuf_dma_unmap  )
EXPORT_SYMBOL_GPL ( videobuf_dma_free  )
EXPORT_SYMBOL_GPL ( videobuf_sg_alloc  )
EXPORT_SYMBOL_GPL ( videobuf_queue_sg_init  )
MODULE_AUTHOR ( "Mauro Carvalho Chehab <[email protected]>"  )
MODULE_DESCRIPTION ( "helper module to manage video4linux dma sg buffers"  )
MODULE_LICENSE ( "GPL"  )
module_param ( debug  ,
int  ,
0644   
)
int videobuf_dma_free ( struct videobuf_dmabuf dma)

Definition at line 312 of file videobuf-dma-sg.c.

void videobuf_dma_init ( struct videobuf_dmabuf dma)

Definition at line 148 of file videobuf-dma-sg.c.

int videobuf_dma_init_kernel ( struct videobuf_dmabuf dma,
int  direction,
int  nr_pages 
)

Definition at line 211 of file videobuf-dma-sg.c.

int videobuf_dma_init_overlay ( struct videobuf_dmabuf dma,
int  direction,
dma_addr_t  addr,
int  nr_pages 
)

Definition at line 234 of file videobuf-dma-sg.c.

int videobuf_dma_init_user ( struct videobuf_dmabuf dma,
int  direction,
unsigned long  data,
unsigned long  size 
)

Definition at line 198 of file videobuf-dma-sg.c.

int videobuf_dma_map ( struct device dev,
struct videobuf_dmabuf dma 
)

Definition at line 251 of file videobuf-dma-sg.c.

int videobuf_dma_unmap ( struct device dev,
struct videobuf_dmabuf dma 
)

Definition at line 295 of file videobuf-dma-sg.c.

void videobuf_queue_sg_init ( struct videobuf_queue q,
const struct videobuf_queue_ops ops,
struct device dev,
spinlock_t irqlock,
enum v4l2_buf_type  type,
enum v4l2_field  field,
unsigned int  msize,
void priv,
struct mutex ext_lock 
)

Definition at line 619 of file videobuf-dma-sg.c.

void* videobuf_sg_alloc ( size_t  size)

Definition at line 606 of file videobuf-dma-sg.c.

struct videobuf_dmabuf* videobuf_to_dma ( struct videobuf_buffer buf)
read

Definition at line 137 of file videobuf-dma-sg.c.