summaryrefslogtreecommitdiff
path: root/linux/include/media/video-buf.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-01-25 06:00:01 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-01-25 06:00:01 -0200
commita17249c51910dd58481bf09e5eff56d6ec9d0dd4 (patch)
treea14cdb3c750ff88610dd39565814c79f353bb6d4 /linux/include/media/video-buf.h
parent0f5b64e7c37c66e5cd7693eb7f9fc011e62eee33 (diff)
downloadmediapointer-dvb-s2-a17249c51910dd58481bf09e5eff56d6ec9d0dd4.tar.gz
mediapointer-dvb-s2-a17249c51910dd58481bf09e5eff56d6ec9d0dd4.tar.bz2
Make vivi driver to use vmalloced pointers
From: Mauro Carvalho Chehab <mchehab@infradead.org> Before this patch, vivi were simulating a scatter gather DMA transfer. While this is academic, showing how stuff really works on a real PCI device, this means a non-optimized code. There are only two memory models that vivi implements: 1) kernel alloced memory. This is also used by read() method. On this case, a vmalloc32 buffer is allocated at kernel; 2) userspace allocated memory. This is used by most userspace apps. video-buf will store this pointer. a simple copy_to_user is enough to transfer data. The third memory model scenario supported by video-buf is overlay mode. This model is not implemented on vivi and unlikely to be implemented on newer drivers, since now, most userspace apps do some post-processing (like de-interlacing). After this patch, some cleanups may be done at video-buf.c to avoid allocating pages, when the driver doesn't need a PCI buffer. This is the case of vivi and usb drivers. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/include/media/video-buf.h')
-rw-r--r--linux/include/media/video-buf.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux/include/media/video-buf.h b/linux/include/media/video-buf.h
index ae694cfbc..cb216d0ab 100644
--- a/linux/include/media/video-buf.h
+++ b/linux/include/media/video-buf.h
@@ -78,6 +78,9 @@ struct videobuf_dmabuf {
/* for kernel buffers */
void *vmalloc;
+ /* Stores the userspace pointer to vmalloc area */
+ void *varea;
+
/* for overlay buffers (pci-pci dma) */
dma_addr_t bus_addr;