summaryrefslogtreecommitdiffstats
path: root/Documentation/video4linux
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-02-14 07:51:28 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 12:42:48 -0300
commita7a1c0e60c706fc04c42c020cd9c45b8bfe14e8b (patch)
treee868f4ced3ca18f2193c62175445ee832e715b76 /Documentation/video4linux
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/video4linux')
-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 8d2db7e09e8..48cdf86248c 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -558,26 +558,38 @@ announcing that a new buffer were filled.
The irq handling code should handle the videobuf task lists, in order
to advice videobuf that a new frame were filled, in order to honor to a
request. The code is generally like this one:
- if (list_empty(&dma_q->active))
+ if (list_empty(&dma_q->active))
return;
- buf = list_entry(dma_q->active.next, struct vbuffer, vb.queue);
+ buf = list_entry(dma_q->active.next, struct vbuffer, vb.queue);
- if (!waitqueue_active(&buf->vb.done))
+ if (!waitqueue_active(&buf->vb.done))
return;
/* Some logic to handle the buf may be needed here */
- list_del(&buf->vb.queue);
- do_gettimeofday(&buf->vb.ts);
- wake_up(&buf->vb.done);
+ list_del(&buf->vb.queue);
+ do_gettimeofday(&buf->vb.ts);
+ wake_up(&buf->vb.done);
Those are the videobuffer functions used on drivers, implemented on
videobuf-core:
-- videobuf_queue_core_init()
- Initializes the videobuf infrastructure. This function should be
- called before any other videobuf function.
+- Videobuf init functions
+ videobuf_queue_sg_init()
+ Initializes the videobuf infrastructure. This function should be
+ called before any other videobuf function on drivers that uses DMA
+ Scatter/Gather buffers.
+
+ videobuf_queue_dma_contig_init
+ Initializes the videobuf infrastructure. This function should be
+ called before any other videobuf function on drivers that need DMA
+ contiguous buffers.
+
+ videobuf_queue_vmalloc_init()
+ Initializes the videobuf infrastructure. This function should be
+ called before any other videobuf function on USB (and other drivers)
+ that need a vmalloced type of videobuf.
- videobuf_iolock()
Prepares the videobuf memory for the proper method (read, mmap, overlay).