summaryrefslogtreecommitdiff
path: root/drivers/media/video/videobuf-vmalloc.c
AgeCommit message (Collapse)Author
2008-04-24V4L/DVB (7566): videobuf-dvb: allow its usage with videobuf-vmallocMauro Carvalho Chehab
videobuf-dvb were still using a function that were videobuf-dma-sg dependent. This patch creates a generic handler for this function. This way, videobuf-dvb can now work with all videobuf implementations. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7561): videobuf-vmalloc: stop streaming before unmapMauro Carvalho Chehab
Before the patch, there were a risk of freeing and unmapping userspace memory, while there were pending requests. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7553): videobuf-vmalloc: fix STREAMOFF/STREAMONMauro Carvalho Chehab
There were a small bug on videobuf-vmalloc that were preventing STREAMOFF to work. The issue is that vmalloc'ed mmaped memory should only be freed after being sure that there aren't any mmap usage. Otherwise, the memory remap will stop working, and the userspace won't receive any frames. This bug were affecting some userspace applications, like tvtime. After this patch, tvtime started to work again with the drivers that use videobuf-vmalloc. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7552): videbuf-vmalloc: Corrects mmap codeMauro Carvalho Chehab
There were some bugs on videobuf-vmalloc. Basically, remap were called with a wrong parameter. Due to that, a later remap were needed, generating the need of some hacks on videobuf-vmalloc and videobuf-core. This patch fixes the remap and removes the hacks. TODO: - V4L2_MEMORY_USERPTR is not implemented yet. This method should be properly implemented, in order to work with a few userspace applications. - The driver also doesn't implement V4L2_MEMORY_OVERLAY. This method is used only by a few applications, and are becaming obsolete, due to the increment of cpu performance. So, most apps prefer to retrieve data to an internal buffer, doing some processing like de-interlacing. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7518): media/video/ replace remaining __FUNCTION__ occurrencesHarvey Harrison
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7489): videobuf-vmalloc.c: Remove buf_release from videobuf_vm_closeBrandon Philips
Remove the buf_release on vm_close because it will lead to a buffer being released multiple times since all buffers are already freed under the two possible cases: device close or STREAMOFF. Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7237): Convert videobuf-dma-sg to generic DMA APIGuennadi Liakhovetski
videobuf-dma-sg does not need to depend on PCI. Switch it to using generic DMA API, convert all affected drivers, relax Kconfig restriction, improve compile-time type checking, fix some Coding Style violations while at it. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7094): static memoryDouglas Schilling Landgraf
- Static memory is always initialized with 0. - Replaced in some cases C99 comments for /* */ Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18V4L/DVB (7150): [v4l] convert videbuf_vmalloc_memory to videobuf_vmalloc_memoryBrandon Philips
Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18V4L/DVB (7121): Renames videobuf lock to vb_lockMauro Carvalho Chehab
This helps to identify where vb_lock is being used, and find missusages of the locks. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25V4L/DVB (6688): V4L: fix copy and paste error in dprintk for videobuf-vmalloc.cBrandon Philips
Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-11V4L/DVB (6751): V4L: Memory leak! Fix count in videobuf-vmalloc mmapBrandon Philips
This is pretty serious bug. map->count is never initialized after the call to kmalloc making the count start at some random trash value. The end result is leaking videobufs. Also, fix up the debug statements to print unsigned values. Pushed to http://ifup.org/hg/v4l-dvb too Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-13v4l: copy_to_user() is not a good method nameAl Viro
Breaks on any target that has copy_to_user() defined as a non-trivial macro. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-10V4L/DVB (6292): videobuf_core init always require callback implementationMauro Carvalho Chehab
In the past, videobuf_queue_init were used to initialize PCI DMA videobuffers. This patch renames it, to avoid confusion with the previous kernel API, doing: s/videobuf_queue_init/void videobuf_queue_core_init/ Also, the operations is now part of the function parameter. The function will also add a test if this is defined, otherwise producing BUG. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10V4L/DVB (6266): videobuf cleanup: mmap check is common to all videobuf. Make ↵Mauro Carvalho Chehab
it at core Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981 Reviewed-by: Ricardo Cerqueira <v4l@cerqueira.org>
2007-10-10V4L/DVB (6263): Fix buffer release codeMauro Carvalho Chehab
Release code should happen before the cleaning of map variable. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10V4L/DVB (6262): An allocation error message were being printed as a debug msgMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10V4L/DVB (6261): Cleans mem->vmalloc after vfreeMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (6254): Add videobuf-vmallocMauro Carvalho Chehab
Adds a newer videobuf-vmalloc module. This module uses the same videobuf controls, but implements memory allocation based on vmalloc methods. With this method, an USB driver can use video-buf, without needing to request memory from the DMA-safe area. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>