summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2016-07-08[media] si2157: do not allow driver unbindAntti Palosaari1-1/+2
Disable runtime unbind as driver does not support it. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] si2168: do not allow driver unbindAntti Palosaari1-1/+2
Disable runtime unbind as driver does not support it. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] si2168: add support for newer firmwaresAntti Palosaari2-52/+80
Si2168-B40 firmware API has changed somewhere between 4.0-11 and 4.0-19 so that sleep will lose firmware upgrade from the chip. Due to that firmware re-upload is needed when newer firmwares are used. Rewrote firmware handling logic partly at the same. Signed-off-by: Antti Palosaari <crope@iki.fi> Cc: Olli Salonen <olli.salonen@iki.fi> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] tw686x: make const structs staticHans Verkuil1-3/+3
Fix sparse warnings: tw686x-video.c:148:29: warning: symbol 'memcpy_dma_ops' was not declared. Should it be static? tw686x-video.c:195:29: warning: symbol 'contig_dma_ops' was not declared. Should it be static? tw686x-video.c:361:29: warning: symbol 'sg_dma_ops' was not declared. Should it be static? Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] adv7604: Add support for hardware resetDragos Bogdan1-0/+20
The part can be reset by a low pulse on the RESET pin (i.e. a hardware reset) with a minimum width of 5 ms. It is recommended to wait 5 ms after the low pulse before an I2C write is performed to the part. For safety reasons, the delays will be between 5 and 10 ms. The RESET pin can be tied high, so the GPIO is optional. Signed-off-by: Dragos Bogdan <dragos.bogdan@analog.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] ddbridge: Replace vmalloc with vzallocAmitoj Kaur Chawla1-2/+1
vzalloc combines vmalloc and memset 0. The Coccinelle semantic patch used to make this change is as follows: @@ type T; T *d; expression e; statement S; @@ d = - vmalloc + vzalloc (...); if (!d) S - memset(d, 0, sizeof(T)); Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] dvb: use ktime_t for internal timeoutArnd Bergmann5-16/+11
The dvb demuxer code uses a 'struct timespec' to pass a timeout as absolute time. This will cause problems on 32-bit architectures in 2038 when time_t overflows, and it is racy with a concurrent settimeofday() call. This patch changes the code to use ktime_get() instead, using the monotonic time base to avoid both the race and the overflow. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media: coda: Fix probe() if reset controller is missingAlexander Shiyan1-1/+1
Commit 39b4da71ca33 ("reset: use ENOTSUPP instead of ENOSYS") changed return value for reset controller if it missing. This patch changes the CODA driver to handle this value. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] V4L: fix the Z16 format definitionGuennadi Liakhovetski1-1/+1
A copy paste error created that format with the same one-line description as Y8I and Y12I, whereas Z16 is quite different from them both. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] vb2: Fix commentRicardo Ribalda1-1/+1
The comment was referencing the wrong function. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] vb2: Merge vb2_internal_qbuf and vb2_qbufRicardo Ribalda1-9/+5
After all the code refactoring, vb2_internal_qbuf is only called by vb2_qbuf. Since the function it is very simple, there is no need to have two functions. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] vb2: Merge vb2_internal_dqbuf and vb2_dqbufRicardo Ribalda1-22/+17
After all the code refactoring, vb2_internal_dqbuf is only called by vb2_dqbuf. Since the function it is very simple, there is no need to have two functions. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] vb2: V4L2_BUF_FLAG_DONE is set after DQBUFRicardo Ribalda1-0/+6
According to the doc, V4L2_BUF_FLAG_DONE is cleared after DQBUF: V4L2_BUF_FLAG_DONE 0x00000004 ... After calling the VIDIOC_QBUF or VIDIOC_DQBUF it is always cleared ... Unfortunately, it seems that videobuf2 keeps it set after DQBUF. This can be tested with vivid and dev_debug: [257604.338082] video1: VIDIOC_DQBUF: 71:33:25.00260479 index=3, type=vid-cap, flags=0x00002004, field=none, sequence=163, memory=userptr, bytesused=460800, offset/userptr=0x344b000, length=460800 This patch forces FLAG_DONE to 0 after calling DQBUF. Reported-by: Dimitrios Katsaros <patcherwork@gmail.com> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] sur40: drop unnecessary format descriptionHans Verkuil1-1/+0
Don't fill in the format description. This is now done in the V4L2 core to ensure consistent descriptions. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] usbtv: improve a commentLubomir Rintel1-2/+17
Patrick Keshishian improved the explanation of the protocol when porting the driver to OpenBSD. Given it's a reverse engineering one and there's no documetnation it might be helpful to whoever hacks on the driver. Signed-off-by: Patrick Keshishian <sidster@boxsoft.com> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] usbtv: clarify the licensingLubomir Rintel4-37/+93
OpenBSD would like to reuse some code but consider the licensing not clear enough. Let's clarify it a bit so that it suits their conventions: 1.) Keep the "extra text" away from the copyright statement and the rights grant. 2.) Add the warranty disclaimer -- it should not be legally required, nevertheless the clause 1. of the rights grant refest to it. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Acked-by: Federico Simoncelli <fsimonce@redhat.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] sur40: fix occasional oopses on device closeFlorian Echtler1-1/+2
Closing the V4L2 device sometimes triggers a kernel oops. Present patch fixes this. Signed-off-by: Martin Kaltenbrunner <modin@yuri.at> Signed-off-by: Florian Echtler <floe@butterbrot.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: <stable@vger.kernel.org> # for v4.2 and up Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] sur40: lower poll interval to fix occasional FPS drops to ~56 FPSFlorian Echtler1-1/+1
The framerate sometimes drops below 60 Hz if the poll interval is too high. Lowering it to the minimum of 1 ms fixes this. Signed-off-by: Martin Kaltenbrunner <modin@yuri.at> Signed-off-by: Florian Echtler <floe@butterbrot.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: <stable@vger.kernel.org> # for v4.2 and up Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] DocBook: mention the memory type to be set for all streaming I/OJavier Martinez Canillas1-2/+2
The DMA buffer importing streaming I/O section mentions the memory type value that has to be set when calling the VIDIOC_REQBUFS ioctl but this isn't mentioned in neither the Memory Mapping nor User Pointer sections. A user can know the values by looking at the examples but it's better to explicitly mention in the documentation, and also makes all sections about streaming I/O methods more consistent. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] DocBook: add dmabuf as streaming I/O in VIDIOC_REQBUFS descriptionJavier Martinez Canillas1-1/+1
Commit 4b9c1cb641c46 ("[media] Documentation: media: description of DMABUF importing in V4L2") documented the V4L2 dma-buf importing support but did not update the VIDIOC_REQBUFS description, so only the Memory Mapping and User Pointer I/O methods are mentioned. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] saa7164: Replace if and BUG with BUG_ONAmitoj Kaur Chawla1-4/+2
Replace if condition and BUG() with a BUG_ON having the conditional expression of the if statement as argument. The Coccinelle semantic patch used to make this change is as follows: @@ expression E,f; @@ ( if (<+... f(...) ...+>) { BUG(); } | - if (E) { BUG(); } + BUG_ON(E); ) Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] bt8xx: remove needless module refcountingAlexey Khoroshilov1-2/+0
It is responsibility of a caller of fops->open(), to make sure an owner of the fops is available until file is closed. So, there is no need to lock THIS_MODULE explicitly. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] rc-main: fix kernel oops after unloading keymap moduleHans Verkuil1-2/+8
When the rc_map table is created the char pointer of the name of the keymap is copied to the rc_map->name field. However, this pointer points to memory from the keymap module itself. Since these keymap modules are not refcounted, that means anyone can call rmmod to unload that module. Which is not a big deal because the contents of the map is all copied to rc_map, except for the keymap name. So after a keymap module is unloaded the name pointer has become stale. Unloading the rc-core module will now cause a kernel oops in rc_dev_uevent(). The solution is to kstrdup the name so there are no more references to the keymap module remaining. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] v4l2-tpg: ignore V4L2_DV_RGB_RANGE setting for YUV formatsHans Verkuil1-2/+2
The V4L2_DV_RGB_RANGE_* settings are, as the name says, for RGB formats only. So they should be ignored for non-RGB formats. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] drivers/media/platform/Kconfig: fix VIDEO_MEDIATEK_VCODEC dependencyHans Verkuil1-1/+1
Allow VIDEO_MEDIATEK_VCODEC to build when COMPILE_TEST is set (even without MTK_IOMMU). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] mtk-vcodec: convert driver to use the new vb2_queue dev fieldHans Verkuil3-22/+6
The patch dropping the vb2_dma_contig_init_ctx() and _cleanup_ctx() functions was already applied before this driver was added. So convert this driver as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] gspca: avoid unused variable warningsArnd Bergmann3-3/+3
When CONFIG_INPUT is disabled, multiple gspca backend drivers print compile-time warnings about unused variables: media/usb/gspca/cpia1.c: In function 'sd_stopN': media/usb/gspca/cpia1.c:1627:13: error: unused variable 'sd' [-Werror=unused-variable] media/usb/gspca/konica.c: In function 'sd_stopN': media/usb/gspca/konica.c:246:13: error: unused variable 'sd' [-Werror=unused-variable] This annotates the variables as __maybe_unused, to let the compiler know that they are declared intentionally. Fixes: ee186fd96a5f ("[media] gscpa_t613: Add support for the camera button") Fixes: c2f644aeeba3 ("[media] gspca_cpia1: Add support for button") Fixes: b517af722860 ("V4L/DVB: gspca_konica: New gspca subdriver for konica chipset using cams") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] gspca: correct speed testingOliver Neukum1-1/+1
Allow for SS+ devices Signed-off-by: Oliver Neukum <ONeukum@suse.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] MAINTAINERS: change maintainer for gscpa/pwc/radio-sharkHans Verkuil1-8/+8
Hans de Goede has no more time to work on those, so I'll take over. For gspca/pwc I'll do 'Odd Fixes', for radio-shark I'll be a full maintainer. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] hdpvr: Remove deprecated create_singlethread_workqueueBhaktipriya Shridhar3-13/+5
The workqueue "workqueue" is involved in transmitting hdpvr buffers. It has a single work item(&dev->worker) and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. Work item has been flushed in hdpvr_device_release() to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] adv7604: Remove deprecated create_singlethread_workqueueBhaktipriya Shridhar1-13/+1
The workqueue "work_queues" enables hotplugging. It has a single work item(&state->delayed_work_enable_hotplug) and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. Work item has been sync cancelled in adv76xx_remove() to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] tc358743: Remove deprecated create_singlethread_workqueueBhaktipriya Shridhar1-14/+1
The workqueue "work_queues" enables hotplugging. It has a single work item(&state->delayed_work_enable_hotplug) and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. Work item has been sync cancelled in tc358743_remove() to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] adv7842: Remove deprecated create_singlethread_workqueueBhaktipriya Shridhar1-14/+2
The workqueue "work_queues" enables hotplugging. It has a single work item(&state->delayed_work_enable_hotplug) and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. Work item has been sync cancelled in adv7842_remove() to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] sn9c20x: Remove deprecated create_singlethread_workqueueBhaktipriya Shridhar1-10/+4
The workqueue "work_thread" is involved in JPEG quality update. It has a single work item(&sd->work) and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. Work item has been flushed in sd_stop0() to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] gspca: fix a v4l2-compliance failure about buffer timestampAntonio Ospite1-1/+1
v4l2-compliance fails with this message: fail: v4l2-test-buffers.cpp(250): \ timestamp != V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC && \ timestamp != V4L2_BUF_FLAG_TIMESTAMP_COPY ... test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL When setting the frame time, gspca uses v4l2_get_timestamp() which uses ktime_get_ts() which uses ktime_get_ts64() which returns a monotonic timestamp, so it's safe to initialize the buffer flags to V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC to fix the failure. Signed-off-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] gspca: fix a v4l2-compliance failure about VIDIOC_ENUM_FRAMEINTERVALSAntonio Ospite1-1/+18
According to v4l2-compliance VIDIOC_ENUM_FRAMEINTERVALS should fail for unsupported frame sizes, but gspca is too tolerant and tries to find the frame intervals for the frame size nearest to the requested one. This makes v4l2-compliance fail with this message: fail: v4l2-test-formats.cpp(123): \ found frame intervals for invalid size 321x240 test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: FAIL Fix this by using an exact match for the frame size when enumerating frame intervals, and retuning an error if the frame size for which the frame intervals have been asked is not supported. Signed-off-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] gspca: rename wxh_to_mode() to wxh_to_nearest_mode()Antonio Ospite1-4/+4
The name wxh_to_nearest_mode() reflects better what the function does. Signed-off-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] gspca: fix setting frame interval type in vidioc_enum_frameintervals()Antonio Ospite1-1/+1
Set the frame _interval_ type to V4L2_FRMIVAL_TYPE_DISCRETE instead of using V4L2_FRMSIZE_TYPE_DISCRETE which is meant for frame _size_. The old and new values happen to be the same so there is no functional change. Signed-off-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] gspca: ov534/topro: use a define for the default framerateAntonio Ospite2-6/+7
When writing the change in commit dcc7fdbec53a ("[media] gspca: ov534/topro: prevent a division by 0") I used magic numbers for the default framerate to minimize the code footprint to make it easier to backport the patch to the stable trees. However it's better if the default framerate has its own define to avoid risking using different values in different places, and for readability. While at it also remove some trivial comments about the framerates which don't add much to the code anymore. Signed-off-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] pwc: hide unused labelArnd Bergmann1-0/+2
The pwc driver causes a warning when CONFIG_USB_PWC_INPUT_EVDEV is unset: drivers/media/usb/pwc/pwc-if.c: In function 'usb_pwc_probe': drivers/media/usb/pwc/pwc-if.c:1115:1: warning: label 'err_video_unreg' defined but not used [-Wunused-label] This moves the unused label and code inside another #ifdef to get rid of the warning. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] vb2: replace void *alloc_ctxs by struct device *alloc_devsHans Verkuil88-208/+128
Make this a proper typed array. Drop the old allocate context code since that is no longer used. Note that the memops functions now get a struct device pointer instead of the struct device ** that was there initially (actually a void pointer to a struct containing only a struct device pointer). This code is now a lot cleaner. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media/platform: convert drivers to use the new vb2_queue dev fieldHans Verkuil14-94/+22
Stop using alloc_ctx and just fill in the device pointer. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media/platform: convert drivers to use the new vb2_queue dev fieldHans Verkuil12-68/+15
Stop using alloc_ctx and just fill in the device pointer. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media/.../soc-camera: convert drivers to use the new vb2_queue dev fieldHans Verkuil3-36/+4
Stop using alloc_ctx and just fill in the device pointer. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: Ludovic Desroches <ludovic.desroches@atmel.com> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media/platform: convert drivers to use the new vb2_queue dev fieldHans Verkuil9-107/+17
Stop using alloc_ctx and just fill in the device pointer. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media/platform: convert drivers to use the new vb2_queue dev fieldHans Verkuil8-71/+12
Stop using alloc_ctx and just fill in the device pointer. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Benoit Parrot <bparrot@ti.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media/platform: convert drivers to use the new vb2_queue dev fieldHans Verkuil13-88/+9
Stop using alloc_ctx and just fill in the device pointer. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Cc: Scott Jiang <scott.jiang.linux@gmail.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] staging/media: convert drivers to use the new vb2_queue dev fieldHans Verkuil4-21/+2
Stop using alloc_ctx and just fill in the device pointer. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media/pci/tw686x: convert driver to use the new vb2_queue dev fieldHans Verkuil2-36/+1
Stop using alloc_ctx and just fill in the device pointer. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media/pci: convert drivers to use the new vb2_queue dev fieldHans Verkuil34-153/+32
Stop using alloc_ctx and just fill in the device pointer. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Federico Vaga <federico.vaga@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>