summaryrefslogtreecommitdiff
path: root/drivers/media/video/ivtv/ivtv-udma.c
AgeCommit message (Collapse)Author
2011-03-21[media] ivtv: udma: handle get_user_pages() returning fewer pages than we ↵Paul Cassella
asked for get_user_pages() may return fewer page than we ask for. As we give up and return an error in this case, we need to put_page() each of the pages we did get. [Andy Walls modified the patch, only removing the braces in the 'for' statement, to eliminate a checkpatch warning.] Signed-off-by: Paul Cassella <fortytwo-ivtv@manetheren.bigw.org> Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: ivtv: Fix race condition for queued udma transfersIan Armstrong
There are several DMA related interrupts which wake up the dma_waitq. The udma routines use this queue while they wait for their transfer to complete. When woken, the udma routine will check the IVTV_F_I_UDMA_PENDING & IVTV_F_I_UDMA flags to see if the transfer is still queued or has finished. However, a small window exists between the IVTV_F_I_UDMA_PENDING flag being cleared and the IVTV_F_I_UDMA flag being set. Given that the completion of an unrelated DMA transfer may wake up the udma routine, it's possible for this check to fail and the udma routine will start unmapping pages when the transfer has only just started. The result of this is unpredictable. This fix simply delays the clearing of the IVTV_F_I_UDMA_PENDING flag until after IVTV_F_I_UDMA has been set. Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10488): ivtv: cleanup naming conventionsHans Verkuil
Use consistent naming for pci_dev, v4l2_device and video_device. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2007-10-24SG: Change sg_set_page() to take length and offset argumentJens Axboe
Most drivers need to set length and offset as well, so may as well fold those three lines into one. Add sg_assign_page() for those two locations that only needed to set the page, where the offset/length is set outside of the function context. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-22[SG] Update drivers to use sg helpersJens Axboe
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-09V4L/DVB (6091): ivtv: header cleanupHans Verkuil
- add guards - remove unused header includes - move card-specific stuff from ivtv-driver.h to ivtv-cards.h - move YUV-specific stuff from ivtv-driver.h to ivtv-yuv.h Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (6060): ivtv: fix IVTV_IOC_DMA_FRAME bug introduced by highmem bugfixHans Verkuil
The return value of ivtv_udma_fill_sg_list() was changed by the highmem bugfix, but that return value was still used in ivtv-yuv.c. Revert to the old return value, but in addition return -1 in case of a memory allocation error. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (6058): ivtv: add support for highmem udmaHans Verkuil
When trying to DMA userspace buffers to the cx23415 you need to check whether the page is in highmem. If this is the case, then bounce buffers have to be used to allow DMA. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27V4L/DVB (5345): ivtv driver for Conexant cx23416/cx23415 MPEG encoder/decoderHans Verkuil
It took three core maintainers, over four years of work, eight new i2c modules, eleven new V4L2 ioctls, three new DVB video ioctls, a Sliced VBI API, a new MPEG encoder API, an enhanced DVB video MPEG decoding API, major YUV/OSD contributions from Ian and John, web/wiki/svn/trac support from Axel Thimm, (hardware) support from Hauppauge, support and assistance from the v4l-dvb people and the many, many users of ivtv to finally make it possible to merge this driver into the kernel. Thank you all! Signed-off-by: Kevin Thayer <nufan_wfk@yahoo.com> Signed-off-by: Chris Kennedy <c@groovy.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: John P Harvey <john.p.harvey@btinternet.com> Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>