Hans Verkuil [Mon, 7 Apr 2014 12:20:39 +0000 (09:20 -0300)]
upstream: [media] vb2: reject output buffers with V4L2_FIELD_ALTERNATE
This is not allowed by the spec and does in fact not make any sense.
Return -EINVAL if this is the case.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Tue, 8 Apr 2014 08:00:39 +0000 (05:00 -0300)]
upstream: [media] v4l2-dv-timings.h: add CEA-861-F 4K timings
Add the CEA-861-F timings for 3840x2160p24/25/30/50/60 and
4096x2160p24/25/30/50/60.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Sun, 23 Mar 2014 06:37:25 +0000 (03:37 -0300)]
upstream: [media] staging: media: davinci: vpfe: release buffers in case start_streaming call back fails
this patch releases the buffer by calling vb2_buffer_done(),
with state marked as VB2_BUF_STATE_QUEUED if start_streaming()
call back fails.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Sun, 23 Mar 2014 06:37:24 +0000 (03:37 -0300)]
upstream: [media] staging: media: davinci: vpfe: use v4l2_fh for priority handling
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mike Sampson [Mon, 24 Mar 2014 09:04:49 +0000 (06:04 -0300)]
upstream: [media] sn9c102_hv7131r: fix style warnings flagged by checkpatch.pl
Signed-off-by: Mike Sampson <mike@sambodata.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Sat, 22 Mar 2014 11:39:24 +0000 (08:39 -0300)]
upstream: [media] media: davinci: vpfe: use v4l2_fh for priority handling
This patch migrates the vpfe driver to use v4l2_fh for
priority handling.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Sat, 22 Mar 2014 10:57:59 +0000 (07:57 -0300)]
upstream: [media] media: davinci: vpbe: use v4l2_fh for priority handling
This patch migrates the vpbe driver to use v4l2_fh for
priority handling. This also fixes v4l2-compliance test.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Mon, 17 Mar 2014 12:54:23 +0000 (09:54 -0300)]
upstream: [media] v4l2-ioctl.c: fix sparse __user-related warnings
Fix the use of __user in the check_array_args() prototype: instead of
using 'void * __user *' you should use 'void __user **' for sparse to
understand this correctly.
This also required the use of __force in the '*kernel_ptr = user_ptr'
assignment.
Also replace a wrong cast (void *) with the correct one (void **)
in check_array_args().
This fixes these sparse warnings:
drivers/media/v4l2-core/v4l2-ioctl.c:2284:35: warning: incorrect type in assignment (different address spaces)
drivers/media/v4l2-core/v4l2-ioctl.c:2301:35: warning: incorrect type in assignment (different address spaces)
drivers/media/v4l2-core/v4l2-ioctl.c:2319:35: warning: incorrect type in assignment (different address spaces)
drivers/media/v4l2-core/v4l2-ioctl.c:2386:57: warning: incorrect type in argument 4 (different address spaces)
drivers/media/v4l2-core/v4l2-ioctl.c:2420:29: warning: incorrect type in assignment (different address spaces)
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Mon, 17 Mar 2014 12:54:19 +0000 (09:54 -0300)]
upstream: [media] v4l2-subdev.h: fix sparse error with v4l2_subdev_notify
The notify function is a void function, yet the v4l2_subdev_notify
define uses it in a ? : construction, which causes sparse warnings.
Replace the define by a static inline function and move it to
v4l2-device.h, which is where it belongs since it needs to know the
v4l2_device struct. This wasn't a problem when it was a define, but
as a static inline function this no longer compiles in v4l2-subdev.h.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Ismael Luceno [Fri, 14 Mar 2014 19:43:23 +0000 (16:43 -0300)]
upstream: [media] gspca_gl860: Clean up idxdata structs
Signed-off-by: Ismael Luceno <ismael.luceno@gmail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Robert Butora [Mon, 24 Mar 2014 22:41:38 +0000 (19:41 -0300)]
upstream: [media] media/usb/gspca: Add support for Scopium astro webcam (0547:7303)
This patch does not modify existing drivers. It adds subdriver
to gspca for DTCS033 (Scopium) webcam for astrophotography.
The patch adds dtcs033.c and modifies Kconfig and Makefile.
Signed-off-by: Robert Butora <robert.butora.fi@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Jean Delvare [Fri, 11 Apr 2014 07:15:32 +0000 (04:15 -0300)]
upstream: [media] Prefer gspca_sonixb over sn9c102 for all devices
The sn9c102 driver is deprecated. It was moved to staging in
anticipation of its removal in a future kernel version. However, USB
devices 0C45:6024 and 0C45:6025 are still handled by sn9c102 when
both sn9c102 and gspca_sonixb are enabled.
We must migrate all the users of these devices to the gspca_sonixb
driver now, so that it gets sufficient testing before the sn9c102
driver is finally phased out.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Sun, 23 Mar 2014 05:44:11 +0000 (02:44 -0300)]
upstream: [media] media: davinci: vpfe: make sure all the buffers unmapped and released
this patch makes sure that it terminates if any IO in
progress and also makes sure that all the buffers are unmapped.
It was observed that with several runs of application the application
sometimes failed to allocate memory, This patch makes sure it
all the buffers are released.
Using kmemleak it was found that buffer were not released, this patch
fixes following issue,
echo scan > /sys/kernel/debug/kmemleak
Kernel message reads:
memleak: 3 new suspected memory leaks (see /sys/kernel/debug/kmemleak)
Then,
cat /sys/kernel/debug/kmemleak
unreferenced object 0xc564a480 (size 192):
comm "mttest", pid 764, jiffies
4294945878 (age 487.160s)
hex dump (first 32 bytes):
00 00 00 00 28 07 07 20 d0 02 00 00 e0 01 00 00 ....(.. ........
00 00 00 00 00 64 05 00 01 00 00 00 01 00 00 00 .....d..........
backtrace:
[<
c00a98dc>] create_object+0x10c/0x28c
[<
c03ba8ec>] kmemleak_alloc+0x3c/0x70
[<
c00a67c0>] __kmalloc+0x11c/0x1d4
[<
c02b6f48>] __videobuf_alloc+0x1c/0x3c
[<
c02b6194>] videobuf_alloc_vb+0x38/0x80
[<
c02b6638>] __videobuf_mmap_setup+0x9c/0x108
[<
c02b6da0>] videobuf_reqbufs.part.10+0x12c/0x1bc
[<
c02b6e9c>] videobuf_reqbufs+0x6c/0x8c
[<
c02be2c4>] vpfe_reqbufs+0xcc/0x130
[<
c02aae90>] v4l_reqbufs+0x50/0x54
[<
c02aab54>] __video_do_ioctl+0x260/0x2c4
[<
c02a9dd4>] video_usercopy+0xf0/0x310
[<
c02aa008>] video_ioctl2+0x14/0x1c
[<
c02a562c>] v4l2_ioctl+0x104/0x14c
[<
c00bd320>] do_vfs_ioctl+0x80/0x2d0
[<
c00bd5b4>] SyS_ioctl+0x44/0x64
unreferenced object 0xc564ac00 (size 192):
comm "mttest", pid 764, jiffies
4294945878 (age 487.160s)
hex dump (first 32 bytes):
01 00 00 00 28 07 07 20 d0 02 00 00 e0 01 00 00 ....(.. ........
00 00 00 00 00 64 05 00 01 00 00 00 01 00 00 00 .....d..........
backtrace:
[<
c00a98dc>] create_object+0x10c/0x28c
[<
c03ba8ec>] kmemleak_alloc+0x3c/0x70
[<
c00a67c0>] __kmalloc+0x11c/0x1d4
[<
c02b6f48>] __videobuf_alloc+0x1c/0x3c
[<
c02b6194>] videobuf_alloc_vb+0x38/0x80
[<
c02b6638>] __videobuf_mmap_setup+0x9c/0x108
[<
c02b6da0>] videobuf_reqbufs.part.10+0x12c/0x1bc
[<
c02b6e9c>] videobuf_reqbufs+0x6c/0x8c
[<
c02be2c4>] vpfe_reqbufs+0xcc/0x130
[<
c02aae90>] v4l_reqbufs+0x50/0x54
[<
c02aab54>] __video_do_ioctl+0x260/0x2c4
[<
c02a9dd4>] video_usercopy+0xf0/0x310
[<
c02aa008>] video_ioctl2+0x14/0x1c
[<
c02a562c>] v4l2_ioctl+0x104/0x14c
[<
c00bd320>] do_vfs_ioctl+0x80/0x2d0
[<
c00bd5b4>] SyS_ioctl+0x44/0x64
unreferenced object 0xc564a180 (size 192):
comm "mttest", pid 764, jiffies
4294945880 (age 487.140s)
hex dump (first 32 bytes):
02 00 00 00 28 07 07 20 d0 02 00 00 e0 01 00 00 ....(.. ........
00 00 00 00 00 64 05 00 01 00 00 00 01 00 00 00 .....d..........
backtrace:
[<
c00a98dc>] create_object+0x10c/0x28c
[<
c03ba8ec>] kmemleak_alloc+0x3c/0x70
[<
c00a67c0>] __kmalloc+0x11c/0x1d4
[<
c02b6f48>] __videobuf_alloc+0x1c/0x3c
[<
c02b6194>] videobuf_alloc_vb+0x38/0x80
[<
c02b6638>] __videobuf_mmap_setup+0x9c/0x108
[<
c02b6da0>] videobuf_reqbufs.part.10+0x12c/0x1bc
[<
c02b6e9c>] videobuf_reqbufs+0x6c/0x8c
[<
c02be2c4>] vpfe_reqbufs+0xcc/0x130
[<
c02aae90>] v4l_reqbufs+0x50/0x54
[<
c02aab54>] __video_do_ioctl+0x260/0x2c4
[<
c02a9dd4>] video_usercopy+0xf0/0x310
[<
c02aa008>] video_ioctl2+0x14/0x1c
[<
c02a562c>] v4l2_ioctl+0x104/0x14c
[<
c00bd320>] do_vfs_ioctl+0x80/0x2d0
[<
c00bd5b4>] SyS_ioctl+0x44/0x64
Reported-by: Jimmy Ho <jimmygge@gmail.com>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Sun, 23 Mar 2014 05:16:46 +0000 (02:16 -0300)]
upstream: [media] staging: media: davinci: vpfe: make sure all the buffers are released
from commit-id:
b3379c6201bb3555298cdbf0aa004af260f2a6a4
"vb2: only call start_streaming if sufficient buffers are queued"
the vb2 framework warns on (WARN_ON()) if all the active buffers
are not released when streaming is stopped, initially the vb2 silently
released the buffer internally if the buffer was not released by
the driver.
This patch fixes following issue:
WARNING: CPU: 0 PID: 2049 at drivers/media/v4l2-core/videobuf2-core.c:2011 __vb2_queue_cancel+0x1a0/0x218()
Modules linked in:
CPU: 0 PID: 2049 Comm: vpfe_video Tainted: G W 3.14.0-rc5-00414-ged97a6f #89
[<
c000e3f0>] (unwind_backtrace) from [<
c000c618>] (show_stack+0x10/0x14)
[<
c000c618>] (show_stack) from [<
c001adb0>] (warn_slowpath_common+0x68/0x88)
[<
c001adb0>] (warn_slowpath_common) from [<
c001adec>] (warn_slowpath_null+0x1c/0x24)
[<
c001adec>] (warn_slowpath_null) from [<
c0252e0c>] (__vb2_queue_cancel+0x1a0/0x218)
[<
c0252e0c>] (__vb2_queue_cancel) from [<
c02533a4>] (vb2_queue_release+0x14/0x24)
[<
c02533a4>] (vb2_queue_release) from [<
c025a65c>] (vpfe_release+0x60/0x230)
[<
c025a65c>] (vpfe_release) from [<
c023fe5c>] (v4l2_release+0x34/0x74)
[<
c023fe5c>] (v4l2_release) from [<
c00b4a00>] (__fput+0x80/0x224)
[<
c00b4a00>] (__fput) from [<
c00341e8>] (task_work_run+0xa0/0xd0)
[<
c00341e8>] (task_work_run) from [<
c001cc28>] (do_exit+0x244/0x918)
[<
c001cc28>] (do_exit) from [<
c001d344>] (do_group_exit+0x48/0xdc)
[<
c001d344>] (do_group_exit) from [<
c0029894>] (get_signal_to_deliver+0x2a0/0x5bc)
[<
c0029894>] (get_signal_to_deliver) from [<
c000b888>] (do_signal+0x78/0x3a0)
[<
c000b888>] (do_signal) from [<
c000bc54>] (do_work_pending+0xa4/0xb4)
[<
c000bc54>] (do_work_pending) from [<
c00096dc>] (work_pending+0xc/0x20)
---[ end trace
5faa75e8c2f8a6a1 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 2049 at drivers/media/v4l2-core/videobuf2-core.c:1095 vb2_buffer_done+0x1e0/0x224()
Modules linked in:
CPU: 0 PID: 2049 Comm: vpfe_video Tainted: G W 3.14.0-rc5-00414-ged97a6f #89
[<
c000e3f0>] (unwind_backtrace) from [<
c000c618>] (show_stack+0x10/0x14)
[<
c000c618>] (show_stack) from [<
c001adb0>] (warn_slowpath_common+0x68/0x88)
[<
c001adb0>] (warn_slowpath_common) from [<
c001adec>] (warn_slowpath_null+0x1c/0x24)
[<
c001adec>] (warn_slowpath_null) from [<
c0252c28>] (vb2_buffer_done+0x1e0/0x224)
[<
c0252c28>] (vb2_buffer_done) from [<
c0252e3c>] (__vb2_queue_cancel+0x1d0/0x218)
[<
c0252e3c>] (__vb2_queue_cancel) from [<
c02533a4>] (vb2_queue_release+0x14/0x24)
[<
c02533a4>] (vb2_queue_release) from [<
c025a65c>] (vpfe_release+0x60/0x230)
[<
c025a65c>] (vpfe_release) from [<
c023fe5c>] (v4l2_release+0x34/0x74)
[<
c023fe5c>] (v4l2_release) from [<
c00b4a00>] (__fput+0x80/0x224)
[<
c00b4a00>] (__fput) from [<
c00341e8>] (task_work_run+0xa0/0xd0)
[<
c00341e8>] (task_work_run) from [<
c001cc28>] (do_exit+0x244/0x918)
[<
c001cc28>] (do_exit) from [<
c001d344>] (do_group_exit+0x48/0xdc)
[<
c001d344>] (do_group_exit) from [<
c0029894>] (get_signal_to_deliver+0x2a0/0x5bc)
[<
c0029894>] (get_signal_to_deliver) from [<
c000b888>] (do_signal+0x78/0x3a0)
[<
c000b888>] (do_signal) from [<
c000bc54>] (do_work_pending+0xa4/0xb4)
[<
c000bc54>] (do_work_pending) from [<
c00096dc>] (work_pending+0xc/0x20)
---[ end trace
5faa75e8c2f8a6a2 ]---
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Sat, 22 Mar 2014 11:03:09 +0000 (08:03 -0300)]
upstream: [media] media: davinci: vpbe_display: fix releasing of active buffers
from commit-id:
b3379c6201bb3555298cdbf0aa004af260f2a6a4
"vb2: only call start_streaming if sufficient buffers are queued"
the vb2 framework warns on (WARN_ON()) if all the active buffers
are not released when streaming is stopped, initially the vb2 silently
released the buffer internally if the buffer was not released by
the driver.
This patch fixes following issue:
WARNING: CPU: 0 PID: 2049 at drivers/media/v4l2-core/videobuf2-core.c:2011 __vb2_queue_cancel+0x1a0/0x218()
Modules linked in:
CPU: 0 PID: 2049 Comm: vpbe_display Tainted: G W 3.14.0-rc5-00414-ged97a6f #89
[<
c000e3f0>] (unwind_backtrace) from [<
c000c618>] (show_stack+0x10/0x14)
[<
c000c618>] (show_stack) from [<
c001adb0>] (warn_slowpath_common+0x68/0x88)
[<
c001adb0>] (warn_slowpath_common) from [<
c001adec>] (warn_slowpath_null+0x1c/0x24)
[<
c001adec>] (warn_slowpath_null) from [<
c0252e0c>] (__vb2_queue_cancel+0x1a0/0x218)
[<
c0252e0c>] (__vb2_queue_cancel) from [<
c02533a4>] (vb2_queue_release+0x14/0x24)
[<
c02533a4>] (vb2_queue_release) from [<
c025a65c>] (vpbe_display_release+0x60/0x230)
[<
c025a65c>] (vpbe_display_release) from [<
c023fe5c>] (v4l2_release+0x34/0x74)
[<
c023fe5c>] (v4l2_release) from [<
c00b4a00>] (__fput+0x80/0x224)
[<
c00b4a00>] (__fput) from [<
c00341e8>] (task_work_run+0xa0/0xd0)
[<
c00341e8>] (task_work_run) from [<
c001cc28>] (do_exit+0x244/0x918)
[<
c001cc28>] (do_exit) from [<
c001d344>] (do_group_exit+0x48/0xdc)
[<
c001d344>] (do_group_exit) from [<
c0029894>] (get_signal_to_deliver+0x2a0/0x5bc)
[<
c0029894>] (get_signal_to_deliver) from [<
c000b888>] (do_signal+0x78/0x3a0)
[<
c000b888>] (do_signal) from [<
c000bc54>] (do_work_pending+0xa4/0xb4)
[<
c000bc54>] (do_work_pending) from [<
c00096dc>] (work_pending+0xc/0x20)
---[ end trace
5faa75e8c2f8a6a1 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 2049 at drivers/media/v4l2-core/videobuf2-core.c:1095 vb2_buffer_done+0x1e0/0x224()
Modules linked in:
CPU: 0 PID: 2049 Comm: vpbe_display Tainted: G W 3.14.0-rc5-00414-ged97a6f #89
[<
c000e3f0>] (unwind_backtrace) from [<
c000c618>] (show_stack+0x10/0x14)
[<
c000c618>] (show_stack) from [<
c001adb0>] (warn_slowpath_common+0x68/0x88)
[<
c001adb0>] (warn_slowpath_common) from [<
c001adec>] (warn_slowpath_null+0x1c/0x24)
[<
c001adec>] (warn_slowpath_null) from [<
c0252c28>] (vb2_buffer_done+0x1e0/0x224)
[<
c0252c28>] (vb2_buffer_done) from [<
c0252e3c>] (__vb2_queue_cancel+0x1d0/0x218)
[<
c0252e3c>] (__vb2_queue_cancel) from [<
c02533a4>] (vb2_queue_release+0x14/0x24)
[<
c02533a4>] (vb2_queue_release) from [<
c025a65c>] (vpbe_display_release+0x60/0x230)
[<
c025a65c>] (vpbe_display_release) from [<
c023fe5c>] (v4l2_release+0x34/0x74)
[<
c023fe5c>] (v4l2_release) from [<
c00b4a00>] (__fput+0x80/0x224)
[<
c00b4a00>] (__fput) from [<
c00341e8>] (task_work_run+0xa0/0xd0)
[<
c00341e8>] (task_work_run) from [<
c001cc28>] (do_exit+0x244/0x918)
[<
c001cc28>] (do_exit) from [<
c001d344>] (do_group_exit+0x48/0xdc)
[<
c001d344>] (do_group_exit) from [<
c0029894>] (get_signal_to_deliver+0x2a0/0x5bc)
[<
c0029894>] (get_signal_to_deliver) from [<
c000b888>] (do_signal+0x78/0x3a0)
[<
c000b888>] (do_signal) from [<
c000bc54>] (do_work_pending+0xa4/0xb4)
[<
c000bc54>] (do_work_pending) from [<
c00096dc>] (work_pending+0xc/0x20)
---[ end trace
5faa75e8c2f8a6a2 ]---
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Sat, 22 Mar 2014 11:03:08 +0000 (08:03 -0300)]
upstream: [media] media: davinci: vpif_display: fix releasing of active buffers
from commit-id:
b3379c6201bb3555298cdbf0aa004af260f2a6a4
"vb2: only call start_streaming if sufficient buffers are queued"
the vb2 framework warns on (WARN_ON()) if all the active buffers
are not released when streaming is stopped, initially the vb2 silently
released the buffer internally if the buffer was not released by
the driver.
Also this patch moves the disabling of interrupts from relase() callback
to stop_streaming() callback as which needs to be done ideally.
This patch fixes following issue:
WARNING: CPU: 0 PID: 2049 at drivers/media/v4l2-core/videobuf2-core.c:2011 __vb2_queue_cancel+0x1a0/0x218()
Modules linked in:
CPU: 0 PID: 2049 Comm: vpif_display Tainted: G W 3.14.0-rc5-00414-ged97a6f #89
[<
c000e3f0>] (unwind_backtrace) from [<
c000c618>] (show_stack+0x10/0x14)
[<
c000c618>] (show_stack) from [<
c001adb0>] (warn_slowpath_common+0x68/0x88)
[<
c001adb0>] (warn_slowpath_common) from [<
c001adec>] (warn_slowpath_null+0x1c/0x24)
[<
c001adec>] (warn_slowpath_null) from [<
c0252e0c>] (__vb2_queue_cancel+0x1a0/0x218)
[<
c0252e0c>] (__vb2_queue_cancel) from [<
c02533a4>] (vb2_queue_release+0x14/0x24)
[<
c02533a4>] (vb2_queue_release) from [<
c025a65c>] (vpif_release+0x60/0x230)
[<
c025a65c>] (vpif_release) from [<
c023fe5c>] (v4l2_release+0x34/0x74)
[<
c023fe5c>] (v4l2_release) from [<
c00b4a00>] (__fput+0x80/0x224)
[<
c00b4a00>] (__fput) from [<
c00341e8>] (task_work_run+0xa0/0xd0)
[<
c00341e8>] (task_work_run) from [<
c001cc28>] (do_exit+0x244/0x918)
[<
c001cc28>] (do_exit) from [<
c001d344>] (do_group_exit+0x48/0xdc)
[<
c001d344>] (do_group_exit) from [<
c0029894>] (get_signal_to_deliver+0x2a0/0x5bc)
[<
c0029894>] (get_signal_to_deliver) from [<
c000b888>] (do_signal+0x78/0x3a0)
[<
c000b888>] (do_signal) from [<
c000bc54>] (do_work_pending+0xa4/0xb4)
[<
c000bc54>] (do_work_pending) from [<
c00096dc>] (work_pending+0xc/0x20)
---[ end trace
5faa75e8c2f8a6a1 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 2049 at drivers/media/v4l2-core/videobuf2-core.c:1095 vb2_buffer_done+0x1e0/0x224()
Modules linked in:
CPU: 0 PID: 2049 Comm: vpif_display Tainted: G W 3.14.0-rc5-00414-ged97a6f #89
[<
c000e3f0>] (unwind_backtrace) from [<
c000c618>] (show_stack+0x10/0x14)
[<
c000c618>] (show_stack) from [<
c001adb0>] (warn_slowpath_common+0x68/0x88)
[<
c001adb0>] (warn_slowpath_common) from [<
c001adec>] (warn_slowpath_null+0x1c/0x24)
[<
c001adec>] (warn_slowpath_null) from [<
c0252c28>] (vb2_buffer_done+0x1e0/0x224)
[<
c0252c28>] (vb2_buffer_done) from [<
c0252e3c>] (__vb2_queue_cancel+0x1d0/0x218)
[<
c0252e3c>] (__vb2_queue_cancel) from [<
c02533a4>] (vb2_queue_release+0x14/0x24)
[<
c02533a4>] (vb2_queue_release) from [<
c025a65c>] (vpif_release+0x60/0x230)
[<
c025a65c>] (vpif_release) from [<
c023fe5c>] (v4l2_release+0x34/0x74)
[<
c023fe5c>] (v4l2_release) from [<
c00b4a00>] (__fput+0x80/0x224)
[<
c00b4a00>] (__fput) from [<
c00341e8>] (task_work_run+0xa0/0xd0)
[<
c00341e8>] (task_work_run) from [<
c001cc28>] (do_exit+0x244/0x918)
[<
c001cc28>] (do_exit) from [<
c001d344>] (do_group_exit+0x48/0xdc)
[<
c001d344>] (do_group_exit) from [<
c0029894>] (get_signal_to_deliver+0x2a0/0x5bc)
[<
c0029894>] (get_signal_to_deliver) from [<
c000b888>] (do_signal+0x78/0x3a0)
[<
c000b888>] (do_signal) from [<
c000bc54>] (do_work_pending+0xa4/0xb4)
[<
c000bc54>] (do_work_pending) from [<
c00096dc>] (work_pending+0xc/0x20)
---[ end trace
5faa75e8c2f8a6a2 ]---
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Sat, 22 Mar 2014 11:03:07 +0000 (08:03 -0300)]
upstream: [media] media: davinci: vpif_capture: fix releasing of active buffers
from commit-id:
b3379c6201bb3555298cdbf0aa004af260f2a6a4
"vb2: only call start_streaming if sufficient buffers are queued"
the vb2 framework warns on (WARN_ON()) if all the active buffers
are not released when streaming is stopped, initially the vb2 silently
released the buffer internally if the buffer was not released by
the driver.
Also this patch moves the disabling of interrupts from relase() callback
to stop_streaming() callback as which needs to be done ideally.
This patch fixes following issue:
WARNING: CPU: 0 PID: 2049 at drivers/media/v4l2-core/videobuf2-core.c:2011 __vb2_queue_cancel+0x1a0/0x218()
Modules linked in:
CPU: 0 PID: 2049 Comm: vpif_capture Tainted: G W 3.14.0-rc5-00414-ged97a6f #89
[<
c000e3f0>] (unwind_backtrace) from [<
c000c618>] (show_stack+0x10/0x14)
[<
c000c618>] (show_stack) from [<
c001adb0>] (warn_slowpath_common+0x68/0x88)
[<
c001adb0>] (warn_slowpath_common) from [<
c001adec>] (warn_slowpath_null+0x1c/0x24)
[<
c001adec>] (warn_slowpath_null) from [<
c0252e0c>] (__vb2_queue_cancel+0x1a0/0x218)
[<
c0252e0c>] (__vb2_queue_cancel) from [<
c02533a4>] (vb2_queue_release+0x14/0x24)
[<
c02533a4>] (vb2_queue_release) from [<
c025a65c>] (vpif_release+0x60/0x230)
[<
c025a65c>] (vpif_release) from [<
c023fe5c>] (v4l2_release+0x34/0x74)
[<
c023fe5c>] (v4l2_release) from [<
c00b4a00>] (__fput+0x80/0x224)
[<
c00b4a00>] (__fput) from [<
c00341e8>] (task_work_run+0xa0/0xd0)
[<
c00341e8>] (task_work_run) from [<
c001cc28>] (do_exit+0x244/0x918)
[<
c001cc28>] (do_exit) from [<
c001d344>] (do_group_exit+0x48/0xdc)
[<
c001d344>] (do_group_exit) from [<
c0029894>] (get_signal_to_deliver+0x2a0/0x5bc)
[<
c0029894>] (get_signal_to_deliver) from [<
c000b888>] (do_signal+0x78/0x3a0)
[<
c000b888>] (do_signal) from [<
c000bc54>] (do_work_pending+0xa4/0xb4)
[<
c000bc54>] (do_work_pending) from [<
c00096dc>] (work_pending+0xc/0x20)
---[ end trace
5faa75e8c2f8a6a1 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 2049 at drivers/media/v4l2-core/videobuf2-core.c:1095 vb2_buffer_done+0x1e0/0x224()
Modules linked in:
CPU: 0 PID: 2049 Comm: vpif_capture Tainted: G W 3.14.0-rc5-00414-ged97a6f #89
[<
c000e3f0>] (unwind_backtrace) from [<
c000c618>] (show_stack+0x10/0x14)
[<
c000c618>] (show_stack) from [<
c001adb0>] (warn_slowpath_common+0x68/0x88)
[<
c001adb0>] (warn_slowpath_common) from [<
c001adec>] (warn_slowpath_null+0x1c/0x24)
[<
c001adec>] (warn_slowpath_null) from [<
c0252c28>] (vb2_buffer_done+0x1e0/0x224)
[<
c0252c28>] (vb2_buffer_done) from [<
c0252e3c>] (__vb2_queue_cancel+0x1d0/0x218)
[<
c0252e3c>] (__vb2_queue_cancel) from [<
c02533a4>] (vb2_queue_release+0x14/0x24)
[<
c02533a4>] (vb2_queue_release) from [<
c025a65c>] (vpif_release+0x60/0x230)
[<
c025a65c>] (vpif_release) from [<
c023fe5c>] (v4l2_release+0x34/0x74)
[<
c023fe5c>] (v4l2_release) from [<
c00b4a00>] (__fput+0x80/0x224)
[<
c00b4a00>] (__fput) from [<
c00341e8>] (task_work_run+0xa0/0xd0)
[<
c00341e8>] (task_work_run) from [<
c001cc28>] (do_exit+0x244/0x918)
[<
c001cc28>] (do_exit) from [<
c001d344>] (do_group_exit+0x48/0xdc)
[<
c001d344>] (do_group_exit) from [<
c0029894>] (get_signal_to_deliver+0x2a0/0x5bc)
[<
c0029894>] (get_signal_to_deliver) from [<
c000b888>] (do_signal+0x78/0x3a0)
[<
c000b888>] (do_signal) from [<
c000bc54>] (do_work_pending+0xa4/0xb4)
[<
c000bc54>] (do_work_pending) from [<
c00096dc>] (work_pending+0xc/0x20)
---[ end trace
5faa75e8c2f8a6a2 ]---
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Mon, 7 Apr 2014 13:52:43 +0000 (10:52 -0300)]
upstream: [media] gpsca: remove the risk of a division by zero
As reported by Coverity, there's a potential risk of a division
by zero on some calls to jpeg_set_qual(), if quality is zero.
As quality can't be 0 or lower than that, adds an extra clause
to cover this special case.
Coverity reports: CID#
11922280, CID#
11922293, CID#
11922295
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Archit Taneja [Mon, 10 Mar 2014 06:24:01 +0000 (03:24 -0300)]
upstream: [media] v4l: ti-vpe: Set correct field parameter for output and capture buffers
The vpe driver wasn't setting the correct field parameter for dequed CAPTURE
type buffers for the case where the captured output is progressive.
Set the field to V4L2_FIELD_NONE for the completed destination buffers when
the captured output is progressive.
For OUTPUT type buffers, a queued buffer's field is forced to V4L2_FIELD_NONE
if the pixel format(configured through s_fmt for the buffer type
V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE specifies) the field type isn't interlaced.
If the pixel format specified was V4L2_FIELD_ALTERNATE, and the queued buffer's
field isn't V4L2_FIELD_TOP or V4L2_FIELD_BOTTOM, the vb2 buf_prepare op returns
an error.
This ensures compliance, and that the dequeued output and captured buffers
contain the field type that the driver used internally.
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Archit Taneja [Thu, 6 Mar 2014 10:07:47 +0000 (07:07 -0300)]
upstream: [media] v4l: ti-vpe: Use correct bus_info name for the device in querycap
The bus_info parameter in v4l2_capabilities expects a 'platform_' prefix. This
wasn't done in the driver and hence was breaking compliance. Update the bus_info
parameter accordingly.
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Archit Taneja [Wed, 5 Mar 2014 12:52:38 +0000 (09:52 -0300)]
upstream: [media] v4l: ti-vpe: report correct capabilities in querycap
querycap currently returns V4L2_CAP_VIDEO_M2M as a capability, this should be
V4L2_CAP_VIDEO_M2M_MPLANE instead, as the driver supports multiplanar formats.
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Archit Taneja [Wed, 12 Feb 2014 07:04:22 +0000 (04:04 -0300)]
upstream: [media] v4l: ti-vpe: Allow usage of smaller images
The minimum width and height for VPE input/output was kept as 128 pixels. VPE
doesn't have a constraint on the image height, it requires the image width to
be at least 16 bytes.
Change the minimum supported dimensions to 32x32. This allows us to de-interlace
qcif content. A smaller image size than 32x32 didn't make much sense, so stopped
at this.
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Archit Taneja [Tue, 18 Feb 2014 13:24:07 +0000 (10:24 -0300)]
upstream: [media] v4l: ti-vpe: Use video_device_release_empty
The video_device struct is currently embedded in the driver data struct vpe_dev.
A vpe_dev instance is allocated by the driver, and the memory for the vfd is a
part of this struct.
The v4l2 core, however, manages the removal of the vfd region, through the
video_device's .release() op, which currently is the helper
video_device_release. This causes memory corruption, and leads to issues when
we try to re-insert the vpe module.
Use the video_device_release_empty helper function instead.
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Archit Taneja [Wed, 15 Jan 2014 11:31:51 +0000 (08:31 -0300)]
upstream: [media] v4l: ti-vpe: Make sure in job_ready that we have the needed number of dst_bufs
VPE has a ctrl parameter which decides how many mem to mem transactions the
active job from the job queue can perform.
The driver's job_ready() made sure that the number of ready source buffers are
sufficient for the job to execute successfully. But it didn't make sure if
there are sufficient ready destination buffers in the capture queue for the
VPE output.
If the time taken by VPE to process a single frame is really slow, then it's
possible that we don't need to imply such a restriction on the dst queue, but
really fast transactions(small resolution, no de-interlacing) may cause us to
hit the condition where we don't have any free buffers for the VPE to write on.
Add the extra check in job_ready() to make sure we have the sufficient amount
of destination buffers.
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Malcolm Priestley [Tue, 25 Mar 2014 01:31:58 +0000 (22:31 -0300)]
upstream: [media] m88rs2000: fix sparse static warnings
fix the following warnings:
m88rs2000.c:300:16: warning: symbol 'm88rs2000_setup' was not declared. Should it be static?
m88rs2000.c:318:16: warning: symbol 'm88rs2000_shutdown' was not declared. Should it be static?
m88rs2000.c:328:16: warning: symbol 'fe_reset' was not declared. Should it be static?
m88rs2000.c:366:16: warning: symbol 'fe_trigger' was not declared. Should it be static?
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Benjamin Larsson [Mon, 17 Mar 2014 01:41:13 +0000 (22:41 -0300)]
upstream: [media] r820t: fix size and init values
Correct the initialization values at the start of the function
and use proper variable sizes to prevent overflow.
Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Sun, 6 Apr 2014 13:48:31 +0000 (10:48 -0300)]
upstream: [media] v4l2-common: fix warning when used on userpace
As reported by Linus, make headers_check is reporting:
usr/include/linux/v4l2-common.h:72: found __[us]{8,16,32,64} type without #include <linux/types.h>
which seems to have come in through commits
777f4f85b75f1 and
254a47770163f.
That happens because struct v4l2_edid should be visible by both
subdev and V4L2 APIs. So, it was moved to v4l2-common.h.
As Linus pointed, the proper fix is to just add an include for
linux/types.h at v4l2-common.h.
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Sat, 1 Feb 2014 20:28:21 +0000 (17:28 -0300)]
upstream: [media] m88ds3103: fix bug on .set_tone()
Band switching didn't worked always reliably as there was one
register bit set wrong.
Thanks to Robert Schlabbach for pointing this bug and solution.
Reported-by: Robert Schlabbach <Robert.Schlabbach@gmx.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Mon, 10 Feb 2014 08:52:54 +0000 (05:52 -0300)]
upstream: [media] si4713: fix Kconfig dependencies
The SI4713 select should be I2C_SI4713 and the USB driver needs to depend on
I2C as well.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Paul Bolle <pebolle@tiscali.nl>
Reported-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Arnd Bergmann [Sat, 15 Mar 2014 09:35:39 +0000 (06:35 -0300)]
upstream: [media] Sensoray 2255 uses videobuf2
commit
340a30c514 "s2255drv: upgrade to videobuf2" changed the API
used by the s2255 driver, but did not modify the Kconfig statement,
which can lead to build errors when no other driver already uses
VIDEOBUF2_VMALLOC. This patch does the necessary Kconfig change.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Aybuke Ozdemir [Wed, 19 Mar 2014 18:25:13 +0000 (20:25 +0200)]
upstream: staging/media/davinci_vpfe/vpfe_video.h Unnecessary space after function pointer name
Fix checkpatch.pl issues with Unnecessary space after function pointer
name in vpfe_video.h
Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aybuke Ozdemir [Wed, 19 Mar 2014 18:25:12 +0000 (20:25 +0200)]
upstream: staging/media/davinci_vpfe/vpfe_video.h Fix missing space after return type
Fix checkpatch.pl issues with
missing space after return type in /vpfe_video.h
Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aybuke Ozdemir [Wed, 19 Mar 2014 17:39:52 +0000 (19:39 +0200)]
upstream: staging: as102: as10x_handle.h .Fix Unnecessary space after function pointer name
This patch removes the following checkpatch.pl warning in as10x_handle.h
Warning : Unnecessary space after function pointer name
Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chi Pham [Sun, 9 Mar 2014 13:55:14 +0000 (14:55 +0100)]
upstream: staging:media: Removed assignments from if statements.
The following coccinelle script found the match:
@simple@
expression E1, E2;
statement S1, S2;
@@
+ E1 = E2;
if (
- (E1 = E2)
+ E1
)
S1 else S2
@left@
expression E0, E1, E2;
statement S0, S1;
@@
- if ((E1 = E2) < E0)
+ E1 = E2;
+ if (E1 < E0)
S1
Signed-off-by: Chi Pham <fempsci@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aybuke Ozdemir [Sat, 15 Mar 2014 17:10:16 +0000 (19:10 +0200)]
upstream: staging: go7007: go7007-v4l2.c Fix line over 80 characters.
Fix checkpatch.pl issues with line over
80 characters in go7007-v4l2.c
Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Kristina Martšenko [Fri, 14 Mar 2014 15:20:17 +0000 (17:20 +0200)]
upstream: staging: dt3155v4l: make q_ops static
Since q_ops is only referenced in dt3155v4l.c, mark it as static.
This removes the following sparse warning:
drivers/staging/media/dt3155v4l//dt3155v4l.c:302:22: warning: symbol 'q_ops' was not declared. Should it be static?
Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Andreea-Cristina Bernat [Mon, 17 Mar 2014 01:00:01 +0000 (18:00 -0700)]
upstream: Staging: solo6x10: Replace expressions that don't use ALIGN macro
There are some expressions that compute the roundup of a number, but don't use
the existing macro defined in /include/kernel.h. This patch uses the following
Coccinelle semantic patch:
@ haskernel @
@@
@ depends on haskernel @
expression E1, E2;
@@
- (E1 + (E2 - 1)) & ~(E2 - 1)
+ ALIGN(E1, E2)
Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Aybuke Ozdemir [Thu, 13 Mar 2014 00:20:20 +0000 (02:20 +0200)]
upstream: staging: solo6x10: solo6x10-v4l2-enc.c: Fix line over 80 characters.
Fix checkpatch.pl issues with line over 80 characters in solo6x10-v4l2-enc.c
Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Hans Verkuil [Fri, 14 Mar 2014 11:57:07 +0000 (08:57 -0300)]
upstream: [media] DocBook media: clarify v4l2_pix_format and v4l2_pix_format_mplane fields
Be more specific with regards to how some of these fields are interpreted.
In particular the height value and which fields can be set by the application.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
James Hogan [Thu, 13 Mar 2014 10:29:21 +0000 (07:29 -0300)]
upstream: [media] rc: img-ir: hw: Remove unnecessary semi-colon
Fix a coccicheck warning in img-ir driver:
drivers/media/rc/img-ir/img-ir-hw.c:500:2-3: Unneeded semicolon
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 14 Mar 2014 05:25:35 +0000 (02:25 -0300)]
upstream: [media] media: davinci: vpbe: fix build warning
this patch fixes following build warning
drivers/media/platform/davinci/vpbe_display.c: In function 'vpbe_start_streaming':
drivers/media/platform/davinci/vpbe_display.c:344: warning: unused variable 'vpbe_dev'
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Mon, 10 Mar 2014 18:18:55 +0000 (15:18 -0300)]
upstream: [media] rtl28xxu: depends on I2C_MUX
We need depend on I2C_MUX as rtl2832 demod used requires it.
All error/warnings:
warning: (DVB_USB_RTL28XXU) selects DVB_RTL2832 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CORE && I2C && I2C_MUX)
ERROR: "i2c_add_mux_adapter" [drivers/media/dvb-frontends/rtl2832.ko] undefined!
ERROR: "i2c_del_mux_adapter" [drivers/media/dvb-frontends/rtl2832.ko] undefined!
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Sun, 13 Oct 2013 02:35:35 +0000 (23:35 -0300)]
upstream: [media] rtl28xxu: constify demod config structs
Optimize a little bit from data to text.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Fri, 7 Feb 2014 05:55:57 +0000 (02:55 -0300)]
upstream: [media] e4000: implement PLL lock v4l control
Implement PLL lock control to get PLL lock flag status from tuner
synthesizer.
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Mon, 27 Jan 2014 06:13:19 +0000 (03:13 -0300)]
upstream: [media] e4000: fix PLL calc to allow higher frequencies
There was 32-bit overflow on VCO frequency calculation which blocks
tuning to 1073 - 1104 MHz. Use 64 bit number in order to avoid VCO
frequency overflow.
After that fix device in question tunes to following range:
60 - 1104 MHz
1250 - 2207 MHz
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Mon, 27 Jan 2014 00:02:53 +0000 (21:02 -0300)]
upstream: [media] e4000: implement controls via v4l2 control framework
Implement gain and bandwidth controls using v4l2 control framework.
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Tue, 15 Oct 2013 22:22:45 +0000 (19:22 -0300)]
upstream: [media] e4000: convert DVB tuner to I2C driver model
Driver conversion from proprietary DVB tuner model to more
general I2C driver model.
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Andreea-Cristina Bernat [Wed, 12 Mar 2014 20:50:01 +0000 (22:50 +0200)]
upstream: staging: lirc: Add fallthrough comment
This patch adds fallthrough comments for the cases not preceded by
break or fallthrough comment
Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Andreea-Cristina Bernat [Tue, 11 Mar 2014 16:46:07 +0000 (18:46 +0200)]
upstream: staging/media/solo6x10: Fix coding-style error
This patch fixes the error "space required after that ';'" for
the file /drivers/staging/media/solo6x10/solo6x10-tx28.c
Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Kees Cook [Tue, 11 Mar 2014 20:25:53 +0000 (17:25 -0300)]
upstream: [media] media: rc-core: use %s in rc_map_get() module load
rc_map_get() takes a single string literal for the module to load,
so make sure it cannot be used as a format string in the call to
request_module().
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Sun, 23 Feb 2014 23:12:46 +0000 (20:12 -0300)]
upstream: [media] DocBook: fix incorrect code example
The code said for (i = 0; i > 30; ++i) instead of i < 30.
Fix this and clean it up a bit at the same time.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Fri, 7 Feb 2014 05:46:16 +0000 (02:46 -0300)]
upstream: [media] v4l: add control for RF tuner PLL lock flag
Add volatile boolean control to indicate if tuner frequency synthesizer
is locked to requested frequency. That means tuner is able to receive
given frequency. Control is named as "PLL lock", since frequency
synthesizers are based of phase-locked-loop. Maybe more general name
could be wise still?
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Fri, 7 Feb 2014 06:55:32 +0000 (03:55 -0300)]
upstream: [media] DocBook: media: document PLL lock control
Document PLL lock V4L2 control. It is read only RF tuner control
which is used to inform if tuner is receiving frequency or not.
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Wed, 5 Feb 2014 05:24:35 +0000 (02:24 -0300)]
upstream: [media] v4l: add enum_freq_bands support to tuner sub-device
Add VIDIOC_ENUM_FREQ_BANDS, enumerate supported frequency bands,
IOCTL support for sub-device tuners too.
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Wed, 5 Feb 2014 02:55:25 +0000 (23:55 -0300)]
upstream: [media] v4l: uapi: add SDR formats CU8 and CU16LE
V4L2_SDR_FMT_CU8 — Complex unsigned 8-bit IQ sample
V4L2_SDR_FMT_CU16LE — Complex unsigned 16-bit little endian IQ sample
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Wed, 26 Feb 2014 23:30:35 +0000 (20:30 -0300)]
upstream: [media] DocBook: media: add some general info about RF tuners
Add some info what is RF tuner in context of V4L RF tuner class.
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Wed, 5 Feb 2014 01:13:44 +0000 (22:13 -0300)]
upstream: [media] v4l: reorganize RF tuner control ID numbers
It appears that controls are ordered by ID number when enumerating.
That could lead illogical UI as controls are usually enumerated and
drawn by the application at runtime.
Change order of controls by reorganizing assigned IDs now as we can.
It is not reasonable possible after the API is released. Also, leave
some spare space between IDs too for possible future extensions.
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Sat, 1 Feb 2014 02:36:13 +0000 (23:36 -0300)]
upstream: [media] v4l: add RF tuner channel bandwidth control
Modern silicon RF tuners has one or more adjustable filters on
signal path, in order to filter noise from desired radio channel.
Add channel bandwidth control to tell the driver which is radio
channel width we want receive. Filters could be then adjusted by
the driver or hardware, using RF frequency and channel bandwidth
as a base of filter calculations.
On automatic mode (normal mode), bandwidth is calculated from sampling
rate or tuning info got from userspace. That new control gives
possibility to set manual mode and let user have more control for
filters.
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Wed, 12 Mar 2014 17:53:39 +0000 (14:53 -0300)]
upstream: [media] v4l: define unit for V4L2_CID_RF_TUNER_BANDWIDTH
Use Hertz as a unit for radio channel bandwidth.
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Wed, 5 Feb 2014 02:15:22 +0000 (23:15 -0300)]
upstream: [media] DocBook: document RF tuner bandwidth controls
Add documentation for RF tuner bandwidth controls. These controls are
used to set filters on tuner signal path.
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Masanari Iida [Wed, 12 Mar 2014 15:57:22 +0000 (12:57 -0300)]
upstream: [media] DocBook: Fix typo in xml and template file
Fix spelling typo under Documentation/DocBook/media.
It is because these files are NOT generated by "make htmldocs",
I have to fix the files.
[m.chehab@samsung.com: fix a merge conflict]
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Laurent Pinchart [Thu, 6 Feb 2014 17:42:31 +0000 (14:42 -0300)]
upstream: [media] v4l: vsp1: Update copyright notice
The "Renesas Corporation" listed in the copyright notice doesn't exist.
Replace it with "Renesas Electronics Corporation" and update the
copyright years.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Ole Ernst [Wed, 5 Mar 2014 17:08:15 +0000 (14:08 -0300)]
upstream: [media] dvb_frontend: Fix possible read out of bounds
Check if index is within bounds _before_ accessing the value.
Signed-off-by: Ole Ernst <olebowle@gmx.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Sat, 1 Feb 2014 15:58:28 +0000 (12:58 -0300)]
upstream: [media] m88ds3103: possible uninitialized scalar variable
It was possible that tuner_frequency variable, used for carrier offset
compensation, was uninitialized. That happens when tuner
.get_frequency() callback is not defined.
Currently that case is not possible as only used tuner has this callback.
Coverity CID 1166057: Uninitialized scalar variable (UNINIT)
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Sat, 1 Feb 2014 15:30:28 +0000 (12:30 -0300)]
upstream: [media] m88ds3103: remove dead code 2nd part
Coverity CID 1166051: Logically dead code (DEADCODE)
TS clock calculation could be more accurate, but as it is not,
remove those unused clock speeds.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Dan Carpenter [Sat, 1 Mar 2014 13:55:29 +0000 (10:55 -0300)]
upstream: [media] ddbridge: remove unneeded an NULL check
Static checkers complain about the inconsistent NULL check here.
There is an unchecked dereference of "input->fe" in the call to
tuner_attach_tda18271() and there is a second unchecked dereference a
couple lines later when we do:
input->fe2->tuner_priv = input->fe->tuner_priv;
But actually "intput->fe" can't be NULL because if demod_attach_drxk()
fails to allocate it, then we would have return an error code.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Dan Carpenter [Sat, 1 Mar 2014 13:51:36 +0000 (10:51 -0300)]
upstream: [media] av7110_hw: fix a sanity check in av7110_fw_cmd()
ARRAY_SIZE(buf) (8 elements) was intended instead of sizeof(buf) (16
bytes). But this is just a sanity check and the callers always pass
valid values so this doesn't cause a problem.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
James Hogan [Fri, 28 Feb 2014 23:28:54 +0000 (20:28 -0300)]
upstream: [media] rc: img-ir: add hardware decoder driver
Add remote control input driver for the ImgTec Infrared block hardware
decoder, which is set up with timings for a specific protocol and
supports mask/value filtering and wake events.
The hardware decoder timing values, raw data to scan code conversion
function and scan code filter to raw data filter conversion function
will be provided in separate files for each protocol which this part of
the driver can use. The new generic scan code filter interface is made
use of to reduce interrupts and control wake events.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
James Hogan [Fri, 28 Feb 2014 23:28:53 +0000 (20:28 -0300)]
upstream: [media] rc: img-ir: add raw driver
Add raw IR remote control input driver for the ImgTec Infrared decoder
block's raw edge interrupts. Generic software protocol decoders are used
to allow multiple protocols to be supported at a time, including those
not supported by the hardware decoder.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Seppälä [Sun, 16 Feb 2014 10:16:02 +0000 (07:16 -0300)]
upstream: [media] nuvoton-cir: Activate PNP device when probing
On certain motherboards (mainly Intel NUC series) bios keeps the
Nuvoton CIR device disabled at boot.
This patch adds a call to kernel PNP layer to activate the device if it
is not already activated. This will improve the chances of the PNP probe
actually succeeding on Intel NUC platforms.
Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
Cc: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Satoshi Nagahama [Mon, 10 Feb 2014 09:45:29 +0000 (06:45 -0300)]
upstream: [media] Siano: smsusb - Add a device id for PX-S1UD
Add a device id to support for PX-S1UD (PLEX ISDB-T usb dongle) which
has sms2270.
Signed-off-by: Satoshi Nagahama <sattnag@aim.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Mon, 10 Mar 2014 13:58:29 +0000 (10:58 -0300)]
upstream: [media] mem2mem_testdev: improve field handling
try_fmt should just set field to NONE and not return an error if
a different field was passed.
buf_prepare should check if the field passed in from userspace has a
supported field value. At the moment only NONE is supported and ANY
is mapped to NONE.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Mon, 10 Mar 2014 13:58:26 +0000 (10:58 -0300)]
upstream: [media] mem2mem_testdev: add USERPTR support
There is no reason why we shouldn't enable this here.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Mon, 10 Mar 2014 13:58:25 +0000 (10:58 -0300)]
upstream: [media] mem2mem_testdev: set priv to 0
v4l2_compliance fix.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Mon, 10 Mar 2014 13:58:24 +0000 (10:58 -0300)]
upstream: [media] mem2mem_testdev: pick default format with try_fmt
This resolves an issue raised by v4l2-compliance: if the given format does
not exist, then pick a default format.
While there is an exception regarding this for TV capture drivers, this
m2m driver should do the right thing.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Mon, 10 Mar 2014 13:58:23 +0000 (10:58 -0300)]
upstream: [media] mem2mem_testdev: use 40ms default transfer time
The default of 1 second is a bit painful, switch to a 25 Hz framerate.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lars-Peter Clausen [Mon, 10 Mar 2014 17:05:39 +0000 (14:05 -0300)]
upstream: [media] adv7180: Add support for power down
The adv7180 has a low power mode in which the analog and the digital processing
section are shut down. Implement the s_power callback to let bridge drivers put
the part into low power mode when not needed.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lars-Peter Clausen [Fri, 7 Mar 2014 16:14:32 +0000 (13:14 -0300)]
upstream: [media] adv7180: Add support for async device registration
Add support for async device registration to the adv7180 driver.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lars-Peter Clausen [Fri, 7 Mar 2014 16:14:31 +0000 (13:14 -0300)]
upstream: [media] adv7180: Use threaded IRQ instead of IRQ + workqueue
The proper way to handle IRQs that need to be able to sleep in their IRQ handler
is to use a threaded IRQ.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lars-Peter Clausen [Fri, 7 Mar 2014 16:14:30 +0000 (13:14 -0300)]
upstream: [media] adv7180: Remove duplicated probe error message
The device driver core already prints out a very similar message when a driver
fails to probe. No need to print one in the driver itself.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lars-Peter Clausen [Fri, 7 Mar 2014 16:14:29 +0000 (13:14 -0300)]
upstream: [media] adv7180: Remove unnecessary v4l2_device_unregister_subdev() from probe error path
The device can't possibly be registered at this point, so no need to to call
v4l2_device_unregister_subdev().
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lars-Peter Clausen [Fri, 7 Mar 2014 16:14:28 +0000 (13:14 -0300)]
upstream: [media] adv7180: Free control handler on remove()
Make sure to free the control handler when the device is removed.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lars-Peter Clausen [Fri, 7 Mar 2014 16:14:27 +0000 (13:14 -0300)]
upstream: [media] adv7180: Fix remove order
The mutex is used in the subdev callbacks, so unregister the subdev before the
mutex is destroyed.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Fri, 7 Mar 2014 10:18:37 +0000 (07:18 -0300)]
upstream: [media] v4l2: add VIDIOC_G/S_EDID support to the v4l2 core
Support this ioctl as part of the v4l2 core. Use the new ioctl
name and struct v4l2_edid type in the existing core code.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Tue, 4 Mar 2014 10:46:47 +0000 (07:46 -0300)]
upstream: [media] v4l2: allow v4l2_subdev_edid to be used with video nodes
Struct v4l2_subdev_edid and the VIDIOC_SUBDEV_G/S_EDID ioctls were
specific for subdevices, but for hardware with a simple video pipeline
you do not need/want to create subdevice nodes to just get/set the EDID.
Move the v4l2_subdev_edid struct to v4l2-common.h and rename as
v4l2_edid. Add the same ioctls to videodev2.h as well, thus allowing
this API to be used with both video nodes and v4l-subdev nodes.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Daniel Jeong [Mon, 3 Mar 2014 09:52:08 +0000 (06:52 -0300)]
upstream: [media] v4l2-controls.h: Add addtional Flash fault bits
Three Flash fault are added. V4L2_FLASH_FAULT_UNDER_VOLTAGE for the case low
voltage below the min. limit. V4L2_FLASH_FAULT_INPUT_VOLTAGE for the case
falling input voltage and chip adjust flash current not occur under voltage
event. V4L2_FLASH_FAULT_LED_OVER_TEMPERATURE for the case the temperature
exceed the maximun limit
Signed-off-by: Daniel Jeong <gshark.jeong@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
sensoray-dev [Fri, 28 Feb 2014 22:19:44 +0000 (19:19 -0300)]
upstream: [media] s2255drv: memory leak fix
Fixes memory leak introduced by
commit
47d8c881c304642a68d398b87d9e8846e643c81a.
Signed-off-by: Dean Anderson <linux-dev@sensoray.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Philipp Zabel [Thu, 27 Feb 2014 16:44:48 +0000 (13:44 -0300)]
upstream: [media] tvp5150: Make debug module parameter visible in sysfs
Set permissions on the debug module parameter to make it appear in sysfs.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Philipp Zabel [Thu, 27 Feb 2014 16:44:47 +0000 (13:44 -0300)]
upstream: [media] tvp5150: Fix type mismatch warning in clamp macro
This patch fixes the following warning:
drivers/media/i2c/tvp5150.c: In function '__tvp5150_try_crop':
include/linux/kernel.h:762:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
(void) (&__val == &__min); \
^
drivers/media/i2c/tvp5150.c:886:16: note: in expansion of macro 'clamp'
rect->width = clamp(rect->width,
^
include/linux/kernel.h:763:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
(void) (&__val == &__max); \
^
drivers/media/i2c/tvp5150.c:886:16: note: in expansion of macro 'clamp'
rect->width = clamp(rect->width,
^
include/linux/kernel.h:762:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
(void) (&__val == &__min); \
^
drivers/media/i2c/tvp5150.c:904:17: note: in expansion of macro 'clamp'
rect->height = clamp(rect->height,
^
include/linux/kernel.h:763:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
(void) (&__val == &__max); \
^
drivers/media/i2c/tvp5150.c:904:17: note: in expansion of macro 'clamp'
rect->height = clamp(rect->height,
^
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Sun, 2 Mar 2014 09:43:12 +0000 (06:43 -0300)]
upstream: [media] media DocBook: fix NV16M description
The NV16M description contained some copy-and-paste text from NV12M,
suggesting that this format is a 4:2:0 format when it really is a
4:2:2 format.
Fixed the text.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Arnd Bergmann [Wed, 26 Feb 2014 11:01:48 +0000 (08:01 -0300)]
upstream: [media] arv: fix sleep_on race
interruptible_sleep_on is racy and going away. In the arv driver that
race has probably never caused problems since it would require a whole
video frame to be captured before the read function has a chance to
go to sleep, but using wait_event_interruptible lets us kill off the
old interface. In order to do this, we have to slightly adapt the
meaning of the ar->start_capture field to distinguish between not having
started a frame and having completed it.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Geert Uytterhoeven [Fri, 21 Feb 2014 19:57:17 +0000 (16:57 -0300)]
upstream: [media] v4l: VIDEO_SH_VOU should depend on HAS_DMA
If NO_DMA=y:
warning: (VIDEO_DM6446_CCDC && VIDEO_DM355_CCDC && VIDEO_DM365_ISIF && VIDEO_OMAP2_VOUT && VIDEO_SH_VOU && VIDEO_VIU && VIDEO_TIMBERDALE && VIDEO_MX1 && VIDEO_OMAP1) selects VIDEOBUF_DMA_CONTIG which has unmet direct dependencies (MEDIA_SUPPORT && HAS_DMA)
drivers/built-in.o: In function `videobuf_vm_close':
videobuf-dma-contig.c:(.text+0x407aa0): undefined reference to `videobuf_queue_cancel'
drivers/built-in.o: In function `__videobuf_dc_alloc':
videobuf-dma-contig.c:(.text+0x407ba2): undefined reference to `dma_alloc_coherent'
drivers/built-in.o: In function `__videobuf_mmap_mapper':
videobuf-dma-contig.c:(.text+0x407d44): undefined reference to `dma_free_coherent'
drivers/built-in.o: In function `free_buffer':
sh_vou.c:(.text+0x41f73a): undefined reference to `videobuf_waiton'
drivers/built-in.o: In function `sh_vou_poll':
sh_vou.c:(.text+0x41f884): undefined reference to `videobuf_poll_stream'
drivers/built-in.o: In function `sh_vou_buf_prepare':
sh_vou.c:(.text+0x41fdf6): undefined reference to `videobuf_iolock'
drivers/built-in.o: In function `sh_vou_reqbufs':
sh_vou.c:(.text+0x4203b0): undefined reference to `videobuf_reqbufs'
drivers/built-in.o: In function `sh_vou_querybuf':
sh_vou.c:(.text+0x42040a): undefined reference to `videobuf_querybuf'
drivers/built-in.o: In function `sh_vou_qbuf':
sh_vou.c:(.text+0x42045e): undefined reference to `videobuf_qbuf'
drivers/built-in.o: In function `sh_vou_dqbuf':
sh_vou.c:(.text+0x4204c2): undefined reference to `videobuf_dqbuf'
drivers/built-in.o: In function `sh_vou_streamon':
sh_vou.c:(.text+0x420572): undefined reference to `videobuf_streamon'
drivers/built-in.o: In function `sh_vou_streamoff':
sh_vou.c:(.text+0x4205d2): undefined reference to `videobuf_streamoff'
drivers/built-in.o: In function `sh_vou_mmap':
sh_vou.c:(.text+0x420c46): undefined reference to `videobuf_mmap_mapper'
VIDEO_SH_VOU selects VIDEOBUF_DMA_CONTIG, which bypasses its dependency on
HAS_DMA. Make VIDEO_SH_VOU depend on HAS_DMA to fix this.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Fri, 21 Feb 2014 09:16:32 +0000 (06:16 -0300)]
upstream: [media] v4l2-ctrls: replace BUG_ON by WARN_ON
BUG_ON is unnecessarily strict.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Dave Jones [Thu, 5 Sep 2013 02:51:48 +0000 (23:51 -0300)]
upstream: [media] drx-d: add missing braces in drxd_hard.c:DRXD_init
No functional changes, but removes a duplicate check, if
!state->type_A.
Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Fri, 28 Feb 2014 16:30:48 +0000 (13:30 -0300)]
upstream: [media] vb2: call buf_finish after the state check
Don't call buf_finish unless we know that the buffer is in a valid state.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Tue, 25 Feb 2014 12:42:45 +0000 (09:42 -0300)]
upstream: [media] vb2: fix streamoff handling if streamon wasn't called
If you request buffers, then queue buffers and then call STREAMOFF
those buffers are not returned to their dequeued state because streamoff
will just return if q->streaming was 0.
This means that afterwards you can never QBUF that same buffer again unless
you do STREAMON, REQBUFS or close the filehandle first.
It is clear that if you do STREAMOFF even if no STREAMON was called before,
you still want to have all buffers returned to their proper dequeued state.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Mon, 3 Feb 2014 14:22:45 +0000 (11:22 -0300)]
upstream: [media] vb2: replace BUG by WARN_ON
No need to oops for this, WARN_ON is good enough.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Mon, 24 Feb 2014 16:41:20 +0000 (13:41 -0300)]
upstream: [media] vb2: don't init the list if there are still buffers
__vb2_queue_free() would init the queued_list at all times, even if
q->num_buffers > 0. This should only happen if num_buffers == 0.
This situation can happen if a CREATE_BUFFERS call couldn't allocate
enough buffers and had to free those it did manage to allocate before
returning an error.
While we're at it: __vb2_queue_alloc() returns the number of buffers
allocated, not an error code. So stick the result in allocated_buffers
instead of ret as that's very confusing.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Thu, 6 Feb 2014 08:46:11 +0000 (05:46 -0300)]
upstream: [media] vb2: rename queued_count to owned_by_drv_count
'queued_count' is a bit vague since it is not clear to which queue it
refers to: the vb2 internal list of buffers or the driver-owned list
of buffers.
Rename to make it explicit.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Wed, 29 Jan 2014 16:36:53 +0000 (13:36 -0300)]
upstream: [media] vb2: fix buf_init/buf_cleanup call sequences
Ensure that these ops are properly balanced.
There are two scenarios:
1) for MMAP buf_init is called when the buffers are created and buf_cleanup
must be called when the queue is finally freed. This scenario was always
working.
2) for USERPTR and DMABUF it is more complicated. When a buffer is queued
the code checks if all planes of this buffer have been acquired before.
If that's the case, then only buf_prepare has to be called. Otherwise
buf_cleanup needs to be called if the buffer was acquired before, then,
once all changed planes have been (re)acquired, buf_init has to be
called followed by buf_prepare. Should buf_prepare fail, then buf_cleanup
must be called on the newly acquired planes to release them in.
Finally, in __vb2_queue_free we have to check if the buffer was actually
acquired before calling buf_cleanup. While that it always true for MMAP
mode, it is not necessarily true for the other modes. E.g. if you just
call REQBUFS and close the file handle, then buffers were never queued and
so no buf_init was ever called.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>