deliverable/linux.git
9 years ago[media] coda: Add tracing support
Philipp Zabel [Thu, 29 Jan 2015 17:36:00 +0000 (14:36 -0300)] 
[media] coda: Add tracing support

This patch adds tracepoints to the coda driver that can be used together
with the v4l2:v4l2_qbuf and v4l2:v4l2_dqbuf tracepoints to to follow video
frames through the mem2mem device.

For encoding with the BIT processor:
    coda:coda_enc_pic_run
    coda:coda_enc_pic_done

For decoding with the BIT processor:
    coda:coda_bit_queue
    coda:coda_dec_pic_run
    coda:coda_dec_pic_done
    coda:coda_dec_rot_done

Additionally, two low level tracepoints register whenever the BIT processor
is started and returns:
    coda:coda_bit_run
    coda:coda_bit_done

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] coda: drop dma_sync_single_for_device in coda_bitstream_queue
Philipp Zabel [Wed, 25 Mar 2015 16:45:09 +0000 (13:45 -0300)] 
[media] coda: drop dma_sync_single_for_device in coda_bitstream_queue

Issuing a cache flush for the whole bitstream buffer is not optimal in the first
place when only a part of it was written. But given that the buffer is mapped in
writecombine mode, it is not needed at all.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Ian Molton <imolton@ad-holdings.co.uk>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] coda: fix fill bitstream errors in nonstreaming case
Philipp Zabel [Tue, 24 Mar 2015 17:30:57 +0000 (14:30 -0300)] 
[media] coda: fix fill bitstream errors in nonstreaming case

When queueing a buffer into the bitstream fails, it has to be requeued
in the videobuf2 queue before streaming starts, but while streaming it
should be returned to userspace with an error.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] coda: call SEQ_END when the first queue is stopped
Philipp Zabel [Tue, 24 Mar 2015 17:30:56 +0000 (14:30 -0300)] 
[media] coda: call SEQ_END when the first queue is stopped

This allows to stop and restart the output queue to start a new sequence
while keeping the capture queue running. Before, sequence end would only
be issued if both output and capture queue were stopped and the sequence
start issued when reenabling the output queue would fail.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] coda: fail to start streaming if userspace set invalid formats
Philipp Zabel [Tue, 24 Mar 2015 17:30:55 +0000 (14:30 -0300)] 
[media] coda: fail to start streaming if userspace set invalid formats

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] coda: remove duplicate error messages for buffer allocations
Philipp Zabel [Tue, 24 Mar 2015 17:30:54 +0000 (14:30 -0300)] 
[media] coda: remove duplicate error messages for buffer allocations

coda_alloc_aux_buf already prints an error, no need to print duplicate
error messages all over the place.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] coda: move parameter buffer in together with context buffer allocation
Philipp Zabel [Tue, 24 Mar 2015 17:30:53 +0000 (14:30 -0300)] 
[media] coda: move parameter buffer in together with context buffer allocation

The parameter buffer is a per-context buffer, so we can allocate and free it
together with the other context buffers during REQBUFS.
Since this was the last context buffer allocated in coda-common.c, we can now
move coda_alloc_context_buf into coda-bit.c.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] coda: allocate bitstream buffer from REQBUFS, size depends on the format
Philipp Zabel [Tue, 24 Mar 2015 17:30:52 +0000 (14:30 -0300)] 
[media] coda: allocate bitstream buffer from REQBUFS, size depends on the format

Allocating the bitstream buffer only when the format is set allows to guarantee
that at least two frames fit into the bitstream buffer. For small frame sizes
a smaller bitstream buffer can be allocated. Since the bitstream buffer size now
depends on the format, replace CODA_MAX_FRAME_SIZE with ctx->bitstream.size
where appropriate and remove the now unused constant.
Since REQBUFS can be called multiple times, but the format can't be changed
unless REQBUFS 0 was called before, we can just keep the allocated context and
bitstream buffers if REQBUFS is called multiple times with a non-zero buffer
count.

[fixed a resource leak preventing repeatedly decoding]

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] coda: allocate per-context buffers from REQBUFS
Philipp Zabel [Tue, 24 Mar 2015 17:30:51 +0000 (14:30 -0300)] 
[media] coda: allocate per-context buffers from REQBUFS

Allocate the per-context buffers from REQBUFS instead in start_encoding or
start_decoding. This allows to stop and start streaming independently of
buffer (re)allocation

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] coda: use strlcpy instead of snprintf
Philipp Zabel [Tue, 24 Mar 2015 17:30:50 +0000 (14:30 -0300)] 
[media] coda: use strlcpy instead of snprintf

There is no need to take the detour through a "%s" format string
to create a copy of a string.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] coda: bitstream payload is unsigned
Philipp Zabel [Tue, 24 Mar 2015 17:30:49 +0000 (14:30 -0300)] 
[media] coda: bitstream payload is unsigned

kfifo_len is unsigned int, return it as such.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] coda: fix double call to debugfs_remove
Peter Seiderer [Tue, 24 Mar 2015 17:30:48 +0000 (14:30 -0300)] 
[media] coda: fix double call to debugfs_remove

In coda_free_aux_buf() call debugfs_remove only if buffer entry
is valid (and therfore dentry is valid), double protect by
invalidating dentry value.

Fixes erroneous prematurely dealloc of debugfs caused by
incorrect reference count incrementing.

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] coda: check kasprintf return value in coda_open
Peter Seiderer [Tue, 24 Mar 2015 17:30:47 +0000 (14:30 -0300)] 
[media] coda: check kasprintf return value in coda_open

kasprintf might fail if free memory is low.

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] coda: bitrate can only be set in kbps steps
Philipp Zabel [Wed, 18 Mar 2015 11:15:36 +0000 (08:15 -0300)] 
[media] coda: bitrate can only be set in kbps steps

We divide the bitrate by 1000 before writing it to the register.
Communicate to userspace that the bitrate granularity is kbps.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l2-mem2mem: no need to initialize b in v4l2_m2m_next_buf and v4l2_m2m_buf_r...
Philipp Zabel [Wed, 11 Mar 2015 15:57:50 +0000 (12:57 -0300)] 
[media] v4l2-mem2mem: no need to initialize b in v4l2_m2m_next_buf and v4l2_m2m_buf_remove

The first time b is used, it is assigned to the first element of the rdy_queue
list. There is no need to set it to NULL before.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] s5p-mfc: set allow_zero_bytesused flag for vb2_queue_init
Kamil Debski [Mon, 23 Feb 2015 12:26:19 +0000 (09:26 -0300)] 
[media] s5p-mfc: set allow_zero_bytesused flag for vb2_queue_init

The s5p-mfc driver interprets a buffer with bytesused equal to 0 as a
special case indicating end-of-stream. After vb2: fix bytesused == 0
handling (8a75ffb) patch videobuf2 modified the value of bytesused if it
was 0. The allow_zero_bytesused flag was added to videobuf2 to keep
backward compatibility.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] coda: set allow_zero_bytesused flag for vb2_queue_init
Kamil Debski [Mon, 23 Feb 2015 12:26:18 +0000 (09:26 -0300)] 
[media] coda: set allow_zero_bytesused flag for vb2_queue_init

The coda driver interprets a buffer with bytesused equal to 0 as a special
case indicating end-of-stream. After vb2: fix bytesused == 0 handling
(8a75ffb) patch videobuf2 modified the value of bytesused if it was 0.
The allow_zero_bytesused flag was added to videobuf2 to keep
backward compatibility.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vb2: add allow_zero_bytesused flag to the vb2_queue struct
Kamil Debski [Mon, 23 Feb 2015 12:26:17 +0000 (09:26 -0300)] 
[media] vb2: add allow_zero_bytesused flag to the vb2_queue struct

The vb2: fix bytesused == 0 handling (8a75ffb) patch changed the behavior
of __fill_vb2_buffer function, so that if bytesused is 0 it is set to the
size of the buffer. However, bytesused set to 0 is used by older codec
drivers as as indication used to mark the end of stream.

To keep backward compatibility, this patch adds a flag passed to the
vb2_queue_init function - allow_zero_bytesused. If the flag is set upon
initialization of the queue, the videobuf2 keeps the value of bytesused
intact in the OUTPUT queue and passes it to the driver.

Reported-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vb2: split the io_flags member of vb2_queue into a bit field
Kamil Debski [Mon, 23 Feb 2015 12:26:16 +0000 (09:26 -0300)] 
[media] vb2: split the io_flags member of vb2_queue into a bit field

This patch splits the io_flags member of vb2_queue into a bit field.
Instead of an enum with flags separate bit fields were introduced.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years agoRevert "[media] Add device tree support to adp1653 flash driver"
Mauro Carvalho Chehab [Thu, 9 Apr 2015 10:33:45 +0000 (07:33 -0300)] 
Revert "[media] Add device tree support to adp1653 flash driver"

As requested by Sakari:

"The driver changes are still being reviewed.
 It's been proposed that the max-microamp property be renamed."

So, as the DT bindings are not agreed upstream yet, let's revert
it.

Requested-by: Sakari Ailus <sakari.ailus@iki.fi>
This reverts commit b6100f10bdc2019a65297d2597c388de2f7dd653.

9 years ago[media] Add device tree support to adp1653 flash driver
Pavel Machek [Fri, 13 Mar 2015 20:48:40 +0000 (17:48 -0300)] 
[media] Add device tree support to adp1653 flash driver

Nokia N900 is switching to device tree, make sure we can use flash
there, too.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] WinFast DTV2000 DS Plus
Christian Dale [Mon, 9 Mar 2015 05:19:01 +0000 (02:19 -0300)] 
[media] WinFast DTV2000 DS Plus

Add Leadtek WinFast DTV2000DS Plus device based on Realtek RTL2832U.

I have not tested the remote, but it is the Y04G0051 model.

Signed-off-by: Christian Dale <kernel@techmunk.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years agodvb-frontends: use IS_REACHABLE() instead of IS_ENABLED()
Mauro Carvalho Chehab [Wed, 8 Apr 2015 18:04:35 +0000 (15:04 -0300)] 
dvb-frontends: use IS_REACHABLE() instead of IS_ENABLED()

Changeset 9b174527e7b7 added this new macro, ensuring that it
is true only if the function is actually reachable.

However, newer drivers were added since when it was written.
So, change those drivers to also use it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] Add and use IS_REACHABLE macro
Arnd Bergmann [Wed, 18 Feb 2015 17:12:42 +0000 (14:12 -0300)] 
[media] Add and use IS_REACHABLE macro

In the media drivers, the v4l2 core knows about all submodules
and calls into them from a common function. However this cannot
work if the modules that get called are loadable and the
core is built-in. In that case we get

drivers/built-in.o: In function `set_type':
drivers/media/v4l2-core/tuner-core.c:301: undefined reference to `tea5767_attach'
drivers/media/v4l2-core/tuner-core.c:307: undefined reference to `tea5761_attach'
drivers/media/v4l2-core/tuner-core.c:349: undefined reference to `tda9887_attach'
drivers/media/v4l2-core/tuner-core.c:405: undefined reference to `xc4000_attach'

This was working previously, until the IS_ENABLED() macro was used
to replace the construct like

 #if defined(CONFIG_DVB_CX24110) || (defined(CONFIG_DVB_CX24110_MODULE) && defined(MODULE))

with the difference that the new code no longer checks whether it is being
built as a loadable module itself.

To fix this, this new patch adds an 'IS_REACHABLE' macro, which evaluates
true in exactly the condition that was used previously. The downside
of this is that this trades an obvious link error for a more subtle
runtime failure, but it is clear that the change that introduced the
link error was unintentional and it seems better to revert it for
now. Also, a similar change was originally created by Trent Piepho
and then reverted by teh change to the IS_ENABLED macro.

Ideally Kconfig would be used to avoid the case of a broken dependency,
or the code restructured in a way to turn around the dependency, but either
way would require much larger changes here.

Fixes: 7b34be71db53 ("[media] use IS_ENABLED() macro")
See-also: c5dec9fb248e ("V4L/DVB (4751): Fix DBV_FE_CUSTOMISE for card drivers compiled into kernel")

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2168: tda10071: m88ds3103: Fix trivial typos
Yannick Guerrini [Thu, 26 Feb 2015 10:13:06 +0000 (07:13 -0300)] 
[media] si2168: tda10071: m88ds3103: Fix trivial typos

Change 'firmare' to 'firmware'

Signed-off-by: Yannick Guerrini <yguerrini@tomshardware.fr>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] xc5000: fix memory corruption when unplugging device
Devin Heitmueller [Tue, 23 Sep 2014 00:30:46 +0000 (21:30 -0300)] 
[media] xc5000: fix memory corruption when unplugging device

This patch addresses a regression introduced in the following patch:

commit 5264a522a597032c009f9143686ebf0fa4e244fb
Author: Shuah Khan <shuahkh@osg.samsung.com>
    [media] media: tuner xc5000 - release firmwware from xc5000_release()

The "priv" struct is actually reference counted, so the xc5000_release()
function gets called multiple times for hybrid devices.  Because
release_firmware() was always being called, it would work fine as expected
on the first call but then the second call would corrupt aribtrary memory.

Set the pointer to NULL after releasing so that we don't call
release_firmware() twice.

This problem was detected in the HVR-950q where plugging/unplugging the
device multiple times would intermittently show panics in completely
unrelated areas of the kernel.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years agoRevert "[media] v4l: vb2-memops: use vma slab when vma allocation"
Mauro Carvalho Chehab [Wed, 8 Apr 2015 16:16:57 +0000 (13:16 -0300)] 
Revert "[media] v4l: vb2-memops: use vma slab when vma allocation"

Please revert this patch: vm_area_cachep is not exported, so you cannot use
this in a module.

This reverts commit 5ed1c328ea077d70e1ebcd5188dc77cdc754df3a.

Reported-by: Hans Verkuil <hverkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: add support for Turbo-X DTT2000
Dimitris Lampridis [Sat, 14 Feb 2015 14:11:34 +0000 (11:11 -0300)] 
[media] rtl28xxu: add support for Turbo-X DTT2000

ID 1b80:d3a4 Afatech

Simply added the PID (0xd3a4) of this DVB-T USB device to the list of rtl2832u-supported devices. VID (0x1b80) is same as KWORLD2.

Tested and verified to work in amd64 with kernels 3.13.0 and 3.16.0.

Signed-off-by: Dimitris Lampridis <dlampridis@logikonlabs.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: remove compiler warning
Luis de Bethencourt [Wed, 11 Feb 2015 11:08:51 +0000 (08:08 -0300)] 
[media] rtl2832: remove compiler warning

Cleaning up the following compiler warning:
rtl2832.c:703:12: warning: 'tmp' may be used uninitialized in this function

Even though it could never happen since if rtl2832_rd_demod_reg () doesn't set
tmp, this line would never run because we go to err. It is still nice to avoid
compiler warnings.

[mchehab@osg.samsung.com: fix a merge conflict with another patch meant
 to fix the same bug, but doing it at the wrong way]
Signed-off-by: Luis de Bethencourt <luis.bg@samsung.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rc: img-ir: fix error in parameters passed to irq_free()
Sifan Naeem [Tue, 10 Feb 2015 10:41:56 +0000 (07:41 -0300)] 
[media] rc: img-ir: fix error in parameters passed to irq_free()

img_ir_remove() passes a pointer to the ISR function as the 2nd
parameter to irq_free() instead of a pointer to the device data
structure.
This issue causes unloading img-ir module to fail with the below
warning after building and loading img-ir as a module.

WARNING: CPU: 2 PID: 155 at ../kernel/irq/manage.c:1278
__free_irq+0xb4/0x214() Trying to free already-free IRQ 58
Modules linked in: img_ir(-)
CPU: 2 PID: 155 Comm: rmmod Not tainted 3.14.0 #55 ...
Call Trace:
...
[<8048d420>] __free_irq+0xb4/0x214
[<8048d6b4>] free_irq+0xac/0xf4
[<c009b130>] img_ir_remove+0x54/0xd4 [img_ir] [<8073ded0>]
platform_drv_remove+0x30/0x54 ...

Fixes: 160a8f8aec4d ("[media] rc: img-ir: add base driver")
Signed-off-by: Sifan Naeem <sifan.naeem@imgtec.com>
Cc: <stable@vger.kernel.org> # 3.15+
Acked-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] cxusb: Use enum to represent table offsets rather than hard-coding numbers
David Howells [Tue, 17 Feb 2015 14:30:34 +0000 (11:30 -0300)] 
[media] cxusb: Use enum to represent table offsets rather than hard-coding numbers

Use enum to represent table offsets rather than hard-coding numbers to avoid
problems with the numbers becoming out of sync with the table.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] dib0700: remove unused macros
Luis de Bethencourt [Thu, 12 Feb 2015 22:11:47 +0000 (19:11 -0300)] 
[media] dib0700: remove unused macros

Remove unused macros RC_REPEAT_DELAY and RC_REPEAT_DELAY_V1_20

Signed-off-by: Luis de Bethencourt <luis.bg@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2165: Fix possible leak in si2165_upload_firmware()
Christian Engelmayer [Wed, 11 Feb 2015 20:58:23 +0000 (17:58 -0300)] 
[media] si2165: Fix possible leak in si2165_upload_firmware()

In case of an error function si2165_upload_firmware() releases the already
requested firmware in the exit path. However, there is one deviation where
the function directly returns. Use the correct cleanup so that the firmware
memory gets freed correctly. Detected by Coverity CID 1269120.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Reviewed-by: Luis de Bethencourt <luis.bg@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] s5k5baf: Add missing error check for devm_kzalloc
Kiran Padwal [Thu, 5 Feb 2015 10:09:10 +0000 (07:09 -0300)] 
[media] s5k5baf: Add missing error check for devm_kzalloc

This patch add a missing a check on the return value of devm_kzalloc,
which would cause a NULL pointer dereference in a OOM situation.

Signed-off-by: Kiran Padwal <kiran.padwal@smartplayin.com>
Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l: vb2-memops: use vma slab when vma allocation
KyongHo Cho [Thu, 5 Feb 2015 05:52:42 +0000 (02:52 -0300)] 
[media] v4l: vb2-memops: use vma slab when vma allocation

The slab for vm_area_struct which is vm_area_cachep is already prepared
for the general use. Instead of kmalloc() for the vma copy for userptr,
allocation from vm_area_cachep is more beneficial.

CC: Hans Verkuil <hans.verkuil@cisco.com>
CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rc: img-ir: Add and enable sys clock for img-ir
Sifan Naeem [Wed, 4 Feb 2015 16:48:14 +0000 (13:48 -0300)] 
[media] rc: img-ir: Add and enable sys clock for img-ir

Gets a handle to the system clock, already described in the binding
document, and calls the appropriate common clock framework functions
to mark it prepared/enabled, the common clock framework initially
enables the clock and doesn't disable it at least until the
device/driver is removed.
It's important the systen clock is enabled before register interface is
accessed by the driver.
The system clock to IR is needed for the driver to communicate with the
IR hardware via MMIO accesses on the system bus, so it must not be
disabled during use or the driver will malfunction.

Signed-off-by: Sifan Naeem <sifan.naeem@imgtec.com>
Acked-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DVB: Less function calls in dvb_ca_en50221_init() after error detection
Markus Elfring [Tue, 3 Feb 2015 15:47:48 +0000 (12:47 -0300)] 
[media] DVB: Less function calls in dvb_ca_en50221_init() after error detection

The functions "dvb_unregister_device" and "kfree" could still be called
by the dvb_ca_en50221_init() function in the case that a previous resource
allocation failed.

* Corresponding details could be improved by adjustments for jump targets.

* Let us delete also an unnecessary check for the variable "ca" there.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DVB: Delete an unnecessary check before the function call "dvb_unregister_device"
Markus Elfring [Tue, 3 Feb 2015 15:01:40 +0000 (12:01 -0300)] 
[media] DVB: Delete an unnecessary check before the function call "dvb_unregister_device"

The dvb_unregister_device() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] dvb-usb: fix spaces after commas
Luis de Bethencourt [Wed, 4 Feb 2015 13:42:12 +0000 (10:42 -0300)] 
[media] dvb-usb: fix spaces after commas

Fixing a few checkpatch errors of type: space required after that ','

Signed-off-by: Luis de Bethencourt <luis.bg@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] V4L2: Delete an unnecessary check before the function call "media_entity_put"
Markus Elfring [Tue, 3 Feb 2015 14:27:38 +0000 (11:27 -0300)] 
[media] V4L2: Delete an unnecessary check before the function call "media_entity_put"

The media_entity_put() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] sp2: Delete an unnecessary check before the function call "kfree"
Markus Elfring [Tue, 3 Feb 2015 14:05:26 +0000 (11:05 -0300)] 
[media] sp2: Delete an unnecessary check before the function call "kfree"

The kfree() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] r820t: enable flt_ext_wide for SYS_DVBC_ANNEX_A standard
Benjamin Larsson [Mon, 12 Jan 2015 19:10:02 +0000 (16:10 -0300)] 
[media] r820t: enable flt_ext_wide for SYS_DVBC_ANNEX_A standard

Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] r820t: add settings for SYS_DVBC_ANNEX_C standard
Benjamin Larsson [Mon, 12 Jan 2015 19:10:03 +0000 (16:10 -0300)] 
[media] r820t: add settings for SYS_DVBC_ANNEX_C standard

Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] mn88472: add ts mode and ts clock to driver
Benjamin Larsson [Sat, 6 Dec 2014 00:25:33 +0000 (21:25 -0300)] 
[media] mn88472: add ts mode and ts clock to driver

Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] uvc: embed video_device
Hans Verkuil [Mon, 9 Mar 2015 16:34:11 +0000 (13:34 -0300)] 
[media] uvc: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] em28xx: embed video_device
Hans Verkuil [Mon, 9 Mar 2015 16:34:06 +0000 (13:34 -0300)] 
[media] em28xx: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] bttv: embed video_device
Hans Verkuil [Mon, 9 Mar 2015 16:34:02 +0000 (13:34 -0300)] 
[media] bttv: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] cx88: embed video_device
Hans Verkuil [Mon, 9 Mar 2015 16:34:00 +0000 (13:34 -0300)] 
[media] cx88: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] cx18: replace cropping ioctls by selection ioctls
Hans Verkuil [Thu, 2 Apr 2015 11:34:31 +0000 (08:34 -0300)] 
[media] cx18: replace cropping ioctls by selection ioctls

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] cx18: fix VIDIOC_ENUMINPUT: wrong std value
Hans Verkuil [Thu, 2 Apr 2015 11:34:30 +0000 (08:34 -0300)] 
[media] cx18: fix VIDIOC_ENUMINPUT: wrong std value

The std field of v4l2_input is always V4L2_STD_ALL. For tuner inputs
this should be cx->tuner_std.

This fixes a v4l2-compliance failure.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] cx18: add support for control events
Hans Verkuil [Thu, 2 Apr 2015 11:34:29 +0000 (08:34 -0300)] 
[media] cx18: add support for control events

v4l2-compliance failed due to missing control event support in cx18.
Add this to the driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: radio-si4713: improve usage of gpiod API
Uwe Kleine-König [Thu, 26 Mar 2015 20:47:53 +0000 (17:47 -0300)] 
[media] media: radio-si4713: improve usage of gpiod API

Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions)
which appeared in v3.17-rc1, the gpiod_get* functions take an additional
parameter that allows to specify direction and initial value for output.
Simplify accordingly.

Moreover use the _optional variant which has tighter error checking, but
is simpler to use which allows further simplification.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: use V4L2_DV_FL_IS_CE_VIDEO instead of V4L2_DV_BT_STD_CEA861
Hans Verkuil [Fri, 20 Mar 2015 17:05:06 +0000 (14:05 -0300)] 
[media] vivid: use V4L2_DV_FL_IS_CE_VIDEO instead of V4L2_DV_BT_STD_CEA861

Don't rely on V4L2_DV_BT_STD_CEA861 since that include the
640x480p format, which is an IT format, not CE.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] adv: use V4L2_DV_FL_IS_CE_VIDEO instead of V4L2_DV_BT_STD_CEA861
Hans Verkuil [Fri, 20 Mar 2015 17:05:05 +0000 (14:05 -0300)] 
[media] adv: use V4L2_DV_FL_IS_CE_VIDEO instead of V4L2_DV_BT_STD_CEA861

Don't rely on V4L2_DV_BT_STD_CEA861 since that include the
640x480p format, which is an IT format, not CE.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Martin Bugge <marbugge@cisco.com>
Cc: Mats Randgaard <mats.randgaard@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook media: document the new V4L2_DV_FL_IS_CE_VIDEO flag
Hans Verkuil [Fri, 20 Mar 2015 17:05:04 +0000 (14:05 -0300)] 
[media] DocBook media: document the new V4L2_DV_FL_IS_CE_VIDEO flag

Document this new flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Martin Bugge <marbugge@cisco.com>
Cc: Mats Randgaard <mats.randgaard@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l2-dv-timings: log new V4L2_DV_FL_IS_CE_VIDEO flag
Hans Verkuil [Fri, 3 Apr 2015 09:27:02 +0000 (06:27 -0300)] 
[media] v4l2-dv-timings: log new V4L2_DV_FL_IS_CE_VIDEO flag

Add support for the new flag to v4l2_print_dv_timings().

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] videodev2.h/v4l2-dv-timings.h: add V4L2_DV_FL_IS_CE_VIDEO flag
Hans Verkuil [Fri, 20 Mar 2015 17:05:03 +0000 (14:05 -0300)] 
[media] videodev2.h/v4l2-dv-timings.h: add V4L2_DV_FL_IS_CE_VIDEO flag

In the past the V4L2_DV_BT_STD_CEA861 standard bit was used to
determine whether the format is a CE (Consumer Electronics) format
or not. However, the 640x480p59.94 format is part of the CEA-861
standard, but it is *not* a CE video format.

Add a new flag to make this explicit. This information is needed
in order to determine the default R'G'B' encoding for the format:
for CE video this is limited range (16-235) instead of full range
(0-255).

The header with all the timings has been updated with this new
flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Martin Bugge <marbugge@cisco.com>
Cc: Mats Randgaard <mats.randgaard@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media/Documentation: New flag EXECUTE_ON_WRITE
Ricardo Ribalda [Fri, 20 Mar 2015 14:13:14 +0000 (11:13 -0300)] 
[media] media/Documentation: New flag EXECUTE_ON_WRITE

Document new flag V4L2_CTRL_FLAG_EXECUTE_ON_WRITE, and the new behavior
of CH_VALUE event on VOLATILE controls.

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@osg.samsung.com>
9 years ago[media] media/v4l2-ctrls: Always execute EXECUTE_ON_WRITE ctrls
Ricardo Ribalda [Fri, 20 Mar 2015 13:55:37 +0000 (10:55 -0300)] 
[media] media/v4l2-ctrls: Always execute EXECUTE_ON_WRITE ctrls

Any control with V4L2_CTRL_FLAG_EXECUTE_ON_WRITE set should return
changed == true in cluster_changed.

This forces the value to be passed to the driver even if it has not
changed.

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@osg.samsung.com>
9 years ago[media] media/v4l2-ctrls: Add execute flags to write_only controls
Ricardo Ribalda [Fri, 20 Mar 2015 14:21:28 +0000 (11:21 -0300)] 
[media] media/v4l2-ctrls: Add execute flags to write_only controls

Any control that sets FLAG_WRITE_ONLY should OR it with
FLAG_EXECUTE_ON_WRITE.

So we can keep the current meaning of WRITE_ONLY.

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@osg.samsung.com>
9 years ago[media] media: New flag V4L2_CTRL_FLAG_EXECUTE_ON_WRITE
Ricardo Ribalda [Fri, 20 Mar 2015 13:45:43 +0000 (10:45 -0300)] 
[media] media: New flag V4L2_CTRL_FLAG_EXECUTE_ON_WRITE

Create a new flag that represent controls which its value needs to be
passed to the driver even if it has not changed.

They typically represent actions, like triggering a flash or clearing an
error flag. So writing to such a control means some action is executed.

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@osg.samsung.com>
9 years ago[media] media/v4l2-ctrls: volatiles should not generate CH_VALUE
Ricardo Ribalda [Fri, 20 Mar 2015 13:30:46 +0000 (10:30 -0300)] 
[media] media/v4l2-ctrls: volatiles should not generate CH_VALUE

Volatile controls should not generate CH_VALUE events.

Set has_changed to false to prevent this happening.

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@osg.samsung.com>
9 years ago[media] vivid: add support to set CVT, GTF timings
Prashant Laddha [Sat, 21 Mar 2015 12:29:14 +0000 (09:29 -0300)] 
[media] vivid: add support to set CVT, GTF timings

In addition to v4l2_find_dv_timings_cap(), where timings are searched
against the list of preset timings, the incoming timing from v4l2-ctl
is checked against CVT and GTF standards. If it confirms to be CVT or
GTF, it is treated as valid timing and vivid format is updated with
new timings.

Signed-off-by: Prashant Laddha <prladdha@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: add CVT,GTF standards to vivid dv timings caps
Prashant Laddha [Fri, 20 Mar 2015 06:41:45 +0000 (03:41 -0300)] 
[media] vivid: add CVT,GTF standards to vivid dv timings caps

Currently vivid supports V4L2_DV_BT_STD_DMT and V4L2_DV_BT_STD_CEA861
discrete video standards. Extending the capability set to allow for
setting CVT and GTF standards. This change, along with adding the
support for calculating CVT, GTF timings in v4l2-ctl would extend
the number of resolutions supported by vivid to almost any custom
resolution.

Also extending the limits on min and max pixel clock to accommodate
pixel clock range provided by cvt/gtf for resolutions ranging from
640x360p50 to 4kx2Kp60.

Signed-off-by: Prashant Laddha <prladdha@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] ov2640: add missing consumer.h include
Hans Verkuil [Fri, 3 Apr 2015 08:15:09 +0000 (05:15 -0300)] 
[media] ov2640: add missing consumer.h include

Needed for mips and sh platforms

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] sur40: fix occasional hard freeze due to buffer queue underrun
Florian Echtler [Tue, 31 Mar 2015 09:43:28 +0000 (06:43 -0300)] 
[media] sur40: fix occasional hard freeze due to buffer queue underrun

This patch fixes a kernel panic which occurs when buf_list is empty. This can
happen occasionally when user space is under heavy load (e.g. due to image
processing on the CPU) and new buffers aren't re-queued fast enough. In that
case, vb2_start_streaming_called can return true, but when the spinlock
is taken and sur40_poll attempts to fetch the next buffer from buf_list, the
list is in fact empty.

This patch needs to be applied on top of the queued one adding V4L2 support
to the sur40 driver.

Signed-off-by: Florian Echtler <floe@butterbrot.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] cx23885: Always initialise dev->slock spinlock
David Howells [Thu, 26 Mar 2015 13:06:21 +0000 (10:06 -0300)] 
[media] cx23885: Always initialise dev->slock spinlock

The slock spinlock in the cx23885_dev struct is only initialised if analogue
video is being used, but is used in other places too, leading to the attached
lockdep complaint.

Move the lock initialisation so that it is done unconditionally.

INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
CPU: 1 PID: 4413 Comm: scandvb Tainted: G        W       4.0.0-rc1-fsdevel+ #25
Hardware name: System manufacturer System Product Name/P5Q PRO TURBO, BIOS 0701    10/08/2012
 0000000000000000 ffff880129d779d8 ffffffff8162bbdf 0000000000000006
 0000000000000000 ffff880129d77aa8 ffffffff810780e3 0000000000000001
 0000000000000046 0000000000000004 ffffffff81c3f180 0000000000000000
Call Trace:
 [<ffffffff8162bbdf>] dump_stack+0x4c/0x65
 [<ffffffff810780e3>] __lock_acquire+0x7b5/0x1a0e
 [<ffffffff810799ee>] lock_acquire+0x97/0x10c
 [<ffffffffa006494e>] ? cx23885_buf_queue+0x69/0x142 [cx23885]
 [<ffffffff8102e9bc>] ? amd_set_subcaches+0x19b/0x19b
 [<ffffffff816313b4>] _raw_spin_lock_irqsave+0x36/0x4a
 [<ffffffffa006494e>] ? cx23885_buf_queue+0x69/0x142 [cx23885]
 [<ffffffffa006494e>] cx23885_buf_queue+0x69/0x142 [cx23885]
 [<ffffffffa00662cb>] buffer_queue+0x17/0x19 [cx23885]
 [<ffffffffa00382d5>] __enqueue_in_driver+0x6a/0x6f [videobuf2_core]
 [<ffffffffa0038ead>] vb2_start_streaming+0x37/0x129 [videobuf2_core]
 [<ffffffffa003a6c0>] vb2_internal_streamon+0xc5/0x105 [videobuf2_core]
 [<ffffffffa003b889>] __vb2_init_fileio+0x224/0x286 [videobuf2_core]
 [<ffffffffa003bcc0>] ? vb2_thread_start+0x7b/0x15f [videobuf2_core]
 [<ffffffffa0050182>] ? vb2_dvb_start_feed+0x86/0x86 [videobuf2_dvb]
 [<ffffffffa003bd06>] vb2_thread_start+0xc1/0x15f [videobuf2_core]
 [<ffffffff8150d393>] ? dmx_section_feed_start_filtering+0x2f/0x14f
 [<ffffffffa0050157>] vb2_dvb_start_feed+0x5b/0x86 [videobuf2_dvb]
 [<ffffffff8150d461>] dmx_section_feed_start_filtering+0xfd/0x14f
 [<ffffffff8150afc7>] dvb_dmxdev_filter_start+0x23f/0x315
 [<ffffffff8150b6ad>] dvb_demux_do_ioctl+0x1fb/0x556
 [<ffffffff81509e94>] dvb_usercopy+0xb4/0x11c
 [<ffffffff8150b4b2>] ? dvb_dmxdev_ts_callback+0xd0/0xd0
 [<ffffffff8150a11a>] dvb_demux_ioctl+0x10/0x14
 [<ffffffff81144ac4>] do_vfs_ioctl+0x3c1/0x474
 [<ffffffff8126f181>] ? file_has_perm+0x5b/0x7f
 [<ffffffff810bf6ca>] ? __audit_syscall_entry+0xbc/0xde
 [<ffffffff81144bcc>] SyS_ioctl+0x55/0x7a
 [<ffffffff81631d52>] system_call_fastpath+0x12/0x17

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] s5p-jpeg: Remove some unused functions
Rickard Strandqvist [Sun, 4 Jan 2015 15:32:45 +0000 (12:32 -0300)] 
[media] s5p-jpeg: Remove some unused functions

Removes some functions that are not used anywhere:
s5p_jpeg_input_raw_y16() s5p_jpeg_timer_disable() s5p_jpeg_timer_enable().

This was partially found by using a static code analysis program called
cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] s5p-jpeg: Initialize jpeg_addr fields to zero
Jacek Anaszewski [Thu, 5 Mar 2015 13:56:25 +0000 (10:56 -0300)] 
[media] s5p-jpeg: Initialize jpeg_addr fields to zero

JPEG codecs on Exynos4 and Exynos3250 SoCs utilize different number
of planes for storing the raw image data, depending on the format
of the image being processed. For the unused planes a random data
was being written to the related registers. Regardless of the fact
that this seemed not to be harmful, fix the issue for clarity reasons.

Reported-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] s5p-jpeg: add 5420 family support
Andrzej Pietrasiewicz [Mon, 9 Mar 2015 12:32:46 +0000 (09:32 -0300)] 
[media] s5p-jpeg: add 5420 family support

JPEG IP found in Exynos5420 is similar to what is in Exynos3250, but
there are some subtle differences which this patch takes into account.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] m88ts2022: remove from Makefile
Hans Verkuil [Sat, 4 Apr 2015 12:04:32 +0000 (09:04 -0300)] 
[media] m88ts2022: remove from Makefile

Remove target from Makefile: this driver no longer exists.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l: xilinx: Add Test Pattern Generator driver
Laurent Pinchart [Wed, 15 May 2013 14:36:56 +0000 (11:36 -0300)] 
[media] v4l: xilinx: Add Test Pattern Generator driver

The TPG generates multiple static or dynamic test patterns. The driver
currently hardcodes the pattern to the moving box pattern.

Signed-off-by: Christian Kohn <christian.kohn@xilinx.com>
Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l: xilinx: Add Video Timing Controller driver
Laurent Pinchart [Wed, 26 Mar 2014 14:46:25 +0000 (11:46 -0300)] 
[media] v4l: xilinx: Add Video Timing Controller driver

The Video Timing Controller (VTC) includes a timing detector and/or a
timing generator. Only the generator is currently supported.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l: xilinx: Add Xilinx Video IP core
Laurent Pinchart [Wed, 15 May 2013 14:36:19 +0000 (11:36 -0300)] 
[media] v4l: xilinx: Add Xilinx Video IP core

Xilinx platforms have no hardwired video capture or video processing
interface. Users create capture and memory to memory processing
pipelines in the FPGA fabric to suit their particular needs, by
instantiating video IP cores from a large library.

The Xilinx Video IP core is a framework that models a video pipeline
described in the device tree and expose the pipeline to userspace
through the media controller and V4L2 APIs.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Radhey Shyam Pandey <radheys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l: of: Add v4l2_of_parse_link() function
Laurent Pinchart [Fri, 17 May 2013 10:31:04 +0000 (07:31 -0300)] 
[media] v4l: of: Add v4l2_of_parse_link() function

The function fills a link data structure with the device node and port
number at both the local and remote ends of a link defined by one of its
endpoint nodes.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l: Add VUY8 24 bits bus format
Hyun Kwon [Tue, 18 Mar 2014 16:18:15 +0000 (13:18 -0300)] 
[media] v4l: Add VUY8 24 bits bus format

Add VUY8 24 bits bus format, V4L2_MBUS_FMT_VUY8_1X24.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l: Sort YUV formats of v4l2_mbus_pixelcode
Hyun Kwon [Tue, 18 Mar 2014 16:18:14 +0000 (13:18 -0300)] 
[media] v4l: Sort YUV formats of v4l2_mbus_pixelcode

Keep the formats sorted by type, bus_width, bits per component, samples
per pixel and order of subsamples, in that order.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l: Add RBG and RGB 8:8:8 media bus formats on 24 and 32 bit busses
Laurent Pinchart [Wed, 15 May 2013 14:34:26 +0000 (11:34 -0300)] 
[media] v4l: Add RBG and RGB 8:8:8 media bus formats on 24 and 32 bit busses

Add support and documentation for two media bus formats:
MEDIA_BUS_FMT_RBG888_1X24 and MEDIA_BUS_FMT_RGB888_1X32_PADHI

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: entity: Document the media_entity_ops structure
Laurent Pinchart [Wed, 26 Mar 2014 03:01:44 +0000 (00:01 -0300)] 
[media] media: entity: Document the media_entity_ops structure

Currently, there's no documentation for the structure. Add a
kernel-doc nano documentation to it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] cx18: embed video_device
Hans Verkuil [Mon, 9 Mar 2015 16:34:03 +0000 (13:34 -0300)] 
[media] cx18: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] ivtv: disable fbuf support if ivtvfb isn't loaded
Hans Verkuil [Mon, 30 Mar 2015 07:53:11 +0000 (04:53 -0300)] 
[media] ivtv: disable fbuf support if ivtvfb isn't loaded

Disable all fbuf-related functionality if ivtvfb isn't loaded. This
caused various v4l2-compliance failures.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] ivtv: replace crop by selection
Hans Verkuil [Mon, 30 Mar 2015 16:54:13 +0000 (13:54 -0300)] 
[media] ivtv: replace crop by selection

Replace the old g/s_crop ioctls by the new g/s_selection ioctls.
This solves a v4l2-compliance failure, and it is something that needs
to be done anyway to eventually be able to remove the old g/s_crop
ioctl ops.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] sta2x11: embed video_device
Hans Verkuil [Mon, 9 Mar 2015 16:34:04 +0000 (13:34 -0300)] 
[media] sta2x11: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Federico Vaga <federico.vaga@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: sh_vou: embed video_device
Lad, Prabhakar [Mon, 9 Mar 2015 22:10:51 +0000 (19:10 -0300)] 
[media] media: sh_vou: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] usbvision: fix leak of usb_dev on failure paths in usbvision_probe()
Alexey Khoroshilov [Fri, 27 Mar 2015 22:39:09 +0000 (19:39 -0300)] 
[media] usbvision: fix leak of usb_dev on failure paths in usbvision_probe()

There is no usb_put_dev() on failure paths in usbvision_probe().

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@osg.samsung.com>
9 years ago[media] v4l2_plane_pix_format: use __u32 bytesperline instead of __u16
Hans Verkuil [Sun, 15 Mar 2015 17:30:25 +0000 (14:30 -0300)] 
[media] v4l2_plane_pix_format: use __u32 bytesperline instead of __u16

While running v4l2-compliance tests on vivid I suddenly got errors due to
a call to vmalloc_user with size 0 from vb2.

Digging deeper into the cause I discovered that this was due to the fact that
struct v4l2_plane_pix_format defines bytesperline as a __u16 instead of a __u32.

The test I was running selected a format of 4 * 4096 by 4 * 2048 with a 32
bit pixelformat.

So bytesperline was 4 * 4 * 4096 = 65536, which becomes 0 in a __u16. And
bytesperline * height is suddenly 0 as well. While the vivid driver may be
a virtual driver, it is to be expected that this limit will be hit for real
hardware as well in the near future: 8k deep-color video will already reach
it.

The solution is to change the type to __u32. The only drivers besides vivid
that use the multiplanar API are little-endian ARM and SH platforms (exynos,
ti-vpe, vsp1), so this is safe.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: davinci: vpfe_capture: embed video_device
Lad, Prabhakar [Tue, 10 Mar 2015 17:53:05 +0000 (14:53 -0300)] 
[media] media: davinci: vpfe_capture: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] cx231xx: embed video_device
Hans Verkuil [Mon, 9 Mar 2015 16:34:13 +0000 (13:34 -0300)] 
[media] cx231xx: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] usbvision: embed video_device
Hans Verkuil [Mon, 9 Mar 2015 16:34:12 +0000 (13:34 -0300)] 
[media] usbvision: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] tm6000: embed video_device
Hans Verkuil [Mon, 9 Mar 2015 16:34:10 +0000 (13:34 -0300)] 
[media] tm6000: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] hdpvr: embed video_device
Hans Verkuil [Mon, 9 Mar 2015 16:34:09 +0000 (13:34 -0300)] 
[media] hdpvr: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] gadget/uvc: embed video_device
Hans Verkuil [Mon, 9 Mar 2015 16:34:08 +0000 (13:34 -0300)] 
[media] gadget/uvc: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] wl128x: embed video_device
Hans Verkuil [Mon, 9 Mar 2015 16:34:07 +0000 (13:34 -0300)] 
[media] wl128x: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] m2m-deinterlace: embed video_device
Hans Verkuil [Mon, 9 Mar 2015 16:34:05 +0000 (13:34 -0300)] 
[media] m2m-deinterlace: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] meye: embed video_device
Hans Verkuil [Mon, 9 Mar 2015 16:34:01 +0000 (13:34 -0300)] 
[media] meye: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] dt3155v4l: embed video_device
Hans Verkuil [Mon, 9 Mar 2015 16:33:59 +0000 (13:33 -0300)] 
[media] dt3155v4l: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] radio-bcm2048: embed video_device
Hans Verkuil [Mon, 9 Mar 2015 16:33:58 +0000 (13:33 -0300)] 
[media] radio-bcm2048: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] saa7146: embed video_device
Hans Verkuil [Mon, 9 Mar 2015 16:33:57 +0000 (13:33 -0300)] 
[media] saa7146: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vim2m: embed video_device
Hans Verkuil [Mon, 9 Mar 2015 16:33:56 +0000 (13:33 -0300)] 
[media] vim2m: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] ivtv: embed video_device
Hans Verkuil [Mon, 9 Mar 2015 16:33:55 +0000 (13:33 -0300)] 
[media] ivtv: embed video_device

Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This page took 0.04725 seconds and 5 git commands to generate.