summaryrefslogtreecommitdiffstats
path: root/drivers/media/common/saa7146_video.c
Commit message (Collapse)AuthorAgeFilesLines
* V4L/DVB: drivers/media: Remove unnecessary casts of private_dataJoe Perches2010-08-021-2/+2
| | | | | | | Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Jarod Wilson <jarod@redhat.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: saa7146: fix up bytesperline if it is an impossible valueMichael Hunold2010-05-061-3/+5
| | | | | | | | | | | | | xawtv using DGA on a Radeon graphics card provides bogus values to S_FBUF, which will then screw up overlay video: https://bugs.launchpad.net/ubuntu/+source/xawtv/+bug/499734 This fixes the bytesperline value if it is off completely. Signed-off-by: Michael Hunold <michael@mihu.de> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* saa7146: stop DMA before de-allocating DMA scatter/gather page buffersMauro Carvalho Chehab2010-02-011-2/+2
| | | | | | | Thanks-to: Hartmut <e9hack@googlemail.com> for pointing me the problem and testing the fix. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13239): saa7146: fix memory leakage in pagetable-handlingJohann Friedrichs2009-12-051-5/+11
| | | | | | | | | | | | In buffer_release() the previously allocated pagetables are not freed, which might result in a memory leak in certain application use-cases, where the frame format is changed from planar format to non-planar format. The fix explicitely frees the page tables when a format change is done and when buffer_release() is called. Signed-off-by: Johann Friedrichs <johann.friedrichs@web.de> Signed-off-by: Michael Hunold <hunold@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11261): saa7146: Remove buffer type check from vidioc_g_parmTrent Piepho2009-03-301-2/+0
| | | | | | | | | | | | | | | The v4l2-ioctl core now only allows buffer types for which the corresponding ->vidioc_try_fmt_xxx() methods are defined to be used with vidioc_(g|s)_parm. The driver was only allowing VIDEO_CAPTURE buffers for g_parm, but since the driver defines ->vidioc_try_fmt_vid_overlay() it will now allow VIDEO_OVERLAY buffers as well. This should be fine as the fields the driver fills in, readbuffers and frame rate, aren't wrong for VIDEO_OVERLAY buffers. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10814): saa7146: some small fixesTrent Piepho2009-03-301-9/+6
| | | | | | | | | | | | | vidioc_enum_fmt_vid_overlay() did nothing but call vidioc_enum_fmt_vid_cap(), so just make saa7146_video_ioctl_ops.vidioc_enum_fmt_vid_overlay point to vidioc_enum_fmt_vid_cap() and get ride of vidioc_enum_fmt_vid_overlay(). Have gparm use v4l2_video_std_frame_period to fill in the frame period instead of just assuming PAL. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10501): saa7146: prevent unnecessary loading of v4l2-common.Hans Verkuil2009-03-301-1/+1
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10500): saa7146: setting control while capturing should return ↵Hans Verkuil2009-03-301-2/+2
| | | | | | | EBUSY, not EINVAL. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10499): saa7146: convert saa7146 and mxb in particular to v4l2_subdev.Hans Verkuil2009-03-301-2/+23
| | | | | | | | | | | | | | | Modified mxb to load the i2c modules through v4l2_subdev. So no more probing. Modified tea6415c and tea6420 to use the standard routing ops to do the routing, rather than using private commands. Dropped the private commands from tda9840 (they were never used except during initialization of the module). Added saa7146 support for VIDIOC_DBG_G_CHIP_IDENT. Converted saa5246a and saa5249 to v4l2_subdev. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10271): saa7146: convert to video_ioctl2.Hans Verkuil2009-03-301-650/+600
| | | | | | | | The conversion to video_ioctl2 is the first phase to converting this driver to the latest v4l2 framework. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10270): saa7146: fix unbalanced mutex_lock/unlockHans Verkuil2009-01-291-0/+1
| | | | | | | The default case of the switch didn't unlock the mutex. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl.Hans Verkuil2009-01-021-2/+3
| | | | | | | | | | | | | Since internal to v4l2 the ioctl prototype is the same regardless of it being called through .ioctl or .unlocked_ioctl, we need to convert it all to the long return type of unlocked_ioctl. Thanks to Jean-Francois Moine for posting an initial patch for this and thus bringing it to our attention. Cc: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9503): v4l: remove inode argument from video_usercopyHans Verkuil2008-12-291-8/+2
| | | | | | | | | The inode argument was never used. Removing it from video_usercopy brings the function pointer type of video_usercopy in line with similar v4l2 functions, thus simplifying several drivers. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9330): Get rid of inode parameter at v4l_compat_translate_ioctl()Mauro Carvalho Chehab2008-10-211-3/+9
| | | | | | | | | | | The inode parameter at v4l_compat_translate_ioctl() were just passed over several places just to keep compatible with fops.ioctl. However, it weren't used anywere. This patch gets hid of this unused parameter. Cc: Laurent Pinchart <laurent.pinchart@skynet.be> Cc: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8757): v4l-dvb: fix a bunch of sparse warningsHans Verkuil2008-09-031-3/+1
| | | | | | | | Fixed a lot of sparse warnings: mostly warnings about shadowed variables and signed/unsigned mismatches. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8546): saa7146: fix read from uninitialized memoryHans Verkuil2008-07-271-1/+1
| | | | | | | | | | | | | | | | The offset field of the scatterlist entry *after* the last valid scatterlist entry was used instead of the first scatterlist entry (as was the intention of this code). This worked fine until the kzalloc of the sglist was replaced with kmalloc and sg_init_table only zeroed the exact needed length. Apparently kzalloc zeroes a bit more than is strictly necessary so the offset field was always 0 in the past. But now the offset field was suddenly random and this led to broken captures. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (8526): saa7146: fix VIDIOC_ENUM_FMTHans Verkuil2008-07-271-10/+7
| | | | | | | | VIDIOC_ENUM_FMT should keep the index and type fields. Instead, type was zeroed. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (8128): saa7146: ->cpu_addr and friends are little-endianAl Viro2008-07-201-2/+2
| | | | | | | | Annotations + stop saa7146_i2c from playing fast and loose with reuse of ->cpu_addr for host-endian. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7237): Convert videobuf-dma-sg to generic DMA APIGuennadi Liakhovetski2008-04-241-2/+2
| | | | | | | | | 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>
* V4L/DVB (7120): videobuf lock is already initialized at videobuf-core.cMauro Carvalho Chehab2008-02-181-2/+0
| | | | | | Removes the duplicated mutex_init code. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6600): V4L: videobuf: don't chew up namespace STATE_.*, convert to ↵Brandon Philips2008-01-251-4/+4
| | | | | | | | | | | | | | | VIDEOBUF_ s/STATE_NEEDS_INIT/VIDEOBUF_NEEDS_INIT/g s/STATE_PREPARED/VIDEOBUF_PREPARED/g s/STATE_QUEUED/VIDEOBUF_QUEUED/g s/STATE_ACTIVE/VIDEOBUF_ACTIVE/g s/STATE_DONE/VIDEOBUF_DONE/g s/STATE_ERROR/VIDEOBUF_ERROR/g s/STATE_IDLE/VIDEOBUF_IDLE/g Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6615): V4L: Fix VIDIOCGMBUF locking in saa7146Brandon Philips2007-12-111-5/+1
| | | | | | | Fallout from videobuf_mmap_setup() locking fixes. Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6601): V4L: videobuf-core locking fixes and commentsBrandon Philips2007-12-111-4/+1
| | | | | | | | | | | | | | | - Add comments to functions that require that caller hold q->lock - Add __videobuf_mmap_free that doesn't hold q->lock for use within videobuf - Add locking to videobuf_mmap_free - Fix linux/drivers/media/common/saa7146_video.c which was holding lock around videobuf_read_stop - Add locking to functions that operate on a queue - Add videobuf_stop to take care of stopping in both the read and stream case TODO: bttv still has an unsafe call to videobuf_queue_is_busy Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6305): V4L: videobuf-core.c avoid NULL dereferences in videobuf-coreBrandon Philips2007-10-101-0/+2
| | | | | | | | | | | | | | | The return value of videobuf_alloc() is unchecked but this function will return NULL on an error. Check for NULL and make videobuf_reqbufs() return the number of successfully allocated buffers. Also, fix saa7146_video.c and bttv-driver.c to use this returned buffer count. Tested against the vivi driver. Not tested against saa7146 or bt8xx devices. Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6252): Adapt drivers to use the newer videobuf modulesMauro Carvalho Chehab2007-10-091-4/+5
| | | | | | | | | | | | | | PCI-dependent videobuf_foo methods were renamed as videobuf_pci_foo. Also, videobuf_dmabuf is now part of videobuf-dma-sg private struct. So, to access it, a subroutine call is needed. This patch renames all occurences of those function calls to be consistent with the video-buf split. 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>
* V4L/DVB (5835): saa7146/dvb-ttpci: Fix signedness warnings (gcc 4.1.1, ↵Oliver Endriss2007-07-181-4/+4
| | | | | | | | | kernel 2.6.22) Fix signedness warnings (gcc 4.1.1, kernel 2.6.22). Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (5545): Saa7146: Release capture buffers on device closeHartmut Birr2007-04-271-0/+6
| | | | | | | | | If the video device (saa7146 on a FF card) was open for capturing, the close call didn't release the capture buffers. Signed-off-by: Hartmut Birr <e9hack@gmail.com> Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4494a): Fix compilation when V4L1 support is not presentMauro Carvalho Chehab2006-09-101-0/+2
| | | | | | | VIDIOCGMBUF should be compiled only when V4L1 support is selected, since this ioctl is from the obsoleted API. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (3770): Kill drivers/media/common/saa7146_vv_ksyms.cAdrian Bunk2006-06-251-0/+2
| | | | | | | | | This patch moves the EXPORT_SYMBOL's from drivers/media/common/saa7146_vv_ksyms.c to the files with the actual functions. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (3516): Make video_buf more genericMauro Carvalho Chehab2006-03-241-4/+4
| | | | | | | | | | | Video_buf were concerned to allow PCI devices to be used as video capture devices. This patch extends video_buf features by virtualizing pci-dependent functions and allowing other type of devices to use it. It is still DMA centric, although it may be used also by devices that emulates scatter/gather behavior or a DMA device Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (3318b): sem2mutex: drivers/media/, #2Ingo Molnar2006-02-071-15/+15
| | | | | | | | | | | Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (3218): Whitespace cleanupsMichael Krufky2006-01-091-7/+2
| | | | | | | - minor whitespace cleanups Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
* [PATCH] V4L/DVB: (3086c) Whitespaces cleanups part 3Mauro Carvalho Chehab2005-12-121-23/+23
| | | | | | | | Clean up whitespaces at v4l/dvb files Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-161-0/+1509
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
OpenPOWER on IntegriCloud