From 6d9d22adfd8ac016650559dd4e93a9279d85d33f Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 14 Feb 2009 07:51:28 -0300 Subject: [PATCH] --- yaml --- r: 137903 b: refs/heads/master c: a7a1c0e60c706fc04c42c020cd9c45b8bfe14e8b h: refs/heads/master i: 137901: 846e2906320aa4b1da62132ef103fccdad44f958 137899: 0e9564cae54b93dbe160a295f2bba2014ec0e674 137895: eeb65fae9687b38e67b6d717e786f9c5812a335f 137887: 07f9308bc10f6195098ae593456bbee2f6b2a3a3 v: v3 --- [refs] | 2 +- .../video4linux/v4l2-framework.txt | 30 +++++++++++++------ 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 0cbc4ab9181d..e46c460ed3f6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 44061c05ac8dedcc45c439e871f654c9521cc726 +refs/heads/master: a7a1c0e60c706fc04c42c020cd9c45b8bfe14e8b diff --git a/trunk/Documentation/video4linux/v4l2-framework.txt b/trunk/Documentation/video4linux/v4l2-framework.txt index 8d2db7e09e89..48cdf86248cb 100644 --- a/trunk/Documentation/video4linux/v4l2-framework.txt +++ b/trunk/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).