Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[wrt350n-kernel.git] / drivers / media / video / videobuf-dma-sg.c
blob4c563617e9032122bc55d4894aa66585da791597
1 /*
2 * helper functions for PCI DMA video4linux capture buffers
4 * The functions expect the hardware being able to scatter gatter
5 * (i.e. the buffers are not linear in physical memory, but fragmented
6 * into PAGE_SIZE chunks). They also assume the driver does not need
7 * to touch the video data.
9 * (c) 2007 Mauro Carvalho Chehab, <mchehab@infradead.org>
11 * Highly based on video-buf written originally by:
12 * (c) 2001,02 Gerd Knorr <kraxel@bytesex.org>
13 * (c) 2006 Mauro Carvalho Chehab, <mchehab@infradead.org>
14 * (c) 2006 Ted Walther and John Sokol
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2
21 #include <linux/init.h>
22 #include <linux/module.h>
23 #include <linux/moduleparam.h>
24 #include <linux/slab.h>
25 #include <linux/interrupt.h>
27 #include <linux/pci.h>
28 #include <linux/vmalloc.h>
29 #include <linux/pagemap.h>
30 #include <linux/scatterlist.h>
31 #include <asm/page.h>
32 #include <asm/pgtable.h>
34 #include <media/videobuf-dma-sg.h>
36 #define MAGIC_DMABUF 0x19721112
37 #define MAGIC_SG_MEM 0x17890714
39 #define MAGIC_CHECK(is,should) if (unlikely((is) != (should))) \
40 { printk(KERN_ERR "magic mismatch: %x (expected %x)\n",is,should); BUG(); }
42 static int debug = 0;
43 module_param(debug, int, 0644);
45 MODULE_DESCRIPTION("helper module to manage video4linux pci dma sg buffers");
46 MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>");
47 MODULE_LICENSE("GPL");
49 #define dprintk(level, fmt, arg...) if (debug >= level) \
50 printk(KERN_DEBUG "vbuf-sg: " fmt , ## arg)
52 /* --------------------------------------------------------------------- */
54 struct scatterlist*
55 videobuf_vmalloc_to_sg(unsigned char *virt, int nr_pages)
57 struct scatterlist *sglist;
58 struct page *pg;
59 int i;
61 sglist = kcalloc(nr_pages, sizeof(struct scatterlist), GFP_KERNEL);
62 if (NULL == sglist)
63 return NULL;
64 sg_init_table(sglist, nr_pages);
65 for (i = 0; i < nr_pages; i++, virt += PAGE_SIZE) {
66 pg = vmalloc_to_page(virt);
67 if (NULL == pg)
68 goto err;
69 BUG_ON(PageHighMem(pg));
70 sg_set_page(&sglist[i], pg, PAGE_SIZE, 0);
72 return sglist;
74 err:
75 kfree(sglist);
76 return NULL;
79 struct scatterlist*
80 videobuf_pages_to_sg(struct page **pages, int nr_pages, int offset)
82 struct scatterlist *sglist;
83 int i = 0;
85 if (NULL == pages[0])
86 return NULL;
87 sglist = kcalloc(nr_pages, sizeof(*sglist), GFP_KERNEL);
88 if (NULL == sglist)
89 return NULL;
90 sg_init_table(sglist, nr_pages);
92 if (NULL == pages[0])
93 goto nopage;
94 if (PageHighMem(pages[0]))
95 /* DMA to highmem pages might not work */
96 goto highmem;
97 sg_set_page(&sglist[0], pages[0], PAGE_SIZE - offset, offset);
98 for (i = 1; i < nr_pages; i++) {
99 if (NULL == pages[i])
100 goto nopage;
101 if (PageHighMem(pages[i]))
102 goto highmem;
103 sg_set_page(&sglist[i], pages[i], PAGE_SIZE, 0);
105 return sglist;
107 nopage:
108 dprintk(2,"sgl: oops - no page\n");
109 kfree(sglist);
110 return NULL;
112 highmem:
113 dprintk(2,"sgl: oops - highmem page\n");
114 kfree(sglist);
115 return NULL;
118 /* --------------------------------------------------------------------- */
120 struct videobuf_dmabuf *videobuf_to_dma (struct videobuf_buffer *buf)
122 struct videbuf_pci_sg_memory *mem=buf->priv;
123 BUG_ON (!mem);
125 MAGIC_CHECK(mem->magic,MAGIC_SG_MEM);
127 return &mem->dma;
130 void videobuf_dma_init(struct videobuf_dmabuf *dma)
132 memset(dma,0,sizeof(*dma));
133 dma->magic = MAGIC_DMABUF;
136 static int videobuf_dma_init_user_locked(struct videobuf_dmabuf *dma,
137 int direction, unsigned long data, unsigned long size)
139 unsigned long first,last;
140 int err, rw = 0;
142 dma->direction = direction;
143 switch (dma->direction) {
144 case PCI_DMA_FROMDEVICE: rw = READ; break;
145 case PCI_DMA_TODEVICE: rw = WRITE; break;
146 default: BUG();
149 first = (data & PAGE_MASK) >> PAGE_SHIFT;
150 last = ((data+size-1) & PAGE_MASK) >> PAGE_SHIFT;
151 dma->offset = data & ~PAGE_MASK;
152 dma->nr_pages = last-first+1;
153 dma->pages = kmalloc(dma->nr_pages * sizeof(struct page*),
154 GFP_KERNEL);
155 if (NULL == dma->pages)
156 return -ENOMEM;
157 dprintk(1,"init user [0x%lx+0x%lx => %d pages]\n",
158 data,size,dma->nr_pages);
160 dma->varea = (void *) data;
163 err = get_user_pages(current,current->mm,
164 data & PAGE_MASK, dma->nr_pages,
165 rw == READ, 1, /* force */
166 dma->pages, NULL);
168 if (err != dma->nr_pages) {
169 dma->nr_pages = (err >= 0) ? err : 0;
170 dprintk(1,"get_user_pages: err=%d [%d]\n",err,dma->nr_pages);
171 return err < 0 ? err : -EINVAL;
173 return 0;
176 int videobuf_dma_init_user(struct videobuf_dmabuf *dma, int direction,
177 unsigned long data, unsigned long size)
179 int ret;
180 down_read(&current->mm->mmap_sem);
181 ret = videobuf_dma_init_user_locked(dma, direction, data, size);
182 up_read(&current->mm->mmap_sem);
184 return ret;
187 int videobuf_dma_init_kernel(struct videobuf_dmabuf *dma, int direction,
188 int nr_pages)
190 dprintk(1,"init kernel [%d pages]\n",nr_pages);
191 dma->direction = direction;
192 dma->vmalloc = vmalloc_32(nr_pages << PAGE_SHIFT);
193 if (NULL == dma->vmalloc) {
194 dprintk(1,"vmalloc_32(%d pages) failed\n",nr_pages);
195 return -ENOMEM;
197 dprintk(1,"vmalloc is at addr 0x%08lx, size=%d\n",
198 (unsigned long)dma->vmalloc,
199 nr_pages << PAGE_SHIFT);
200 memset(dma->vmalloc,0,nr_pages << PAGE_SHIFT);
201 dma->nr_pages = nr_pages;
202 return 0;
205 int videobuf_dma_init_overlay(struct videobuf_dmabuf *dma, int direction,
206 dma_addr_t addr, int nr_pages)
208 dprintk(1,"init overlay [%d pages @ bus 0x%lx]\n",
209 nr_pages,(unsigned long)addr);
210 dma->direction = direction;
211 if (0 == addr)
212 return -EINVAL;
214 dma->bus_addr = addr;
215 dma->nr_pages = nr_pages;
216 return 0;
219 int videobuf_dma_map(struct videobuf_queue* q,struct videobuf_dmabuf *dma)
221 void *dev=q->dev;
223 MAGIC_CHECK(dma->magic,MAGIC_DMABUF);
224 BUG_ON(0 == dma->nr_pages);
226 if (dma->pages) {
227 dma->sglist = videobuf_pages_to_sg(dma->pages, dma->nr_pages,
228 dma->offset);
230 if (dma->vmalloc) {
231 dma->sglist = videobuf_vmalloc_to_sg
232 (dma->vmalloc,dma->nr_pages);
234 if (dma->bus_addr) {
235 dma->sglist = kmalloc(sizeof(struct scatterlist), GFP_KERNEL);
236 if (NULL != dma->sglist) {
237 dma->sglen = 1;
238 sg_dma_address(&dma->sglist[0]) = dma->bus_addr & PAGE_MASK;
239 dma->sglist[0].offset = dma->bus_addr & ~PAGE_MASK;
240 sg_dma_len(&dma->sglist[0]) = dma->nr_pages * PAGE_SIZE;
243 if (NULL == dma->sglist) {
244 dprintk(1,"scatterlist is NULL\n");
245 return -ENOMEM;
247 if (!dma->bus_addr) {
248 dma->sglen = pci_map_sg(dev,dma->sglist,
249 dma->nr_pages, dma->direction);
250 if (0 == dma->sglen) {
251 printk(KERN_WARNING
252 "%s: videobuf_map_sg failed\n",__FUNCTION__);
253 kfree(dma->sglist);
254 dma->sglist = NULL;
255 dma->sglen = 0;
256 return -EIO;
259 return 0;
262 int videobuf_dma_sync(struct videobuf_queue *q,struct videobuf_dmabuf *dma)
264 void *dev=q->dev;
266 MAGIC_CHECK(dma->magic,MAGIC_DMABUF);
267 BUG_ON(!dma->sglen);
269 pci_dma_sync_sg_for_cpu (dev,dma->sglist,dma->nr_pages,dma->direction);
270 return 0;
273 int videobuf_dma_unmap(struct videobuf_queue* q,struct videobuf_dmabuf *dma)
275 void *dev=q->dev;
277 MAGIC_CHECK(dma->magic,MAGIC_DMABUF);
278 if (!dma->sglen)
279 return 0;
281 pci_unmap_sg (dev,dma->sglist,dma->nr_pages,dma->direction);
283 kfree(dma->sglist);
284 dma->sglist = NULL;
285 dma->sglen = 0;
286 return 0;
289 int videobuf_dma_free(struct videobuf_dmabuf *dma)
291 MAGIC_CHECK(dma->magic,MAGIC_DMABUF);
292 BUG_ON(dma->sglen);
294 if (dma->pages) {
295 int i;
296 for (i=0; i < dma->nr_pages; i++)
297 page_cache_release(dma->pages[i]);
298 kfree(dma->pages);
299 dma->pages = NULL;
302 vfree(dma->vmalloc);
303 dma->vmalloc = NULL;
304 dma->varea = NULL;
306 if (dma->bus_addr) {
307 dma->bus_addr = 0;
309 dma->direction = PCI_DMA_NONE;
310 return 0;
313 /* --------------------------------------------------------------------- */
315 int videobuf_pci_dma_map(struct pci_dev *pci,struct videobuf_dmabuf *dma)
317 struct videobuf_queue q;
319 q.dev=pci;
321 return (videobuf_dma_map(&q,dma));
324 int videobuf_pci_dma_unmap(struct pci_dev *pci,struct videobuf_dmabuf *dma)
326 struct videobuf_queue q;
328 q.dev=pci;
330 return (videobuf_dma_unmap(&q,dma));
333 /* --------------------------------------------------------------------- */
335 static void
336 videobuf_vm_open(struct vm_area_struct *vma)
338 struct videobuf_mapping *map = vma->vm_private_data;
340 dprintk(2,"vm_open %p [count=%d,vma=%08lx-%08lx]\n",map,
341 map->count,vma->vm_start,vma->vm_end);
342 map->count++;
345 static void
346 videobuf_vm_close(struct vm_area_struct *vma)
348 struct videobuf_mapping *map = vma->vm_private_data;
349 struct videobuf_queue *q = map->q;
350 struct videbuf_pci_sg_memory *mem;
351 int i;
353 dprintk(2,"vm_close %p [count=%d,vma=%08lx-%08lx]\n",map,
354 map->count,vma->vm_start,vma->vm_end);
356 map->count--;
357 if (0 == map->count) {
358 dprintk(1,"munmap %p q=%p\n",map,q);
359 <<<<<<< HEAD:drivers/media/video/videobuf-dma-sg.c
360 mutex_lock(&q->lock);
361 =======
362 mutex_lock(&q->vb_lock);
363 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:drivers/media/video/videobuf-dma-sg.c
364 for (i = 0; i < VIDEO_MAX_FRAME; i++) {
365 if (NULL == q->bufs[i])
366 continue;
367 mem=q->bufs[i]->priv;
369 if (!mem)
370 continue;
372 MAGIC_CHECK(mem->magic,MAGIC_SG_MEM);
374 if (q->bufs[i]->map != map)
375 continue;
376 q->bufs[i]->map = NULL;
377 q->bufs[i]->baddr = 0;
378 q->ops->buf_release(q,q->bufs[i]);
380 <<<<<<< HEAD:drivers/media/video/videobuf-dma-sg.c
381 mutex_unlock(&q->lock);
382 =======
383 mutex_unlock(&q->vb_lock);
384 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:drivers/media/video/videobuf-dma-sg.c
385 kfree(map);
387 return;
391 * Get a anonymous page for the mapping. Make sure we can DMA to that
392 * memory location with 32bit PCI devices (i.e. don't use highmem for
393 * now ...). Bounce buffers don't work very well for the data rates
394 * video capture has.
396 static int
397 videobuf_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
399 struct page *page;
401 dprintk(3,"fault: fault @ %08lx [vma %08lx-%08lx]\n",
402 (unsigned long)vmf->virtual_address,vma->vm_start,vma->vm_end);
403 page = alloc_page(GFP_USER | __GFP_DMA32);
404 if (!page)
405 return VM_FAULT_OOM;
406 clear_user_page(page_address(page), (unsigned long)vmf->virtual_address,
407 page);
408 vmf->page = page;
409 return 0;
412 static struct vm_operations_struct videobuf_vm_ops =
414 .open = videobuf_vm_open,
415 .close = videobuf_vm_close,
416 .fault = videobuf_vm_fault,
419 /* ---------------------------------------------------------------------
420 * PCI handlers for the generic methods
423 /* Allocated area consists on 3 parts:
424 struct video_buffer
425 struct <driver>_buffer (cx88_buffer, saa7134_buf, ...)
426 struct videobuf_pci_sg_memory
429 static void *__videobuf_alloc(size_t size)
431 struct videbuf_pci_sg_memory *mem;
432 struct videobuf_buffer *vb;
434 vb = kzalloc(size+sizeof(*mem),GFP_KERNEL);
436 mem = vb->priv = ((char *)vb)+size;
437 mem->magic=MAGIC_SG_MEM;
439 videobuf_dma_init(&mem->dma);
441 dprintk(1,"%s: allocated at %p(%ld+%ld) & %p(%ld)\n",
442 __FUNCTION__,vb,(long)sizeof(*vb),(long)size-sizeof(*vb),
443 mem,(long)sizeof(*mem));
445 return vb;
448 static int __videobuf_iolock (struct videobuf_queue* q,
449 struct videobuf_buffer *vb,
450 struct v4l2_framebuffer *fbuf)
452 int err,pages;
453 dma_addr_t bus;
454 struct videbuf_pci_sg_memory *mem=vb->priv;
455 BUG_ON(!mem);
457 MAGIC_CHECK(mem->magic,MAGIC_SG_MEM);
459 switch (vb->memory) {
460 case V4L2_MEMORY_MMAP:
461 case V4L2_MEMORY_USERPTR:
462 if (0 == vb->baddr) {
463 /* no userspace addr -- kernel bounce buffer */
464 pages = PAGE_ALIGN(vb->size) >> PAGE_SHIFT;
465 err = videobuf_dma_init_kernel( &mem->dma,
466 PCI_DMA_FROMDEVICE,
467 pages );
468 if (0 != err)
469 return err;
470 } else if (vb->memory == V4L2_MEMORY_USERPTR) {
471 /* dma directly to userspace */
472 err = videobuf_dma_init_user( &mem->dma,
473 PCI_DMA_FROMDEVICE,
474 vb->baddr,vb->bsize );
475 if (0 != err)
476 return err;
477 } else {
478 /* NOTE: HACK: videobuf_iolock on V4L2_MEMORY_MMAP
479 buffers can only be called from videobuf_qbuf
480 we take current->mm->mmap_sem there, to prevent
481 locking inversion, so don't take it here */
483 err = videobuf_dma_init_user_locked(&mem->dma,
484 PCI_DMA_FROMDEVICE,
485 vb->baddr, vb->bsize);
486 if (0 != err)
487 return err;
489 break;
490 case V4L2_MEMORY_OVERLAY:
491 if (NULL == fbuf)
492 return -EINVAL;
493 /* FIXME: need sanity checks for vb->boff */
495 * Using a double cast to avoid compiler warnings when
496 * building for PAE. Compiler doesn't like direct casting
497 * of a 32 bit ptr to 64 bit integer.
499 bus = (dma_addr_t)(unsigned long)fbuf->base + vb->boff;
500 pages = PAGE_ALIGN(vb->size) >> PAGE_SHIFT;
501 err = videobuf_dma_init_overlay(&mem->dma,PCI_DMA_FROMDEVICE,
502 bus, pages);
503 if (0 != err)
504 return err;
505 break;
506 default:
507 BUG();
509 err = videobuf_dma_map(q,&mem->dma);
510 if (0 != err)
511 return err;
513 return 0;
516 static int __videobuf_sync(struct videobuf_queue *q,
517 struct videobuf_buffer *buf)
519 struct videbuf_pci_sg_memory *mem=buf->priv;
520 BUG_ON (!mem);
521 MAGIC_CHECK(mem->magic,MAGIC_SG_MEM);
523 return videobuf_dma_sync(q,&mem->dma);
526 static int __videobuf_mmap_free(struct videobuf_queue *q)
528 int i;
530 for (i = 0; i < VIDEO_MAX_FRAME; i++) {
531 if (q->bufs[i]) {
532 if (q->bufs[i]->map)
533 return -EBUSY;
537 return 0;
540 static int __videobuf_mmap_mapper(struct videobuf_queue *q,
541 struct vm_area_struct *vma)
543 struct videbuf_pci_sg_memory *mem;
544 struct videobuf_mapping *map;
545 unsigned int first,last,size,i;
546 int retval;
548 retval = -EINVAL;
549 if (!(vma->vm_flags & VM_WRITE)) {
550 dprintk(1,"mmap app bug: PROT_WRITE please\n");
551 goto done;
553 if (!(vma->vm_flags & VM_SHARED)) {
554 dprintk(1,"mmap app bug: MAP_SHARED please\n");
555 goto done;
558 /* look for first buffer to map */
559 for (first = 0; first < VIDEO_MAX_FRAME; first++) {
560 if (NULL == q->bufs[first])
561 continue;
562 mem=q->bufs[first]->priv;
563 BUG_ON (!mem);
564 MAGIC_CHECK(mem->magic,MAGIC_SG_MEM);
566 if (V4L2_MEMORY_MMAP != q->bufs[first]->memory)
567 continue;
568 if (q->bufs[first]->boff == (vma->vm_pgoff << PAGE_SHIFT))
569 break;
571 if (VIDEO_MAX_FRAME == first) {
572 dprintk(1,"mmap app bug: offset invalid [offset=0x%lx]\n",
573 (vma->vm_pgoff << PAGE_SHIFT));
574 goto done;
577 /* look for last buffer to map */
578 for (size = 0, last = first; last < VIDEO_MAX_FRAME; last++) {
579 if (NULL == q->bufs[last])
580 continue;
581 if (V4L2_MEMORY_MMAP != q->bufs[last]->memory)
582 continue;
583 if (q->bufs[last]->map) {
584 retval = -EBUSY;
585 goto done;
587 size += q->bufs[last]->bsize;
588 if (size == (vma->vm_end - vma->vm_start))
589 break;
591 if (VIDEO_MAX_FRAME == last) {
592 dprintk(1,"mmap app bug: size invalid [size=0x%lx]\n",
593 (vma->vm_end - vma->vm_start));
594 goto done;
597 /* create mapping + update buffer list */
598 retval = -ENOMEM;
599 map = kmalloc(sizeof(struct videobuf_mapping),GFP_KERNEL);
600 if (NULL == map)
601 goto done;
602 for (size = 0, i = first; i <= last; size += q->bufs[i++]->bsize) {
603 q->bufs[i]->map = map;
604 q->bufs[i]->baddr = vma->vm_start + size;
606 map->count = 1;
607 map->start = vma->vm_start;
608 map->end = vma->vm_end;
609 map->q = q;
610 vma->vm_ops = &videobuf_vm_ops;
611 vma->vm_flags |= VM_DONTEXPAND | VM_RESERVED;
612 vma->vm_flags &= ~VM_IO; /* using shared anonymous pages */
613 vma->vm_private_data = map;
614 dprintk(1,"mmap %p: q=%p %08lx-%08lx pgoff %08lx bufs %d-%d\n",
615 map,q,vma->vm_start,vma->vm_end,vma->vm_pgoff,first,last);
616 retval = 0;
618 done:
619 return retval;
622 static int __videobuf_copy_to_user ( struct videobuf_queue *q,
623 char __user *data, size_t count,
624 int nonblocking )
626 struct videbuf_pci_sg_memory *mem=q->read_buf->priv;
627 BUG_ON (!mem);
628 MAGIC_CHECK(mem->magic,MAGIC_SG_MEM);
630 /* copy to userspace */
631 if (count > q->read_buf->size - q->read_off)
632 count = q->read_buf->size - q->read_off;
634 if (copy_to_user(data, mem->dma.vmalloc+q->read_off, count))
635 return -EFAULT;
637 return count;
640 static int __videobuf_copy_stream ( struct videobuf_queue *q,
641 char __user *data, size_t count, size_t pos,
642 int vbihack, int nonblocking )
644 unsigned int *fc;
645 struct videbuf_pci_sg_memory *mem=q->read_buf->priv;
646 BUG_ON (!mem);
647 MAGIC_CHECK(mem->magic,MAGIC_SG_MEM);
649 if (vbihack) {
650 /* dirty, undocumented hack -- pass the frame counter
651 * within the last four bytes of each vbi data block.
652 * We need that one to maintain backward compatibility
653 * to all vbi decoding software out there ... */
654 fc = (unsigned int*)mem->dma.vmalloc;
655 fc += (q->read_buf->size>>2) -1;
656 *fc = q->read_buf->field_count >> 1;
657 dprintk(1,"vbihack: %d\n",*fc);
660 /* copy stuff using the common method */
661 count = __videobuf_copy_to_user (q,data,count,nonblocking);
663 if ( (count==-EFAULT) && (0 == pos) )
664 return -EFAULT;
666 return count;
669 static struct videobuf_qtype_ops pci_ops = {
670 .magic = MAGIC_QTYPE_OPS,
672 .alloc = __videobuf_alloc,
673 .iolock = __videobuf_iolock,
674 .sync = __videobuf_sync,
675 .mmap_free = __videobuf_mmap_free,
676 .mmap_mapper = __videobuf_mmap_mapper,
677 .video_copy_to_user = __videobuf_copy_to_user,
678 .copy_stream = __videobuf_copy_stream,
681 void *videobuf_pci_alloc (size_t size)
683 struct videobuf_queue q;
685 /* Required to make generic handler to call __videobuf_alloc */
686 q.int_ops=&pci_ops;
688 q.msize=size;
690 return videobuf_alloc (&q);
693 void videobuf_queue_pci_init(struct videobuf_queue* q,
694 struct videobuf_queue_ops *ops,
695 void *dev,
696 spinlock_t *irqlock,
697 enum v4l2_buf_type type,
698 enum v4l2_field field,
699 unsigned int msize,
700 void *priv)
702 videobuf_queue_core_init(q, ops, dev, irqlock, type, field, msize,
703 priv, &pci_ops);
706 /* --------------------------------------------------------------------- */
708 EXPORT_SYMBOL_GPL(videobuf_vmalloc_to_sg);
710 EXPORT_SYMBOL_GPL(videobuf_to_dma);
711 EXPORT_SYMBOL_GPL(videobuf_dma_init);
712 EXPORT_SYMBOL_GPL(videobuf_dma_init_user);
713 EXPORT_SYMBOL_GPL(videobuf_dma_init_kernel);
714 EXPORT_SYMBOL_GPL(videobuf_dma_init_overlay);
715 EXPORT_SYMBOL_GPL(videobuf_dma_map);
716 EXPORT_SYMBOL_GPL(videobuf_dma_sync);
717 EXPORT_SYMBOL_GPL(videobuf_dma_unmap);
718 EXPORT_SYMBOL_GPL(videobuf_dma_free);
720 EXPORT_SYMBOL_GPL(videobuf_pci_dma_map);
721 EXPORT_SYMBOL_GPL(videobuf_pci_dma_unmap);
722 EXPORT_SYMBOL_GPL(videobuf_pci_alloc);
724 EXPORT_SYMBOL_GPL(videobuf_queue_pci_init);
727 * Local variables:
728 * c-basic-offset: 8
729 * End: