- 20 Nov, 2018 1 commit
-
-
Hans Verkuil authored
If g_selection is implemented, then the v4l2-ioctl cropcap code assumes that cropcap just implements the pixelaspect part and that g_selection provides the crop bounds and default rectangles. There are still some drivers that only implement cropcap and not g_selection. Split up cropcap into a cropcap and g_selection for those drivers. Signed-off-by:
Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
- 11 Sep, 2018 1 commit
-
-
Mauro Carvalho Chehab authored
The strcpy() function is being deprecated upstream. Replace it by the safer strscpy(). Signed-off-by:
Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Reviewed-by:
Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
- 31 Aug, 2018 1 commit
-
-
Hans Verkuil authored
When queuing buffers allow for passing the request that should be associated with this buffer. If V4L2_BUF_FLAG_REQUEST_FD is set, then request_fd is used as the file descriptor. If a buffer is stored in a request, but not yet queued to the driver, then V4L2_BUF_FLAG_IN_REQUEST is set. Signed-off-by:
Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by:
Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by:
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
- 08 Dec, 2017 1 commit
-
-
Dan Carpenter authored
The cam->buffers[] array has cam->num_frames elements so the > needs to be changed to >= to avoid going beyond the end of the array. The ->buffers[] array is allocated in cpia2_allocate_buffers() if you want to confirm. Fixes: ab33d507 ("V4L/DVB (3376): Add cpia2 camera support") Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com>
-
- 27 Nov, 2017 1 commit
-
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 27 Aug, 2017 1 commit
-
-
Bhumika Goyal authored
Make these const as they are only used during a copy operation. Signed-off-by:
Bhumika Goyal <bhumirks@gmail.com> Acked-by:
Mike Isely <isely@pobox.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com>
-
- 27 Jan, 2017 1 commit
-
-
Sakari Ailus authored
Drop the FSF's postal address from the source code files that typically contain mostly the license text. Of the 628 removed instances, 578 are outdated. The patch has been created with the following command without manual edits: git grep -l "675 Mass Ave\|59 Temple Place\|51 Franklin St" -- \ drivers/media/ include/media|while read i; do i=$i perl -e ' open(F,"< $ENV{i}"); $a=join("", <F>); $a =~ s/[ \t]*\*\n.*You should.*\n.*along with.*\n.*(\n.*USA.*$)?\n//m && $a =~ s/(^.*)Or, (point your browser to) /$1To obtain the license, $2\n$1/m; close(F); open(F, "> $ENV{i}"); print F $a; close(F);'; done Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com>
-
- 04 Jul, 2014 1 commit
-
-
Ramakrishnan Muthukrishnan authored
Since all the drivers that use `struct v4l2_fh' use the core priority checking, the setting of the flag in the drivers can be removed. Signed-off-by:
Ramakrishnan Muthukrishnan <ramakrmu@cisco.com> Reviewed-by:
Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by:
Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by:
Mauro Carvalho Chehab <m.chehab@samsung.com>
-
- 21 Dec, 2012 1 commit
-
-
Sakari Ailus authored
Set buffer timestamp flags for videobuf, videobuf2 and drivers that use neither. Signed-off-by:
Sakari Ailus <sakari.ailus@iki.fi> Acked-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by:
Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 26 Sep, 2012 1 commit
-
-
Hans Verkuil authored
Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_s_jpegcomp. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by:
Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 15 Aug, 2012 1 commit
-
-
Mauro Carvalho Chehab authored
Rename all USB drivers with their own directory under drivers/media/video into drivers/media/usb and update the building system. Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 09 Aug, 2012 1 commit
-
-
Hans Verkuil authored
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by:
Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 05 Jul, 2012 1 commit
-
-
Sakari Ailus authored
Remove input field in struct v4l2_buffer and flag V4L2_BUF_FLAG_INPUT which tells the former is valid. The flag is used by no driver currently. Also change the documentation accordingly. Signed-off-by:
Sakari Ailus <sakari.ailus@iki.fi> Acked-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 14 May, 2012 1 commit
-
-
Hans Verkuil authored
This used to be the default if the lock pointer was set, but now that lock is by default only used for ioctl serialization. Those drivers that already used core locking have this flag set explicitly, except for some drivers where it was obvious that there was no need to serialize any file operations other than ioctl. The drivers that didn't need this flag were: drivers/media/radio/dsbr100.c drivers/media/radio/radio-isa.c drivers/media/radio/radio-keene.c drivers/media/radio/radio-miropcm20.c drivers/media/radio/radio-mr800.c drivers/media/radio/radio-tea5764.c drivers/media/radio/radio-timb.c drivers/media/video/vivi.c sound/i2c/other/tea575x-tuner.c The other drivers that use core locking and where it was not immediately obvious that this flag wasn't needed were changed so that the flag is set together with a comment that that driver needs work to avoid having to set that flag. This will often involve taking the core lock in the fops themselves. Eventually this flag should go and it should not be used in new drivers. There are a few reasons why we want to avoid core locking of non-ioctl fops: in the case of mmap this can lead to a deadlock in rare situations since when mmap is called the mmap_sem is held and it is possible for other parts of the code to take that lock as well (copy_from_user()/copy_to_user() perform a down_read(&mm->mmap_sem) when a page fault occurs). It is very unlikely that that happens since the core lock serializes all fops, but the kernel warns about it if lock validation is turned on. For poll it is also undesirable to take the core lock as that can introduce increased latency. The same is true for read/write. While it was possible to make flags or something to turn on/off taking the core lock for each file operation, in practice it is much simpler to just not take it at all except for ioctl and leave it to the driver to take the lock. There are only a handful fops compared to the zillion ioctls we have. I also wanted to make it obvious which drivers still take the lock for all fops, so that's why I chose to have drivers set it explicitly. Signed-off-by:
Hans Verkuil <hans.verkuil@cisco.com> Acked-by:
Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 07 May, 2012 1 commit
-
-
Hans Verkuil authored
This driver was severely broken. This patch makes it work again, and updates it to the latest V4L2 frameworks (except for videobuf2). It passes the v4l2-compliance tests and it now handles suspend/resume correctly. Several custom controls are replaced by new standard controls, only the USB_ALTERNATE control remains. Tested with the Hanse HVS-CM500PC USB microscope. Signed-off-by:
Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 27 Jul, 2011 1 commit
-
-
Mauro Carvalho Chehab authored
All the modified drivers didn't have any version increment since Jan, 1 2011. Several of them didn't have any version increment for a long time, even having new features and important bug fixes happening. As we're now filling the QUERYCAP version with the current Kernel Release, we don't need to maintain a per-driver version control anymore. So, let's just use the default. In order to preserve the Kernel module version history, a KERNEL_VERSION() macro were added to all modified drivers, and the extraver number were incremented. I opted to preserve the per-driver version control to a few pwc, pvrusb2, s2255, s5p-fimc and sh_vou. A few drivers are still using the legacy way to handle ioctl's. So, we can't do such change on them, otherwise, they'll break. Those are: uvc, et61x251 and sn9c102. The rationale is that the per-driver version control seems to be actively maintained on those. Yet, I think that the better for them would be to just use the default version numbering, instead of doing that by themselves. While here, removed a few uneeded include linux/version.h Acked-by:
Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 26 May, 2011 1 commit
-
-
Hans Petter Selasky authored
Signed-off-by:
Hans Petter Selasky <hselasky@c2i.net> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 20 May, 2011 1 commit
-
-
Mariusz Kozlowski authored
Currently 'fh' initialises to whatever happens to be on stack. This looks like a typo and this patch fixes that. Signed-off-by:
Mariusz Kozlowski <mk@lab.zgora.pl> Acked-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 22 Mar, 2011 1 commit
-
-
Hans Verkuil authored
Drivers that use v4l2_fh can now use the core framework support of g/s_priority. Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 21 Mar, 2011 1 commit
-
-
Hans Verkuil authored
Unable to test this due to lack of hardware. Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 19 Jan, 2011 1 commit
-
-
Hans Verkuil authored
Implement core-assisted locking in cpia2. Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 29 Dec, 2010 1 commit
-
-
Hans Verkuil authored
Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 21 Oct, 2010 1 commit
-
-
Hans Verkuil authored
V4L1 is deprecated and will be removed completely soon. Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 19 May, 2010 1 commit
-
-
Hans Verkuil authored
v4l2_prio_init/open/close returned an int when in fact they would always return 0. Make these void functions. v4l2_prio_close and v4l2_prio_check pass an enum v4l2_priority as a pointer for no good reason. Replace with a normal enum v4l2_priority argument. These changes will simplify the work of moving priority handling into the v4l core. Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 16 Dec, 2009 3 commits
-
-
Thiago Farina authored
Replace MAKE_STRING to __stringify macro Signed-off-by:
Thiago Farina <tfransosi@gmail.com> Signed-off-by:
Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
Laurent Pinchart authored
Now that the video_device registration is tested using video_is_registered(), drivers don't need to initialize the video_device::minor field to -1 anymore. Remove those unneeded assignments. [mchehab.redhat.com: removed tm6000 changes as tm6000 is not ready yet for submission even on staging] Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
Laurent Pinchart authored
Fix all device drivers to use the new video_device_node_name function. This also strips kernel log messages from the "/dev/" prefix, has the device node location is a userspace policy decision unknown to the kernel. Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 16 Jun, 2009 1 commit
-
-
Roel Kluin authored
Remove redundant tests on unsigned. Signed-off-by:
Roel Kluin <roel.kluin@gmail.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 30 Mar, 2009 1 commit
-
-
Mauro Carvalho Chehab authored
Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 02 Jan, 2009 2 commits
-
-
Hans Verkuil authored
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>
-
Hans Verkuil authored
Introduce a struct v4l2_file_operations for v4l2 drivers. Remove the unnecessary inode argument. Move compat32 handling (and llseek) into the v4l2-dev core: this is now handled in the v4l2 core and no longer in the drivers themselves. Note that this changeset reverts an earlier patch that changed the return type of__video_ioctl2 from int to long. This change will be reinstated later in a much improved version. Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 29 Dec, 2008 2 commits
-
-
Hans Verkuil authored
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>
-
Alan Cox authored
Signed-off-by:
Alan Cox <alan@redhat.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 21 Oct, 2008 1 commit
-
-
Hans Verkuil authored
The kernel number of a v4l2 node (e.g. videoX, radioX or vbiX) is now independent of the minor number. So instead of using the minor field of the video_device struct one has to use the num field: this always contains the kernel number of the device node. I forgot about this when I did the v4l2 core change, so this patch converts all drivers that use it in one go. Luckily the change is trivial. Cc: michael@mihu.de Cc: mchehab@infradead.org Cc: corbet@lwn.net Cc: luca.risolia@studio.unibo.it Cc: isely@pobox.com Cc: pe1rxq@amsat.org Cc: royale@zerezo.com Cc: mkrufky@linuxtv.org Cc: stoth@linuxtv.org Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 12 Oct, 2008 1 commit
-
-
Hans Verkuil authored
Use the new video_drvdata(filp) function where it is safe to do so. Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 03 Sep, 2008 2 commits
-
-
Hans Verkuil authored
Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
Hans Verkuil authored
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>
-
- 27 Jul, 2008 1 commit
-
-
Hans Verkuil authored
The type and type2 fields were unused and so could be removed. Instead add a vfl_type field that contains the type of the video device. Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab@infradead.org>
-
- 26 Jul, 2008 1 commit
-
-
Hans Verkuil authored
According to an old comment this should have been removed in 2.6.15. Better late than never... Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab@infradead.org>
-
- 23 Jul, 2008 1 commit
-
-
Hans Verkuil authored
The functions in a header should not belong to another module. The prio functions belong to v4l2-common.c, so move them to v4l2-common.h. The ioctl functions belong to v4l2-ioctl.c, so create a new v4l2-ioctl.h header and move those functions to it. Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab@infradead.org>
-