platform/kernel/linux-rpi.git
9 years ago[media] coda: fix width validity check when starting to decode
Markus Pargmann [Fri, 23 Jan 2015 16:51:25 +0000 (13:51 -0300)]
[media] coda: fix width validity check when starting to decode

Compare rounded up width to fit into bytesperline.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
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: clear RET_DEC_PIC_SUCCESS flag in prepare_decode
Philipp Zabel [Fri, 23 Jan 2015 16:51:24 +0000 (13:51 -0300)]
[media] coda: clear RET_DEC_PIC_SUCCESS flag in prepare_decode

To make sure a set RET_DEC_PIC_SUCCESS flag is not a leftover from
a previous successful run, clear it in prepare_decode.

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: initialize SRAM on probe
Philipp Zabel [Fri, 23 Jan 2015 16:51:23 +0000 (13:51 -0300)]
[media] coda: initialize SRAM on probe

Zeroing the SRAM on probe helps with debugging SRAM contents.

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: properly clear f_cap in coda_s_fmt_vid_out
Philipp Zabel [Fri, 23 Jan 2015 16:51:22 +0000 (13:51 -0300)]
[media] coda: properly clear f_cap in coda_s_fmt_vid_out

Properly zero the structure on the stack before using it.

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 try_fmt_vid_out colorspace setting
Philipp Zabel [Fri, 23 Jan 2015 16:51:21 +0000 (13:51 -0300)]
[media] coda: fix try_fmt_vid_out colorspace setting

v4l2-compliance complains about invalid colorspace settings being accepted
on the output side. This patch only allows REC709 and JPEG.

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 job_ready debug reporting for bitstream decoding
Philipp Zabel [Fri, 23 Jan 2015 16:51:20 +0000 (13:51 -0300)]
[media] coda: fix job_ready debug reporting for bitstream decoding

Clarify whether job_ready returns false because the context is on hold, waiting
for new input buffers, whether there are not enough input buffers to fill two
into the bitstream, or whether there is not enough data in the bitstream buffer
for the bitstream reader hardware to read a whole frame.

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: adjust sequence offset after unexpected decoded frame
Lucas Stach [Fri, 23 Jan 2015 16:51:19 +0000 (13:51 -0300)]
[media] coda: adjust sequence offset after unexpected decoded frame

If userspace doesn't properly separate the bitstream input into
individual frames (which may happen for example on slightly
corrupted streams) the CODA hardware may decode more frames
than we expect. We already log an error in this case, but it's
also necessary to adjust the sequence offset. Otherwise we
spam the log with a sequence number mismatch on every frame
frame after the unexpected one.

Signed-off-by: Lucas Stach <l.stach@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 meta out of padding
Philipp Zabel [Fri, 23 Jan 2015 16:51:18 +0000 (13:51 -0300)]
[media] coda: move meta out of padding

Handle an empty buffer metadata list without crashing. This can happen
if the decoder is fed a broken stream, or multiple compressed frames in
a single queued buffer.

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 context debugfs entry last
Philipp Zabel [Fri, 23 Jan 2015 16:51:17 +0000 (13:51 -0300)]
[media] coda: remove context debugfs entry last

Do not remove the per-context debugfs directory before the
per-buffer debugfs entries contained therein.

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 encoder rate control parameter masks
Philipp Zabel [Fri, 23 Jan 2015 16:51:15 +0000 (13:51 -0300)]
[media] coda: fix encoder rate control parameter masks

This patch fixes the ENC_SEQ_RC_PARA initial delay and bitrate masks.
These bit fields are 15 bit wide, not 7 bit.

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: remove unnecessary version.h inclusion
Fabian Frederick [Mon, 29 Dec 2014 14:29:41 +0000 (11:29 -0300)]
[media] s5p-mfc: remove unnecessary version.h inclusion

Based on versioncheck.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] s5p-g2d: remove unnecessary version.h inclusion
Fabian Frederick [Mon, 29 Dec 2014 14:29:40 +0000 (11:29 -0300)]
[media] s5p-g2d: remove unnecessary version.h inclusion

Based on versioncheck.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media-doc: Fix MFC display delay control doc
Nicolas Dufresne [Mon, 15 Dec 2014 21:10:59 +0000 (18:10 -0300)]
[media] media-doc: Fix MFC display delay control doc

The V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE control
is a boolean but was documented as a integer. The documentation was
also slightly miss-leading.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
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-dec: Don't use encoder stop command
Nicolas Dufresne [Mon, 15 Dec 2014 21:10:58 +0000 (18:10 -0300)]
[media] s5p-mfc-dec: Don't use encoder stop command

The decoder should handle V4L2_DEC_CMD_STOP to trigger drain,
but it currently expecting V4L2_ENC_CMD_STOP.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
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-v6+: Use display_delay_enable CID
Nicolas Dufresne [Mon, 15 Dec 2014 21:10:57 +0000 (18:10 -0300)]
[media] s5p-mfc-v6+: Use display_delay_enable CID

The MFC driver has two controls, DISPLAY_DELAY and DISPLAY_DELAY_ENABLE
that allow forcing the decoder to return a decoded frame sooner
regardless of the order. The added support for firmware version 6 and
higher was not taking into account the DISPLAY_DELAY_ENABLE boolean.
Instead it had a comment stating that DISPLAY_DELAY should be set to a
negative value to disable it. This is not possible since the control
range is from 0 to 65535. This feature was also supposed to be disabled
by default in order to produce frames in display order.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] Documentation/video4linux: remove obsolete text files
Hans Verkuil [Tue, 23 Dec 2014 12:20:53 +0000 (09:20 -0300)]
[media] Documentation/video4linux: remove obsolete text files

Remove obsolete text files for drivers that have been removed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] bw/c-qcam, w9966, pms: remove deprecated staging drivers
Hans Verkuil [Tue, 23 Dec 2014 12:17:09 +0000 (09:17 -0300)]
[media] bw/c-qcam, w9966, pms: remove deprecated staging drivers

These drivers haven't been tested in a long, long time. The hardware is
ancient and hopelessly obsolete. These drivers also need to be converted
to newer media frameworks but due to the lack of hardware that's going
to be impossible. In addition, cheaper and vastly better hardware is
available today.

These drivers are already deprecated, so now remove them altogether.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vino/saa7191: remove deprecated drivers
Hans Verkuil [Tue, 23 Dec 2014 12:14:37 +0000 (09:14 -0300)]
[media] vino/saa7191: remove deprecated drivers

These drivers haven't been tested in a long, long time. The hardware is
ancient and hopelessly obsolete. These drivers also need to be converted
to newer media frameworks but due to the lack of hardware that's going
to be impossible.

So these drivers are a prime candidate for removal. If someone is
interested in working on these drivers to prevent their removal, then
please contact the linux-media mailinglist.

These drivers are already deprecated, so now remove them altogether.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] tlg2300: remove deprecated staging driver
Hans Verkuil [Tue, 23 Dec 2014 12:11:48 +0000 (09:11 -0300)]
[media] tlg2300: remove deprecated staging driver

This driver hasn't been tested in a long, long time. The company that made
this chip has gone bust many years ago and hardware using this chip is next
to impossible to find.

This driver needs to be converted to newer media frameworks but due to the
lack of hardware that's going to be impossible. Since cheap alternatives are
easily available, there is little point in keeping this driver alive.

This driver is already deprecated, so now remove it altogether.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2157: change firmware variable name and type
Antti Palosaari [Sat, 6 Dec 2014 21:15:18 +0000 (18:15 -0300)]
[media] si2157: change firmware variable name and type

Rename firmware variable from fw_file to fw_name and change its
type from u8 to const char as request_firmware() input is.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2157: print chip version
Antti Palosaari [Sat, 6 Dec 2014 21:12:39 +0000 (18:12 -0300)]
[media] si2157: print chip version

Print chip version once using log level into when init() is called.
Remove cold/warm state printing as those are not very useful.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2157: print firmware version
Antti Palosaari [Sat, 6 Dec 2014 20:25:24 +0000 (17:25 -0300)]
[media] si2157: print firmware version

Firmware version could be printed similarly than si2168 driver does.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2157: add own goto label for kfree() on probe error
Antti Palosaari [Sat, 6 Dec 2014 18:13:31 +0000 (15:13 -0300)]
[media] si2157: add own goto label for kfree() on probe error

Use own goto label for error case mem free is needed, even kfree could
be called with NULL. I think it is better to have it, even not required.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2157: trivial ID table changes
Antti Palosaari [Sat, 6 Dec 2014 18:07:45 +0000 (15:07 -0300)]
[media] si2157: trivial ID table changes

- Rename ID table.
- Remove magic numbers from ID table driver data field.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2157: change firmware download error handling
Antti Palosaari [Sat, 6 Dec 2014 17:51:17 +0000 (14:51 -0300)]
[media] si2157: change firmware download error handling

Rename firmare download error path goto label. Remove firmware NULL
set as NULL value is not needed anymore, due to recent change which
started using goto labels for firmware error handling.

Cc: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2157: carry pointer to client instead of state in tuner_priv
Antti Palosaari [Sat, 6 Dec 2014 17:40:06 +0000 (14:40 -0300)]
[media] si2157: carry pointer to client instead of state in tuner_priv

Carry struct i2c_client pointer in tuner_priv. This driver is I2C driver,
which is represented as a struct i2c_client, so better to carry this top
level structure for each routine in order to unify things.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2157: simplify si2157_cmd_execute() error path
Antti Palosaari [Sat, 6 Dec 2014 17:04:05 +0000 (14:04 -0300)]
[media] si2157: simplify si2157_cmd_execute() error path

Remove if () from firmware command error path as there should not be
any error prone conditional logic there. Use goto labels instead.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2157: rename device state variable from 's' to 'dev'
Antti Palosaari [Fri, 5 Dec 2014 20:46:30 +0000 (17:46 -0300)]
[media] si2157: rename device state variable from 's' to 'dev'

'dev' is likely most common name in kernel for structure containing
device state instance, so rename it in order to keep things
consistent.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2168: change firmware variable name and type
Antti Palosaari [Sat, 6 Dec 2014 20:53:16 +0000 (17:53 -0300)]
[media] si2168: change firmware variable name and type

Rename firmware variable from fw_file to fw_name and change its type
from u8 to const char as request_firmware() input defines.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2168: print chip version
Antti Palosaari [Sat, 6 Dec 2014 20:43:27 +0000 (17:43 -0300)]
[media] si2168: print chip version

Print chip version once using log level into when init() is called.
Remove cold/warm state printing as those are not very useful.

old printing:
si2168 6-0064: found a 'Silicon Labs Si2168' in cold state
si2168 6-0064: downloading firmware from file 'dvb-demod-si2168-b40-01.fw'
si2168 6-0064: firmware version: 4.0.11
si2168 6-0064: found a 'Silicon Labs Si2168' in warm state

new printing:
si2168 6-0064: found a 'Silicon Labs Si2168-B40'
si2168 6-0064: downloading firmware from file 'dvb-demod-si2168-b40-01.fw'
si2168 6-0064: firmware version: 4.0.11

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2168: remove unneeded fw variable initialization
Antti Palosaari [Fri, 5 Dec 2014 20:22:42 +0000 (17:22 -0300)]
[media] si2168: remove unneeded fw variable initialization

commit 034e1ec0ce299b9e90056793dcb3187e7add6b62
si2168: One function call less in si2168_init() after error detection

That commit added goto label for error path to release firmware,
but forgets to remove variable NULL set. Remove those now.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2168: enhance firmware download routine
Antti Palosaari [Fri, 5 Dec 2014 20:08:22 +0000 (17:08 -0300)]
[media] si2168: enhance firmware download routine

All known old firmware firmware formats are downloaded using 8 byte
chunks. Reject firmware if it could not be divided to 8 byte chunks
and because of that we could simplify some calculations. Now both
supported firmware download routines are rather similar.

Cc: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2168: add own goto label for kzalloc failure
Antti Palosaari [Fri, 5 Dec 2014 19:02:42 +0000 (16:02 -0300)]
[media] si2168: add own goto label for kzalloc failure

Use own label for kzalloc failure in which does not call kfree().
kfree() could be called with NULL, but it is still better to have
own label which skips unnecessary kfree().

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2168: change stream id debug log formatter
Antti Palosaari [Fri, 5 Dec 2014 18:57:03 +0000 (15:57 -0300)]
[media] si2168: change stream id debug log formatter

Change formatter from signed to unsigned as stream_id is 32bit
unsigned variable.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2168: change firmware version print from debug to info
Antti Palosaari [Fri, 5 Dec 2014 18:04:12 +0000 (15:04 -0300)]
[media] si2168: change firmware version print from debug to info

Even firmware version is not needed to know, it is still interesting
and useful to know some cases. Due to that increase its printing to
info log level.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2168: rename few things
Antti Palosaari [Fri, 5 Dec 2014 17:54:14 +0000 (14:54 -0300)]
[media] si2168: rename few things

Rename some goto labels and more. No functionality changes.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2168: simplify si2168_cmd_execute() error path
Antti Palosaari [Fri, 5 Dec 2014 17:30:44 +0000 (14:30 -0300)]
[media] si2168: simplify si2168_cmd_execute() error path

Remove if () from firmware command error path as there should not be
any error prone conditional logic there. Use goto labels instead.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2168: get rid of own struct i2c_client pointer
Antti Palosaari [Tue, 25 Nov 2014 20:53:21 +0000 (17:53 -0300)]
[media] si2168: get rid of own struct i2c_client pointer

We don't need that anymore as same pointer is passed to each
routine via struct dvb_frontend private field.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2168: carry pointer to client instead of state
Antti Palosaari [Tue, 25 Nov 2014 20:31:43 +0000 (17:31 -0300)]
[media] si2168: carry pointer to client instead of state

Carry struct i2c_client pointer inside struct dvb_frontend private
pointer. This driver is I2C driver, which is represented as a
struct i2c_client, so better to carry this top level structure for
each routine in order to unify things. This allows further
simplification.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2168: rename device state variable from 's' to 'dev'
Antti Palosaari [Tue, 25 Nov 2014 19:46:16 +0000 (16:46 -0300)]
[media] si2168: rename device state variable from 's' to 'dev'

'dev' is most common name in kernel for structure containing device
state instance, so rename it.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2168: define symbol rate limits
Antti Palosaari [Tue, 25 Nov 2014 19:26:49 +0000 (16:26 -0300)]
[media] si2168: define symbol rate limits

w_scan complains about missing symbol rate limits:
This dvb driver is *buggy*: the symbol rate limits are undefined - please report to linuxtv.org

Chip supports 1 to 7.2 MSymbol/s on DVB-C.

Cc: stable@vger.kernel.org
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] lgdt3305: add support for fixed tp clock mode
Michael Ira Krufky [Sun, 21 Dec 2014 21:54:50 +0000 (18:54 -0300)]
[media] lgdt3305: add support for fixed tp clock mode

Add support for controlling TP clock mode for VSB and QAM annex-B/C mode.
Gated clock mode is the default value, and does not support QAM annex-C.
The patch enables setting this control to fixed clock mode.

Signed-off-by: Michael Ira Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] lgdt3305: we only need to pass state into lgdt3305_mpeg_mode_polarity()
Michael Ira Krufky [Sun, 21 Dec 2014 21:48:19 +0000 (18:48 -0300)]
[media] lgdt3305: we only need to pass state into lgdt3305_mpeg_mode_polarity()

Simplify the code a little bit by removing some uneeded arguments
to lgdt3305_mpeg_mode_polarity().

Signed-off-by: Michael Ira Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] gspca_vc032x: Fix wrong bytesperline
Luca Bonissi [Mon, 26 Jan 2015 10:38:17 +0000 (07:38 -0300)]
[media] gspca_vc032x: Fix wrong bytesperline

I found a problem on vc032x gspca usb webcam subdriver: "bytesperline"
property is wrong for YUYV and YVYU formats.
With recent v4l-utils library (>=0.9.1), that uses "bytesperline" for
pixel format conversion, the result is a wrong jerky image.

Patch tested on my laptop (USB webcam Logitech Orbicam 046d:0892).

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=91181
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] gspca: Fix underflow in vidioc_s_parm()
Hans de Goede [Thu, 15 Jan 2015 10:42:36 +0000 (07:42 -0300)]
[media] gspca: Fix underflow in vidioc_s_parm()

"n" is a user controlled integer.  The code here doesn't handle the case
where "n" is negative and this causes a static checker warning.

drivers/media/usb/gspca/gspca.c:1571 vidioc_s_parm()
warn: no lower bound on 'n'

parm.capture.readbuffers is unsigned, so make n unsigned too, fixing this.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] gspca: Add high-speed modes for PS3 Eye camera
Joe Howse [Mon, 29 Dec 2014 15:00:03 +0000 (12:00 -0300)]
[media] gspca: Add high-speed modes for PS3 Eye camera

Add support in the PS3 Eye driver for QVGA capture at higher
frame rates: 187, 150, and 137 FPS. This functionality is valuable
because the PS3 Eye is popular for computer vision projects and no
other camera in its price range supports such high frame rates.

Correct a QVGA mode that was listed as 40 FPS. It is really 37 FPS
(half of 75 FPS).

Tests confirm that the nominal frame rates are achieved.

Signed-off-by: Joe Howse <josephhowse@nummist.com>
Tested-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] gspca_stv06xx: enable button found on some Quickcam Express variant
Antonio Ospite [Fri, 11 Jul 2014 12:56:57 +0000 (09:56 -0300)]
[media] gspca_stv06xx: enable button found on some Quickcam Express variant

Signed-off-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] pwc: fix WARN_ON
Hans Verkuil [Mon, 4 Aug 2014 10:29:59 +0000 (07:29 -0300)]
[media] pwc: fix WARN_ON

If start_streaming fails, then the buffers must be given back to vb2 with state
QUEUED, not ERROR. Otherwise a WARN_ON will be generated.

In the disconnect it is pointless to call pwc_cleanup_queued_bufs() as stop_streaming()
will be called anyway.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rc: sunxi-cir: Add support for the larger fifo found on sun5i and sun6i
Hans de Goede [Thu, 20 Nov 2014 15:10:47 +0000 (12:10 -0300)]
[media] rc: sunxi-cir: Add support for the larger fifo found on sun5i and sun6i

Add support for the larger fifo found on sun5i and sun6i, having a separate
compatible for the ir found on sun5i & sun6i also is useful if we ever want
to add ir transmit support, because the sun5i & sun6i version do not have
transmit support.

Note this commits also adds checking for the end-of-packet interrupt flag
(which was already enabled), as the fifo-data-available interrupt flag only
gets set when the trigger-level is exceeded. So far we've been getting away
with not doing this because of the low trigger-level, but this is something
which we should have done since day one.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rc: sunxi-cir: Add support for an optional reset controller
Hans de Goede [Thu, 20 Nov 2014 14:59:04 +0000 (11:59 -0300)]
[media] rc: sunxi-cir: Add support for an optional reset controller

On sun6i the cir block is attached to the reset controller, add support
for de-asserting the reset if a reset controller is specified in dt.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] gspca/touptek: Fix a few CodingStyle issues
Mauro Carvalho Chehab [Thu, 29 Jan 2015 20:22:04 +0000 (18:22 -0200)]
[media] gspca/touptek: Fix a few CodingStyle issues

Checkpatch complained about a few issues, like FSF address. Also,
multi-line comments are not following the Kernel CodingStyle.

While not too late, let's fix those issues.

Cc: John McMaster <johndmcmaster@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] gspca_touptek: Add support for ToupTek UCMOS series USB cameras
John McMaster [Mon, 1 Dec 2014 02:27:53 +0000 (23:27 -0300)]
[media] gspca_touptek: Add support for ToupTek UCMOS series USB cameras

Adds support for AmScope MU800 / ToupTek UCMOS08000KPB USB microscope camera.

Signed-off-by: John McMaster <johndmcmaster@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: Y offset should depend on quant. range
Hans Verkuil [Tue, 27 Jan 2015 16:46:17 +0000 (13:46 -0300)]
[media] vivid: Y offset should depend on quant. range

When converting to or from Y'CbCr and R'G'B' the Y offset depends
on the quantization range: it's 0 for full and 16 for limited range.
But in the code it was hardcoded to 16. This messed up the brightness
of the generated pattern.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] smiapp: Don't compile of_read_number() if CONFIG_OF isn't defined
Sakari Ailus [Tue, 27 Jan 2015 10:18:49 +0000 (07:18 -0300)]
[media] smiapp: Don't compile of_read_number() if CONFIG_OF isn't defined

of_read_number() is defined in of.h but does not return an error code, so
that non-of implementation could simply return an error.

Temporarily work around this until of_read_number() can be replaced by
of_property_read_u64_array().

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: change module unregister order
Antti Palosaari [Tue, 2 Dec 2014 14:23:49 +0000 (11:23 -0300)]
[media] rtl28xxu: change module unregister order

We must unregister frontend first and after that driver itself. That
order went wrong after demod drivers were switched to kernel I2C
drivers, causing crashes.

Tested-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: switch rtl2832 demod attach to I2C binding
Antti Palosaari [Tue, 2 Dec 2014 14:00:23 +0000 (11:00 -0300)]
[media] rtl28xxu: switch rtl2832 demod attach to I2C binding

As rtl2832 driver support now I2C binding we will switch to that one.

Tested-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: convert driver to I2C binding
Antti Palosaari [Tue, 2 Dec 2014 13:55:17 +0000 (10:55 -0300)]
[media] rtl2832: convert driver to I2C binding

Convert that driver to I2C driver model.
Legacy DVB binding is left also for later removal...

Tested-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] Revert "[media] v4l: omap4iss: Add module debug parameter"
Laurent Pinchart [Thu, 22 Jan 2015 14:12:02 +0000 (11:12 -0300)]
[media] Revert "[media] v4l: omap4iss: Add module debug parameter"

This reverts commit 186612342500b0af8498d7c8bc6b3ac32ac7a48e.

The video_device debug field has been renamed to dev_debug, resulting in
a compilation failure. As v4l2 debugging is supposed to be controlled
through a sysfs attribute created by the v4l2 core, there's no need to
duplicate debug control through a module parameter. Remove it.

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] uvcvideo: remove unnecessary version.h inclusion
Fabian Frederick [Mon, 29 Dec 2014 14:29:43 +0000 (11:29 -0300)]
[media] uvcvideo: remove unnecessary version.h inclusion

Based on versioncheck.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] uvcvideo: Remove extra commit on resume()
Aviv Greenberg [Tue, 2 Sep 2014 06:16:28 +0000 (03:16 -0300)]
[media] uvcvideo: Remove extra commit on resume()

The UVC spec is a bit vague wrt devices using bulk endpoints,
specifically, how to signal to a device to start streaming.

For devices using isoc endpoints, the sequence for start streaming is:
1) The host sends PROBE_CONTROL(SET_CUR) PROBE_CONTROL(GET_CUR)
2) Host selects desired config and calls COMMIT_CONTROL(SET_CUR)
3) Host selects an alt interface other then zero - e.g SELECT_ALTERNATE_INTERFACE(1)
4) The device starts streaming

However for devices using bulk endpoints, there must be *no* alt interface
other than setting zero. From the UVC spec:
"A VideoStreaming interface containing a bulk endpoint for streaming shall
support only alternate setting zero. Additional alternate settings containing
bulk endpoints are not permitted in a device that is compliant with the Video
Class specification."

So for devices using bulk endpoints, step #3 above is irrelevant, and thus
cannot be used as an indication for the device to start streaming.
So in practice, such devices start streaming immediately after a
COMMIT_CONTROL(SET_CUR).

In the uvc resume() handler, an unsolicited commit is sent, which causes
devices using bulk endpoints to start streaming unintentionally.

This patch modifies resume() handler to send a commit only if streaming
needs to be reestablished, i.e if the device was actually streaming before is
was suspended.

Signed-off-by: Aviv Greenberg <aviv.d.greenberg@intel.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l: vsp1: Fix VI6_DISP_IRQ_STA_LNE macro
Nobuhiro Iwamatsu [Wed, 7 Jan 2015 07:37:54 +0000 (04:37 -0300)]
[media] v4l: vsp1: Fix VI6_DISP_IRQ_STA_LNE macro

LNE bit in VI6_DISP_IRQ_STA register are from the 0 bit to 4 bit.
This fixes bit position specified by VI6_DISP_IRQ_STA_LNE.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l: vsp1: Fix VI6_DISP_IRQ_ENB_LNEE macro
Nobuhiro Iwamatsu [Wed, 7 Jan 2015 07:37:53 +0000 (04:37 -0300)]
[media] v4l: vsp1: Fix VI6_DISP_IRQ_ENB_LNEE macro

LNEE bit in VI6_DISP_IRQ_ENB register are from the 0 bit to 4 bit.
This fixes bit position specified by VI6_DISP_IRQ_ENB_LNEE.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l: vsp1: bru: Fix minimum input pixel size
Takanari Hayama [Thu, 22 Jan 2015 00:14:23 +0000 (21:14 -0300)]
[media] v4l: vsp1: bru: Fix minimum input pixel size

According to the spec, the minimum input pixel size for BRU is 1px,
not 4px.

Signed-off-by: Takanari Hayama <taki@igel.co.jp>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] adv7842: simplify InfoFrame logging
Martin Bugge [Fri, 19 Dec 2014 12:14:23 +0000 (09:14 -0300)]
[media] adv7842: simplify InfoFrame logging

Use the new logging functions from the hdmi module.

Signed-off-by: Martin Bugge <marbugge@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] hdmi: rename HDMI_AUDIO_CODING_TYPE_EXT_STREAM to _EXT_CT
Hans Verkuil [Fri, 19 Dec 2014 12:14:22 +0000 (09:14 -0300)]
[media] hdmi: rename HDMI_AUDIO_CODING_TYPE_EXT_STREAM to _EXT_CT

As per the suggestion of Thierry Reding rename
HDMI_AUDIO_CODING_TYPE_EXT_STREAM to HDMI_AUDIO_CODING_TYPE_EXT_CT to
be consistent with the CEA-861 spec.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] hdmi: added unpack and logging functions for InfoFrames
Martin Bugge [Fri, 19 Dec 2014 12:14:21 +0000 (09:14 -0300)]
[media] hdmi: added unpack and logging functions for InfoFrames

When receiving video it is very useful to be able to unpack the InfoFrames.
Logging is useful as well, both for transmitters and receivers.

Especially when implementing the VIDIOC_LOG_STATUS ioctl (supported by many
V4L2 drivers) for a receiver it is important to be able to easily log what
the InfoFrame contains. This greatly simplifies debugging.

Signed-off-by: Martin Bugge <marbugge@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] hdmi: add new HDMI 2.0 defines
Hans Verkuil [Fri, 19 Dec 2014 12:14:20 +0000 (09:14 -0300)]
[media] hdmi: add new HDMI 2.0 defines

Add new Video InfoFrame colorspace information introduced in HDMI 2.0
and new Audio Coding Extension Types, also from HDMI 2.0.

HDMI_CONTENT_TYPE_NONE was renamed to _GRAPHICS since that's what
it is called in CEA-861-F.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] adv7180: Remove the unneeded 'err' label
Fabio Estevam [Tue, 16 Dec 2014 16:49:07 +0000 (13:49 -0300)]
[media] adv7180: Remove the unneeded 'err' label

There is no need to jump to the 'err' label as we can simply return the error
code directly and make the code shorter.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] coda: improve safety in coda_register_device()
Dan Carpenter [Thu, 8 Jan 2015 10:07:08 +0000 (07:07 -0300)]
[media] coda: improve safety in coda_register_device()

The "i" variable is used as an offset into both the dev->vfd[] and the
dev->devtype->vdevs[] arrays.  The second array is smaller so we should
use that as a limit instead of ARRAY_SIZE(dev->vfd).  Also the original
check was off by one.

We should use a format string as well in case the ->name has any funny
characters and also to stop static checkers from complaining.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] bttv: Improve TEA575x support
Ondrej Zary [Fri, 16 Jan 2015 09:58:32 +0000 (06:58 -0300)]
[media] bttv: Improve TEA575x support

Improve g_tuner and add s_hw_freq_seek and enum_freq_bands support for cards
with TEA575x radio.

This allows signal/stereo detection and HW seek to work on these cards.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] tea575x: split and export functions
Ondrej Zary [Thu, 15 Jan 2015 20:10:46 +0000 (17:10 -0300)]
[media] tea575x: split and export functions

Split ioctl interface from enum_freq_bands, g_tuner and s_hw_freq_seek
functions and export them to be used in other drivers like bttv.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] bttv: Convert to generic TEA575x interface
Ondrej Zary [Thu, 15 Jan 2015 20:10:45 +0000 (17:10 -0300)]
[media] bttv: Convert to generic TEA575x interface

Remove tea575x-specific code from bttv and use the common driver instead.

Only set_frequency is implemented (signal/stereo detection or seek would
require more changes to bttv).

It works fine on Video Highway Xtreme (it actually makes the radio usable as
it currently cannot be tuned properly).

Miro/Pinnacle is untested but seems to be simple and should work.

However, I don't understand the Terratec Active Radio Upgrade code. The HW
seems to need IOR, IOW and CSEL signals that were taken from ISA bus on
older cards (IOR and IOW directly and CSEL from some address decoder) and
are emulated here using GPIOs. But the code manipulating these signals in
bttv seems to be broken - it never asserts the IOR signal. If anyone has
this HW, please test if I got that right.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] staging: media: bcm2048: Remove obsolete cleanup for clientdata
Wolfram Sang [Mon, 22 Dec 2014 22:18:29 +0000 (19:18 -0300)]
[media] staging: media: bcm2048: Remove obsolete cleanup for clientdata

A few new i2c-drivers came into the kernel which clear the clientdata-pointer
on exit or error. This is obsolete meanwhile, the core will do it.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] usb: pvrusb2: pvrusb2-hdw: Remove unused function
Rickard Strandqvist [Sun, 11 Jan 2015 15:38:14 +0000 (12:38 -0300)]
[media] usb: pvrusb2: pvrusb2-hdw: Remove unused function

Remove the function pvr2_hdw_cmd_powerdown() that is not used anywhere.

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: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: i2c: adv7604: Remove some unused functions
Rickard Strandqvist [Fri, 2 Jan 2015 23:29:08 +0000 (20:29 -0300)]
[media] media: i2c: adv7604: Remove some unused functions

Removes some functions that are not used anywhere:
test_read() edid_read_block() dpp_write() dpp_read()
esdp_write() esdp_read() cec_write_clr_set()

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: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: platform: vsp1: vsp1_hsit: Remove unused function
Rickard Strandqvist [Thu, 1 Jan 2015 17:51:30 +0000 (14:51 -0300)]
[media] media: platform: vsp1: vsp1_hsit: Remove unused function

Remove the function vsp1_hsit_read() that is not used anywhere.

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

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Acked-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.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: pci: saa7134: saa7134-video.c: Remove unused function
Rickard Strandqvist [Thu, 1 Jan 2015 17:03:35 +0000 (14:03 -0300)]
[media] media: pci: saa7134: saa7134-video.c: Remove unused function

Remove the function saa7134_queue() that is not used anywhere.

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: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: pci: mantis: mantis_core.c: Remove unused function
Rickard Strandqvist [Thu, 1 Jan 2015 16:55:01 +0000 (13:55 -0300)]
[media] media: pci: mantis: mantis_core.c: Remove unused function

Remove the function write_eeprom_byte() that is not used anywhere.

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: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: i2c: adv7604.c: Remove some unused functions
Rickard Strandqvist [Thu, 1 Jan 2015 16:13:20 +0000 (13:13 -0300)]
[media] media: i2c: adv7604.c: Remove some unused functions

Removes some functions that are not used anywhere:
vblanking() hblanking()

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: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: remove unnecessary version.h inclusion
Fabian Frederick [Mon, 29 Dec 2014 14:29:42 +0000 (11:29 -0300)]
[media] vivid: remove unnecessary version.h inclusion

Based on versioncheck.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] tw68: remove unnecessary version.h inclusion
Fabian Frederick [Mon, 29 Dec 2014 14:29:39 +0000 (11:29 -0300)]
[media] tw68: remove unnecessary version.h inclusion

Based on versioncheck.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] pvrusb2: Use setup_timer
Julia Lawall [Fri, 26 Dec 2014 14:35:50 +0000 (11:35 -0300)]
[media] pvrusb2: Use setup_timer

Convert a call to init_timer and accompanying intializations of
the timer's data and function fields to a call to setup_timer.

A simplified version of the semantic match that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression t,f,d;
@@

-init_timer(&t);
+setup_timer(&t,f,d);
-t.data = d;
-t.function = f;
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] usbvision: Use setup_timer
Julia Lawall [Fri, 26 Dec 2014 14:35:36 +0000 (11:35 -0300)]
[media] usbvision: Use setup_timer

Convert a call to init_timer and accompanying intializations of
the timer's data and function fields to a call to setup_timer.

A simplified version of the semantic match that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression t,f,d;
@@

-init_timer(&t);
+setup_timer(&t,f,d);
-t.data = d;
-t.function = f;
// </smpl>

The semantic patch also changes the cast to long to a cast to unsigned
long in the data initializer, as unsigned long is the type of the data field.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] s2255drv: Use setup_timer
Julia Lawall [Fri, 26 Dec 2014 14:35:33 +0000 (11:35 -0300)]
[media] s2255drv: Use setup_timer

Convert a call to init_timer and accompanying intializations of
the timer's data and function fields to a call to setup_timer.

A simplified version of the semantic match that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression t,f,d;
@@

-init_timer(&t);
+setup_timer(&t,f,d);
-t.function = f;
-t.data = d;
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] au0828: Use setup_timer
Julia Lawall [Fri, 26 Dec 2014 14:35:32 +0000 (11:35 -0300)]
[media] au0828: Use setup_timer

Convert a call to init_timer and accompanying intializations of
the timer's data and function fields to a call to setup_timer.

A simplified version of the semantic match that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression t,f,d;
@@

-t.function = f;
-t.data = d;
-init_timer(&t);
+setup_timer(&t,f,d);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] solo6x10: s/uint8_t/u8/
Ismael Luceno [Wed, 24 Dec 2014 11:43:36 +0000 (08:43 -0300)]
[media] solo6x10: s/uint8_t/u8/

s/uint8_t/u8/

Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] solo6x10: Fix solo_eeprom_read retval type
Ismael Luceno [Wed, 24 Dec 2014 11:36:01 +0000 (08:36 -0300)]
[media] solo6x10: Fix solo_eeprom_read retval type

s/unsigned short/u16/

Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] solo6x10: Fix eeprom_* functions buffer's type
Ismael Luceno [Wed, 24 Dec 2014 11:36:00 +0000 (08:36 -0300)]
[media] solo6x10: Fix eeprom_* functions buffer's type

s/unsigned short/u16/

Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] solo6x10: s/unsigned char/u8/
Ismael Luceno [Wed, 24 Dec 2014 11:35:59 +0000 (08:35 -0300)]
[media] solo6x10: s/unsigned char/u8/

s/unsigned char/u8/

Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] videobuf: make unused exported functions static
Hans Verkuil [Tue, 23 Dec 2014 12:46:27 +0000 (09:46 -0300)]
[media] videobuf: make unused exported functions static

The videobuf_dma_init* and videobuf_dma_map() functions are no longer
used except in videobuf-dma-sg.c itself. Make them static.

These functions were abused in various drivers. All those drivers
have now been fixed, so by no longer exporting these functions
future abuse is now prevented.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: radio: wl128x: fmdrv_rx.c: Remove unused function
Rickard Strandqvist [Sun, 21 Dec 2014 12:56:49 +0000 (09:56 -0300)]
[media] media: radio: wl128x: fmdrv_rx.c: Remove unused function

Remove the function fm_rx_get_rds_system() that is not used anywhere.

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: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: Kconfig: drop duplicate dependency of HAS_DMA
Prabhakar Lad [Fri, 19 Dec 2014 09:35:32 +0000 (06:35 -0300)]
[media] media: Kconfig: drop duplicate dependency of HAS_DMA

this patch drops duplicate dependency of HAS_DMA from
VIDEO_SH_VEU.

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] media: stb0899_drv: use time_after()
Asaf Vertz [Sun, 14 Dec 2014 06:49:47 +0000 (03:49 -0300)]
[media] media: stb0899_drv: use time_after()

To be future-proof and for better readability the time comparisons are
modified to use time_after() instead of plain, error-prone math.

Signed-off-by: Asaf Vertz <asaf.vertz@tandemg.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] coda: coda-common: Remove mx53 entry from coda_platform_ids
Fabio Estevam [Thu, 11 Dec 2014 19:53:17 +0000 (16:53 -0300)]
[media] coda: coda-common: Remove mx53 entry from coda_platform_ids

As mx53 is a dt-only architecture we can safely remove its entry from the
coda_platform_ids[] structure.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years agoMerge tag 'v3.19-rc6' into patchwork
Mauro Carvalho Chehab [Tue, 27 Jan 2015 11:39:34 +0000 (09:39 -0200)]
Merge tag 'v3.19-rc6' into patchwork

This is needed in order to get the media fixes applied on -rc6.

Linux 3.19-rc6

* tag 'v3.19-rc6': (891 commits)
  Linux 3.19-rc6
  dm: fix handling of multiple internal suspends
  hwmon: (i5500_temp) Convert to use ATTRIBUTE_GROUPS macro
  hwmon: (i5500_temp) Convert to module_pci_driver
  hwmon: (i5500_temp) Don't bind to disabled sensors
  hwmon: (i5500_temp) Convert to devm_hwmon_device_register_with_groups
  hwmon: (i5500_temp) New driver for the Intel 5500/5520/X58 chipsets
  arm64: dts: add baud rate to Juno stdout-path
  Revert "platform: x86: dell-laptop: Add support for keyboard backlight"
  Revert "Documentation: Add entry for dell-laptop sysfs interface"
  dm cache: fix problematic dual use of a single migration count variable
  dm cache: share cache-metadata object across inactive and active DM tables
  of/unittest: Overlays with sub-devices tests
  KVM: x86: SYSENTER emulation is broken
  KVM: x86: Fix of previously incomplete fix for CVE-2014-8480
  arm64: dump: Fix implicit inclusion of definition for PCI_IOBASE
  x86/tsc: Change Fast TSC calibration failed from error to info
  x86/apic: Re-enable PCI_MSI support for non-SMP X86_32
  x86, mm: Change cachemode exports to non-gpl
  x86, tls: Interpret an all-zero struct user_desc as "no segment"
  ...

Conflicts:
drivers/media/pci/cx23885/cx23885.h

9 years ago[media] mb86a20s: remove unused debug modprobe parameter
Mauro Carvalho Chehab [Tue, 30 Dec 2014 15:45:40 +0000 (13:45 -0200)]
[media] mb86a20s: remove unused debug modprobe parameter

The debug parameter is not used anymore, as this module was
converted already to use dev_dbg().

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] Si2168: increase timeout to fix firmware loading
Jurgen Kramer [Mon, 8 Dec 2014 08:30:44 +0000 (05:30 -0300)]
[media] Si2168: increase timeout to fix firmware loading

Increase si2168 cmd execute timeout to prevent firmware load failures. Tests
shows it takes up to 52ms to load the 'dvb-demod-si2168-a30-01.fw' firmware.
Increase timeout to a safe value of 70ms.

Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] mn88472: add 5MHz dvb-t2 bandwitdh support
Benjamin Larsson [Sat, 6 Dec 2014 21:57:31 +0000 (18:57 -0300)]
[media] mn88472: add 5MHz dvb-t2 bandwitdh support

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 agoLinux 3.19-rc6
Linus Torvalds [Mon, 26 Jan 2015 04:04:41 +0000 (20:04 -0800)]
Linux 3.19-rc6

9 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 26 Jan 2015 02:11:17 +0000 (18:11 -0800)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Thomas Gleixner:
 "Hopefully the last round of fixes for 3.19

   - regression fix for the LDT changes
   - regression fix for XEN interrupt handling caused by the APIC
     changes
   - regression fixes for the PAT changes
   - last minute fixes for new the MPX support
   - regression fix for 32bit UP
   - fix for a long standing relocation issue on 64bit tagged for stable
   - functional fix for the Hyper-V clocksource tagged for stable
   - downgrade of a pr_err which tends to confuse users

  Looks a bit on the large side, but almost half of it are valuable
  comments"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/tsc: Change Fast TSC calibration failed from error to info
  x86/apic: Re-enable PCI_MSI support for non-SMP X86_32
  x86, mm: Change cachemode exports to non-gpl
  x86, tls: Interpret an all-zero struct user_desc as "no segment"
  x86, tls, ldt: Stop checking lm in LDT_empty
  x86, mpx: Strictly enforce empty prctl() args
  x86, mpx: Fix potential performance issue on unmaps
  x86, mpx: Explicitly disable 32-bit MPX support on 64-bit kernels
  x86, hyperv: Mark the Hyper-V clocksource as being continuous
  x86: Don't rely on VMWare emulating PAT MSR correctly
  x86, irq: Properly tag virtualization entry in /proc/interrupts
  x86, boot: Skip relocs when load address unchanged
  x86/xen: Override ACPI IRQ management callback __acpi_unregister_gsi
  ACPI: pci: Do not clear pci_dev->irq in acpi_pci_irq_disable()
  x86/xen: Treat SCI interrupt as normal GSI interrupt