aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-02-14 05:51:28 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:48 -0400
commita7a1c0e60c706fc04c42c020cd9c45b8bfe14e8b (patch)
treee868f4ced3ca18f2193c62175445ee832e715b76 /Documentation
parent44061c05ac8dedcc45c439e871f654c9521cc726 (diff)
V4L/DVB (10571): v4l2-framework.txt: Fixes the videobuf init functions
Documents the driver usage functions, instead of the generic one used by the videobuf specific handlers. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/video4linux/v4l2-framework.txt30
1 files changed, 21 insertions, 9 deletions
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index 8d2db7e09e89..48cdf86248cb 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -558,26 +558,38 @@ announcing that a new buffer were filled.
558The irq handling code should handle the videobuf task lists, in order 558The irq handling code should handle the videobuf task lists, in order
559to advice videobuf that a new frame were filled, in order to honor to a 559to advice videobuf that a new frame were filled, in order to honor to a
560request. The code is generally like this one: 560request. The code is generally like this one:
561 if (list_empty(&dma_q->active)) 561 if (list_empty(&dma_q->active))
562 return; 562 return;
563 563
564 buf = list_entry(dma_q->active.next, struct vbuffer, vb.queue); 564 buf = list_entry(dma_q->active.next, struct vbuffer, vb.queue);
565 565
566 if (!waitqueue_active(&buf->vb.done)) 566 if (!waitqueue_active(&buf->vb.done))
567 return; 567 return;
568 568
569 /* Some logic to handle the buf may be needed here */ 569 /* Some logic to handle the buf may be needed here */
570 570
571 list_del(&buf->vb.queue); 571 list_del(&buf->vb.queue);
572 do_gettimeofday(&buf->vb.ts); 572 do_gettimeofday(&buf->vb.ts);
573 wake_up(&buf->vb.done); 573 wake_up(&buf->vb.done);
574 574
575Those are the videobuffer functions used on drivers, implemented on 575Those are the videobuffer functions used on drivers, implemented on
576videobuf-core: 576videobuf-core:
577 577
578- videobuf_queue_core_init() 578- Videobuf init functions
579 Initializes the videobuf infrastructure. This function should be 579 videobuf_queue_sg_init()
580 called before any other videobuf function. 580 Initializes the videobuf infrastructure. This function should be
581 called before any other videobuf function on drivers that uses DMA
582 Scatter/Gather buffers.
583
584 videobuf_queue_dma_contig_init
585 Initializes the videobuf infrastructure. This function should be
586 called before any other videobuf function on drivers that need DMA
587 contiguous buffers.
588
589 videobuf_queue_vmalloc_init()
590 Initializes the videobuf infrastructure. This function should be
591 called before any other videobuf function on USB (and other drivers)
592 that need a vmalloced type of videobuf.
581 593
582- videobuf_iolock() 594- videobuf_iolock()
583 Prepares the videobuf memory for the proper method (read, mmap, overlay). 595 Prepares the videobuf memory for the proper method (read, mmap, overlay).