Helen Fornazier [Thu, 6 Apr 2017 19:25:15 +0000 (16:25 -0300)]
[media] media-entity: only call dev_dbg_obj if mdev is not NULL
Fix kernel Oops NULL pointer deference
Call dev_dbg_obj only after checking if gobj->mdev is not NULL
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Mauro Carvalho Chehab [Wed, 19 Apr 2017 11:01:18 +0000 (08:01 -0300)]
[media] pixfmt-meta-vsp1-hgo.rst: remove spurious '-'
Remove spurious '-' in the VSP1 hgo table.
This resulted in a weird dot character that also caused
the row to be double-height.
We used to have it on other tables, but we got rid of them
on changeset
8ed29e302dd1 ("[media] subdev-formats.rst: remove
spurious '-'").
Fixes:
14d665387165 ("[media] v4l: Define a pixel format for the R-Car VSP1 1-D histogram engine")
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Mauro Carvalho Chehab [Wed, 19 Apr 2017 10:48:56 +0000 (07:48 -0300)]
[media] mtk-vcodec: avoid warnings because of empty macros
Remove those gcc warnings:
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c: In function 'mtk_vcodec_dec_pw_on':
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c:114:51: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
mtk_v4l2_err("pm_runtime_get_sync fail %d", ret);
^
By adding braces.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Lucas Stach [Wed, 5 Apr 2017 13:11:15 +0000 (10:11 -0300)]
[media] coda: bump maximum number of internal framebuffers to 17
The h.264 standard allows up to 16 reference frame for the high profile
and we need one additional internal framebuffer when the VDOA is in use.
Lift the current maximum of 8 internal framebuffers to allow playback
of those video streams.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Minghsiu Tsai [Wed, 5 Apr 2017 10:54:29 +0000 (07:54 -0300)]
[media] media: mtk-vcodec: remove informative log
Driver is stable. Remove DEBUG definition from driver.
There are debug message in /var/log/messages if DEBUG is defined,
such as:
[MTK_V4L2] level=0 fops_vcodec_open(),170: decoder capability 0
[MTK_V4L2] level=0 fops_vcodec_open(),177:
16000000.vcodec decoder [0]
[MTK_V4L2] level=0 fops_vcodec_release(),200: [0] decoder
Signed-off-by: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
Acked-by: Tiffany Lin <Tiffany.lin@mediatek.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Mon, 3 Apr 2017 10:05:45 +0000 (07:05 -0300)]
[media] subdev-formats.rst: remove spurious '-'
Remove spurious duplicate '-' in the Bayer Formats description. This resulted in a
weird dot character that also caused the row to be double-height.
The - character was probably used originally as indicator of an unused bit, but as the
number of columns was increased it was never used for the new columns.
Other tables do not use '-' either, so just remove it.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Alyssa Milburn [Sat, 1 Apr 2017 17:34:49 +0000 (14:34 -0300)]
[media] dw2102: limit messages to buffer size
Otherwise the i2c transfer functions can read or write beyond the end of
stack or heap buffers.
Signed-off-by: Alyssa Milburn <amilburn@zall.org>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Alyssa Milburn [Sat, 1 Apr 2017 17:34:32 +0000 (14:34 -0300)]
[media] ttusb2: limit messages to buffer size
Otherwise ttusb2_i2c_xfer can read or write beyond the end of static and
heap buffers.
Signed-off-by: Alyssa Milburn <amilburn@zall.org>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Mon, 17 Apr 2017 11:05:10 +0000 (08:05 -0300)]
[media] cec: add MEDIA_CEC_RC config option
Add an explicit config option to select whether the CEC remote control
messages are to be passed on to the RC subsystem or not.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Mon, 17 Apr 2017 10:54:37 +0000 (07:54 -0300)]
[media] cec.h: merge cec-edid.h into cec.h
Drop the separate cec-edid.h header and merge it into cec.h.
There was really no need to have a separate header for this.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Mon, 17 Apr 2017 10:44:35 +0000 (07:44 -0300)]
[media] cec: Kconfig cleanup
The Kconfig options for the CEC subsystem were a bit messy. In
addition there were two cec sources (cec-edid.c and cec-notifier.c)
that were outside of the media/cec directory, which was weird.
Move those sources to media/cec as well.
The cec-edid and cec-notifier functionality is now part of the cec
module and these are no longer separate modules.
Also remove the MEDIA_CEC_EDID config option and include it with the
main CEC config option (which defined CEC_EDID anyway).
Added static inlines to cec-edid.h for dummy functions when CEC_CORE
isn't defined.
CEC drivers should now depend on CEC_CORE.
CEC drivers that need the cec-notifier functionality must explicitly
select CEC_NOTIFIER.
The s5p-cec and stih-cec drivers depended on VIDEO_DEV instead of
CEC_CORE, fix that as well.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Alyssa Milburn [Sat, 1 Apr 2017 17:34:08 +0000 (14:34 -0300)]
[media] zr364xx: enforce minimum size when reading header
This code copies actual_length-128 bytes from the header, which will
underflow if the received buffer is too small.
Signed-off-by: Alyssa Milburn <amilburn@zall.org>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Alyssa Milburn [Sat, 1 Apr 2017 17:33:42 +0000 (14:33 -0300)]
[media] digitv: limit messages to buffer size
Return an error rather than memcpy()ing beyond the end of the buffer.
Internal callers use appropriate sizes, but digitv_i2c_xfer may not.
Signed-off-by: Alyssa Milburn <amilburn@zall.org>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Ezequiel Garcia [Sat, 25 Mar 2017 19:14:15 +0000 (16:14 -0300)]
[media] media: stk1160: Add Kconfig help on snd-usb-audio requirement
The Kconfig currently makes no reference to the snd-usb-audio
driver, which supports audio capture for this type of devices.
Just in case, let's make sure the requirement is mentioned
in the description.
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arushi Singhal [Wed, 22 Mar 2017 04:26:09 +0000 (01:26 -0300)]
[media] staging: media: omap4iss: Replace a bit shift by a use of BIT
This patch replaces bit shifting on 1 with the BIT(x) macro.
This was done with coccinelle:
@@
constant c;
@@
-1 << c
+BIT(c)
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 19 Mar 2017 15:26:39 +0000 (12:26 -0300)]
[media] dvb-frontends/cxd2841er: define symbol_rate_min/max in T/C fe-ops
Fixes "w_scan -f c" complaining with
This dvb driver is *buggy*: the symbol rate limits are undefined - please
report to linuxtv.org)
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Acked-by: Abylay Ospan <aospan@netup.ru>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Frank Schaefer [Sat, 15 Apr 2017 10:05:04 +0000 (07:05 -0300)]
[media] em28xx: add support for V4L2_PIX_FMT_SRGGB8
Adding support for SRGGB8 is as simple as adding a new entry at
struct em28xx_fmt.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Frank Schaefer [Sat, 15 Apr 2017 10:05:03 +0000 (07:05 -0300)]
[media] em28xx: shed some light on video input formats
CbYCrY has been identified by looking into the tvp5150 driver and the
saa7115 datasheet.
YUV formats have been verified with em2765 + ov2640 (VAD Laplace webcam).
RGB8 formats have been verified with em2710/em2820 + mt9v011 (Silvercrest
webcam 1.3mpix).
I also did some cross-checking with these two camera devices and 0x08-0x0b
are at least 16 bits per pixel formats on em2710/em2820, too, and
0x0c-0x0f are at least 8 bits per pixel formats on em2765, too.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Frank Schaefer [Sat, 15 Apr 2017 10:05:02 +0000 (07:05 -0300)]
[media] em28xx: don't treat device as webcam if an unknown sensor is detected
With an unknown sensor, norm_maxw() and norm_maxh() return 0 as max.
height and width values, which causes a devide by zero in size_to_scale().
Of course we could use speculative default values for unknown sensors,
but the chance that the device works at this resolution without any
driver/setup is very low and therefore not worth the efforts.
Instead, just don't treat the device as camera.
A message will then be printed to the log that the device isn't supported.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Frank Schaefer [Sat, 15 Apr 2017 10:05:01 +0000 (07:05 -0300)]
[media] em28xx: add missing auto-selections for build
With MEDIA_SUBDRV_AUTOSELECT enabled in the kernel config, the em28xx
driver currently does't select some used subdrivers.
Fix this by adding the missing auto-selections to the Kconfig file.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Frank Schaefer [Sat, 15 Apr 2017 10:05:00 +0000 (07:05 -0300)]
[media] em28xx: get rid of the dummy clock source
The v4l2 dummy clock has been added with commit
fc5d0f8a8878
("V4L2: em28xx: register a V4L2 clock source") to be able to use the ov2640
soc_camera driver.
Since commit
46796cfcd346 ("ov2640: use standard clk and enable it") it is
no longer required.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Frank Schaefer [Sun, 16 Apr 2017 17:41:52 +0000 (14:41 -0300)]
[media] em28xx: simplify ID-reading from Micron sensors
Use i2c_smbus_read_word_data() instead of i2c_master_send() and
i2c_master_recv() for reading the ID of Micorn sensors.
i2c_smbus_read_word_data() assumes that byes are in little-endian,
so, it uses:
data->word = msgbuf1[0] | (msgbuf1[1] << 8);
However, Micron datasheet describes the ID as if they were read
in big-endian. So, we need to change the byte order in order to
match the ID number as described on their datasheets.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Jasmin J [Sat, 18 Mar 2017 02:04:20 +0000 (23:04 -0300)]
[media] media/dvb-core: Race condition when writing to CAM
It started with a sporadic message in syslog: "CAM tried to send a
buffer larger than the ecount size" This message is not the fault
itself, but a consecutive fault, after a read error from the CAM. This
happens only on several CAMs, several hardware, and of course sporadic.
It is a consecutive fault, if the last read from the CAM did fail. I
guess this will not happen on all CAMs, but at least it did on mine.
There was a write error to the CAM and during the re-initialization
procedure, the CAM finished the last read, although it got a RS.
The write error to the CAM happened because a race condition between HC
write, checking DA and FR.
This patch added an additional check for DA(RE), just after checking FR.
It is important to read the CAMs status register again, to give the CAM
the necessary time for a proper reaction to HC. Please note the
description within the source code (patch below).
[mchehab@s-opensource.com: make checkpatch happy]
Signed-off-by: Jasmin jessich <jasmin@anw.at>
Tested-by: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Tue, 14 Mar 2017 22:22:37 +0000 (19:22 -0300)]
[media] dvb-frontends/drxk: don't log errors on unsupported operation mode
When fe_ops.read_status is called and no channel is tuned (yet), the
subsequent calls to get_lock_status() causes the kernel log to be filled
with
drxk: Error -22 on get_lock_status
which either means a NULL pointer was passed for the p_lock_status var,
or neither QAM nor OFDM/DVBT operation mode are active. Instead of
filling the kernel log in the latter case, print out a message to the debug
level and return 0 (this isn't used in the calling drxk_get_stats() anyway).
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Geert Uytterhoeven [Sun, 12 Mar 2017 13:16:56 +0000 (10:16 -0300)]
MAINTAINERS: Add file patterns for media device tree bindings
Submitters of device tree binding documentation may forget to CC
the subsystem maintainer if this is missing.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
simran singhal [Fri, 10 Mar 2017 05:13:12 +0000 (02:13 -0300)]
[media] staging: lirc_zilog: Clean up tests if NULL returned on failure
Some functions like kmalloc/kzalloc return NULL on failure.
When NULL represents failure, !x is commonly used.
This was done using Coccinelle:
@@
expression *e;
identifier l1;
@@
e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Sakari Ailus [Thu, 9 Mar 2017 15:19:32 +0000 (12:19 -0300)]
[media] docs-rst: media: better document refcount in struct dvb_frontend
The refcount field was added to the struct but it was not
properly documented.
Document it.
[mchehab@s-opensource.com: fix a merge conflict]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Sakari Ailus [Thu, 9 Mar 2017 10:22:11 +0000 (07:22 -0300)]
[media] docs-rst: Make the CSI-2 bus initialisation documentation match reality
Update the CSI-2 bus documentation to tell that the LP-11 mode is not
mandatory as there are transmitters that cannot be explicitly set to LP-11
mode. Instead, say that this what the transmitter drivers shall do if
possible.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Alexandre-Xavier Labonté-Lamoureux [Sat, 25 Feb 2017 08:03:38 +0000 (05:03 -0300)]
[media] em28xx: Add new USB ID eb1a:5051
Add new usbid eb1a:5051 for the Ion Video 2 PC MKII, Startech svid2usb23
and Raygo R12-41373.
Signed-off-by: Alexandre-Xavier Labonté-Lamoureux <alexandrexavier@live.ca>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Christophe JAILLET [Wed, 22 Feb 2017 22:32:19 +0000 (19:32 -0300)]
[media] tm6000: Fix resource freeing in 'tm6000_prepare_isoc()'
'usb_free_urb(urb)' is a no-op, because urb is known to be NULL.
It is likelly that releasing resources allocated by
'tm6000_alloc_urb_buffers()' just a few lines above is expected here.
This has been spotted by the following coccinelle script:
@@
expression ret, x, e;
identifier f;
@@
* if (x == NULL)
{
... when != x = e;
(
* f(<+...x...+>);
|
* ret = f(<+...x...+>);
)
...
}
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Javier Martinez Canillas [Wed, 22 Feb 2017 16:11:28 +0000 (13:11 -0300)]
[media] tc358743: Add OF device ID table
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:<device>.
But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Gustavo A. R. Silva [Tue, 21 Feb 2017 03:49:59 +0000 (00:49 -0300)]
[media] media: pci: saa7164: remove dead code
Remove dead code. The following line of code is never reached:
return SAA_OK;
Addresses-Coverity-ID: 114283
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Gustavo A. R. Silva [Tue, 21 Feb 2017 03:46:58 +0000 (00:46 -0300)]
[media] media: pci: saa7164: remove unnecessary code
Remove unnecessary variable 'loop'.
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Javier Martinez Canillas [Mon, 20 Feb 2017 20:16:16 +0000 (17:16 -0300)]
[media] et8ek8: Export OF device ID as module aliases
The I2C core always reports a MODALIAS of the form i2c:<foo> even if the
device was registered via OF, this means that exporting the OF device ID
table device aliases in the module is not needed. But in order to change
how the core reports modaliases to user-space, it's better to export it.
Before this patch:
$ modinfo drivers/media/i2c/et8ek8/et8ek8.ko | grep alias
alias: i2c:et8ek8
After this patch:
$ modinfo drivers/media/i2c/et8ek8/et8ek8.ko | grep alias
alias: i2c:et8ek8
alias: of:N*T*Ctoshiba,et8ek8C*
alias: of:N*T*Ctoshiba,et8ek8
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Bhumika Goyal [Sun, 19 Feb 2017 18:04:41 +0000 (15:04 -0300)]
[media] media: pci: constify stv0299_config structures
Declare stv0299_config structures as const as they are only passed as
an argument to the function dvb_attach. dvb_attach
calls its first argument on the rest of its arguments. The first
argument of dvb_attach in the changed cases is stv0299_attach and
the parameter of this function to which the object references are passed
is of type const. So, stv0299_config structures having this property
can be made const.
First line shows the file size before patching and second one shows size
after patching.
text data bss dec hex filename
9572 926 40 10538 292a media/pci/dm1105/dm1105.o
9636 862 40 10538 292a media/pci/dm1105/dm1105.o
15133 5408 0 20541 503d media/pci/ttpci/budget-av.o
15389 5152 0 20541 503d media/pci/ttpci/budget-av.o
15703 2326 36 18065 4691 media/pci/ttpci/budget-ci.o
15767 2262 36 18065 4691 media/pci/ttpci/budget-ci.o
10555 1918 4 12477 30bd drivers/media/pci/ttpci/budget.o
10683 1822 4 12509 30dd drivers/media/pci/ttpci/budget.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Bhumika Goyal [Sun, 19 Feb 2017 17:39:06 +0000 (14:39 -0300)]
[media] pci: mantis: constify mb86a16_config structure
Declare mb86a16_config structure as const as it is either passed as
an argument to the function dvb_attach or is dereferenced. dvb_attach
calls its first argument on the rest of its arguments. The first argument
of dvb_attach in the changed case is mb86a16_attach and the parameter of
this function to which the object reference is passed is of type
const. So, mb86a16_config structures having this property can be made
const.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Bhumika Goyal [Sun, 19 Feb 2017 17:29:07 +0000 (14:29 -0300)]
[media] cx88: constify mb86a16_config structure
Declare mb86a16_config structure as const as it is only passed as
an argument to the function dvb_attach. dvb_attach calls its first
argument on the rest of its arguments. The first argument of
dvb_attach in the changed case is mb86a16_attach and the parameter of
this function to which the object reference is passed is of type
const. So, mb86a16_config structures having this property can be made
const.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Bhumika Goyal [Sun, 19 Feb 2017 13:06:38 +0000 (10:06 -0300)]
[media] saa7134: constify nxt200x_config structures
Declare nxt200x_config structures as const as they are only passed as
an argument to the function dvb_attach. dvb_attach calls its first
argument on the rest of its arguments. The first argument of
dvb_attach in the changed cases is nxt200x_attach and the parameter of
this function to which the object references are passed is of type
const. So, nxt200x_config structures having this property can be made
const.
File size before:
text data bss dec hex filename
21320 3776 16 25112 6218 saa7134/saa7134-dvb.o
File size after:
text data bss dec hex filename
21384 3744 16 25144 6238 saa7134/saa7134-dvb.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Bhumika Goyal [Sun, 19 Feb 2017 12:59:52 +0000 (09:59 -0300)]
[media] b2c2: constify nxt200x_config structure
Declare nxt200x_config structure as const as it is only passed as
an argument to the function dvb_attach. dvb_attach calls its first
argument on the rest of its arguments. The first argument of
dvb_attach in the changed case is nxt200x_attach and the parameter of
this function to which the object reference is passed is of type
const. So, nxt200x_config structures having this property can be made
const.
File size before:
text data bss dec hex filename
7566 568 0 8134 1fc6 common/b2c2/flexcop-fe-tuner.o
File size after:
text data bss dec hex filename
7582 536 0 8118 1fb6 common/b2c2/flexcop-fe-tuner.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Ben Hutchings [Sat, 18 Feb 2017 00:30:51 +0000 (22:30 -0200)]
[media] dvb-usb-dibusb-mc-common: Add MODULE_LICENSE
dvb-usb-dibusb-mc-common is licensed under GPLv2, and if we don't say
so then it won't even load since it needs a GPL-only symbol.
Fixes:
e91455a1495a ("[media] dvb-usb: split out common parts of dibusb")
Reported-by: Dominique Dumont <dod@debian.org>
Cc: stable@vger.kernel.org # 4.9+
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Colin Ian King [Fri, 17 Feb 2017 16:17:30 +0000 (14:17 -0200)]
[media] Staging: media/lirc: don't call put_ir_rx on rx twice
There is an exit path where rx is kfree'd on put_ir_rx and then
a jump to label out_put_xx will again kfree it with another
call to put_ir_rx. Fix this by adding a new label that avoids
this 2nd call to put_ir_rx for this specific case.
Detected with CoverityScan, CID#145119 ("Use after free")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Joe Perches [Fri, 17 Feb 2017 07:11:35 +0000 (05:11 -0200)]
[media] drivers/media: Convert remaining use of pr_warning to pr_warn
To enable eventual removal of pr_warning
This makes pr_warn use consistent for drivers/media
Prior to this patch, there was 1 use of pr_warning and
310 uses of pr_warn in drivers/media
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Helen Koike [Fri, 7 Apr 2017 17:55:19 +0000 (14:55 -0300)]
[media] vimc: Virtual Media Controller core, capture and sensor
First version of the Virtual Media Controller.
Add a simple version of the core of the driver, the capture and
sensor nodes in the topology, generating a grey image in a hardcoded
format.
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[hans.verkuil@cisco.com: fix small typo in Kconfig]
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Ramiro Oliveira [Wed, 22 Mar 2017 12:30:27 +0000 (09:30 -0300)]
[media] media: i2c: Add support for OV5647 sensor
The OV5647 sensor from Omnivision supports up to 2592x1944 @ 15 fps, RAW 8
and RAW 10 output formats, and MIPI CSI-2 interface.
The driver adds support for 640x480 RAW 8.
Signed-off-by: Ramiro Oliveira <roliveir@synopsys.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Ramiro Oliveira [Wed, 22 Mar 2017 12:30:26 +0000 (09:30 -0300)]
[media] Documentation: DT: Add OV5647 bindings
Create device tree bindings documentation.
Signed-off-by: Ramiro Oliveira <roliveir@synopsys.com>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Todor Tomov [Tue, 11 Apr 2017 11:28:46 +0000 (08:28 -0300)]
[media] media: Add a driver for the ov5645 camera sensor
The ov5645 sensor from Omnivision supports up to 2592x1944
and CSI2 interface.
The driver adds support for the following modes:
- 1280x960
- 1920x1080
- 2592x1944
Output format is packed 8bit UYVY.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Todor Tomov [Tue, 11 Apr 2017 11:28:30 +0000 (08:28 -0300)]
[media] media: i2c/ov5645: add the device tree binding document
Add the document for ov5645 device tree binding.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Mon, 10 Apr 2017 19:18:06 +0000 (16:18 -0300)]
[media] vsp1: set V4L2_CTRL_FLAG_MODIFY_LAYOUT for histogram controls
The two histogram controls will modify the layout of the
metadata, so this flag should be set.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Mon, 10 Apr 2017 19:17:06 +0000 (16:17 -0300)]
[media] buffer.rst: clarify how V4L2_CTRL_FLAG_MODIFY_LAYOUT/GRABBER are used
Explain when the V4L2_CTRL_FLAG_MODIFY_LAYOUT and
V4L2_CTRL_FLAG_MODIFY_GRABBER flags should be used.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Mon, 10 Apr 2017 19:16:16 +0000 (16:16 -0300)]
[media] v4l2-ctrls.c: set V4L2_CTRL_FLAG_MODIFY_LAYOUT for ROTATE
The rotate control will modify the layout by definition. Always
set this flag.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Mon, 10 Apr 2017 19:15:26 +0000 (16:15 -0300)]
[media] videodev.h: add V4L2_CTRL_FLAG_MODIFY_LAYOUT
Add new flag to indicate that changing this control will change the
buffer/mediabus layout as well.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Mon, 10 Apr 2017 19:14:25 +0000 (16:14 -0300)]
[media] vidioc-queryctrl.rst: document V4L2_CTRL_FLAG_MODIFY_LAYOUT
Document this new control flag.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Niklas Söderlund [Tue, 6 Sep 2016 14:38:56 +0000 (11:38 -0300)]
[media] v4l: vsp1: Add HGT support
The HGT is a Histogram Generator Two-Dimensions. It computes a weighted
frequency histograms for hue and saturation areas over a configurable
region of the image with optional subsampling.
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Niklas Söderlund [Tue, 6 Sep 2016 14:38:55 +0000 (11:38 -0300)]
[media] v4l: Define a pixel format for the R-Car VSP1 2-D histogram engine
The format is used on the R-Car VSP1 video queues that carry
2-D histogram statistics data.
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Laurent Pinchart [Wed, 24 Feb 2016 23:40:22 +0000 (20:40 -0300)]
[media] v4l: vsp1: Add HGO support
The HGO is a Histogram Generator One-Dimension. It computes per-channel
histograms over a configurable region of the image with optional
subsampling.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Laurent Pinchart [Sun, 10 Apr 2016 07:37:48 +0000 (04:37 -0300)]
[media] v4l: Define a pixel format for the R-Car VSP1 1-D histogram engine
The format is used on the R-Car VSP1 video queues that carry
1-D histogram statistics data.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Laurent Pinchart [Wed, 7 Sep 2016 12:36:31 +0000 (09:36 -0300)]
[media] v4l: vsp1: Fix HGO and HGT routing register addresses
The addresses are incorrect, fix them.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Laurent Pinchart [Wed, 7 Sep 2016 12:09:53 +0000 (09:09 -0300)]
[media] v4l: vsp1: Support histogram generators in pipeline configuration
Histogram generators are single-pad entities that branch as leaf nodes
at any point in the pipeline. Make sure that pipeline traversal and
routing configuration support them correctly.
Support for the actual HGO and HGT operation will come later.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Laurent Pinchart [Wed, 7 Sep 2016 11:58:49 +0000 (08:58 -0300)]
[media] v4l: vsp1: Add histogram support
The histogram common code will be used to implement support for both the
HGO and HGT histogram computation engines.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Laurent Pinchart [Tue, 12 Apr 2016 22:40:46 +0000 (19:40 -0300)]
[media] v4l: Add metadata buffer type and format
The metadata buffer type is used to transfer metadata between userspace
and kernelspace through a V4L2 buffers queue. It comes with a new
metadata capture capability and format description.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
[hans.verkuil@cisco.com: removed left-over 'experimental' note]
[hans.verkuil@cisco.com: add newline after _v4l2-meta-format label]
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Laurent Pinchart [Mon, 20 Jun 2016 09:07:08 +0000 (06:07 -0300)]
[media] v4l: vsp1: wpf: Implement rotation support
Some WPF instances, on Gen3 devices, can perform 90° rotation when
writing frames to memory. Implement support for this using the
V4L2_CID_ROTATE control.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Laurent Pinchart [Sun, 26 Feb 2017 12:44:18 +0000 (09:44 -0300)]
[media] v4l: Clearly document interactions between formats, controls and buffers
V4L2 exposes parameters that influence buffers sizes through the format
ioctls (VIDIOC_G_FMT, VIDIOC_TRY_FMT, VIDIOC_S_FMT, and possibly
VIDIOC_G_SELECTION and VIDIOC_S_SELECTION). Other parameters not part of
the format structure may also influence buffer sizes or buffer layout in
general. One existing such parameter is rotation, which is implemented
by the V4L2_CID_ROTATE control and thus exposed through the V4L2 control
ioctls.
The interaction between those parameters and buffers is currently only
partially specified by the V4L2 API. In particular interactions between
controls and buffers isn't specified at all. The behaviour of the
VIDIOC_S_FMT and VIDIOC_S_SELECTION ioctls when buffers are allocated is
also not fully specified.
This patch clearly defines and documents the interactions between
formats, selections, controls and buffers.
The preparatory discussions for the documentation change considered
completely disallowing controls that change the buffer size or layout,
in favour of extending the format API with a new ioctl that would bundle
those controls with format information. The idea has been rejected, as
this would essentially be a restricted version of the upcoming request
API that wouldn't bring any additional value.
Another option we have considered was to mandate the use of the request
API to modify controls that influence buffer size or layout. This has
also been rejected on the grounds that requiring the request API to
change rotation even when streaming is stopped would significantly
complicate implementation of drivers and usage of the V4L2 API for
applications.
Applications will however be required to use the upcoming request API to
change at runtime formats or controls that influence the buffer size or
layout, because of the need to synchronize buffers with the formats and
controls. Otherwise there would be no way to interpret the content of a
buffer correctly.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Mon, 4 May 2015 10:25:51 +0000 (07:25 -0300)]
[media] ov2640: avoid calling ov2640_select_win() twice
Simplify ov2640_set_params and ov2640_set_fmt.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Mon, 4 May 2015 10:25:55 +0000 (07:25 -0300)]
[media] ov9740: avoid calling ov9740_res_roundup() twice
Simplify ov9740_s_fmt.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Mon, 4 May 2015 10:25:54 +0000 (07:25 -0300)]
[media] ov9640: avoid calling ov9640_res_roundup() twice
Simplify ov9640_s_fmt and ov9640_set_fmt
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Mon, 4 May 2015 10:25:53 +0000 (07:25 -0300)]
[media] ov772x: avoid calling ov772x_select_params() twice
Merge ov772x_s_fmt into ov772x_set_fmt.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Mon, 4 May 2015 10:25:52 +0000 (07:25 -0300)]
[media] ov5642: avoid calling ov5642_find_datafmt() twice
Simplify ov5642_set_fmt().
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Mon, 4 May 2015 10:25:50 +0000 (07:25 -0300)]
[media] mt9v022: avoid calling mt9v022_find_datafmt() twice
Simplify mt9v022_s_fmt and mt9v022_set_fmt.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Mon, 4 May 2015 10:25:49 +0000 (07:25 -0300)]
[media] mt9m001: avoid calling mt9m001_find_datafmt() twice
Simplify mt9m001_s_fmt and mt9m001_set_fmt.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Mon, 4 May 2015 10:25:48 +0000 (07:25 -0300)]
[media] imx074: avoid calling imx074_find_datafmt() twice
Simplify imx074_set_fmt().
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Stefan Brüns [Fri, 17 Feb 2017 00:55:31 +0000 (22:55 -0200)]
[media] si2157: Add support for Si2141-A10
The Si2141 needs two distinct commands for powerup/reset, otherwise it
will not respond to chip revision requests. It also needs a firmware
to run properly.
Cc: Evgeny Plehov <EvgenyPlehov@ukr.net>
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Antti Palosaari [Thu, 6 Apr 2017 12:17:42 +0000 (09:17 -0300)]
[media] si2157: revert si2157: Si2141/2151 tuner support
'Reset' loop does not look correct. I tested it very many times and
it never repeated those commands. If problem, it tries to solve,
really occurs on some situations better solution should be find out.
There is another patch which does not have such hackish looking loop.
Lets change to it.
Cc: Evgeny Plehov <EvgenyPlehov@ukr.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Mon, 10 Apr 2017 07:54:30 +0000 (04:54 -0300)]
[media] v4l2-tpg: don't clamp XV601/709 to lim range
The XV601/709 encodings are special: they signal limited range, but use the full range
to encode a larger gamut with R', G' and B' values outside the [0-1] range.
So don't clamp to limited range for these two encodings.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Mon, 10 Apr 2017 07:51:44 +0000 (04:51 -0300)]
[media] videodev2.h: fix outdated comment
The XV601/709 Y'CbCr encoding was changed to limited range, but the comment
still indicates full range.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Geliang Tang [Sun, 9 Apr 2017 01:34:08 +0000 (22:34 -0300)]
[media] imon: use setup_timer
Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Geliang Tang [Sun, 9 Apr 2017 01:34:07 +0000 (22:34 -0300)]
[media] wl128x: use setup_timer
Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Geliang Tang [Sun, 9 Apr 2017 01:34:06 +0000 (22:34 -0300)]
[media] c8sectpfe: use setup_timer
Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Geliang Tang [Sun, 9 Apr 2017 01:34:04 +0000 (22:34 -0300)]
[media] fsl-viu: use setup_timer
Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Geliang Tang [Sun, 9 Apr 2017 01:34:03 +0000 (22:34 -0300)]
[media] av7110: use setup_timer
Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Geliang Tang [Sun, 9 Apr 2017 01:34:02 +0000 (22:34 -0300)]
[media] netup_unidvb: use setup_timer
Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Geliang Tang [Sun, 9 Apr 2017 01:34:01 +0000 (22:34 -0300)]
[media] ivtv: use setup_timer
Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Geliang Tang [Sun, 9 Apr 2017 01:34:00 +0000 (22:34 -0300)]
[media] cx18: use setup_timer
Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Geliang Tang [Sun, 9 Apr 2017 01:33:59 +0000 (22:33 -0300)]
[media] bt8xx: use setup_timer
Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Geliang Tang [Sun, 9 Apr 2017 01:33:58 +0000 (22:33 -0300)]
[media] saa7146: use setup_timer
Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Geliang Tang [Sun, 9 Apr 2017 01:33:57 +0000 (22:33 -0300)]
[media] saa7134: use setup_timer
Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Nikola Jelic [Sat, 8 Apr 2017 15:44:41 +0000 (12:44 -0300)]
[media] media: bcm2048: fix several macros
Some of the macros didn't use the parenthesis around the parameters when
used in the body of the macro.
Signed-off-by: Nikola Jelic <nikola.jelic83@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Alexey Khoroshilov [Fri, 7 Apr 2017 23:09:17 +0000 (20:09 -0300)]
[media] m2m-deinterlace: don't return zero on failure paths in deinterlace_probe()
If DMA does not support INTERLEAVE, deinterlace_probe() breaks off
initialization, releases dma channel, but returns zero.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Philipp Zabel [Thu, 6 Apr 2017 14:03:40 +0000 (11:03 -0300)]
[media] coda: do not enumerate YUYV if VDOA is not available
TRY_FMT already disables the YUYV format if the VDOA is not available.
ENUM_FMT must do the same.
Fixes:
d40e98c13b3e ("[media] coda: support YUYV output if VDOA is used")
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Philipp Zabel [Fri, 31 Mar 2017 13:33:26 +0000 (10:33 -0300)]
[media] tvp5150: fix pad format frame height
Even if field order is set to V4L2_FIELD_ALTERNATE, the width and height
values in struct v4l2_mbus_framefmt still refer to frame size, not field
size.
Fixes:
4f57d27be2a5 ("[media] tvp5150: fix tvp5150_fill_fmt()")
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Philipp Zabel [Fri, 31 Mar 2017 13:33:25 +0000 (10:33 -0300)]
[media] tvp5150: allow get/set_fmt on the video source pad
To let userspace propagate formats downstream in a media controller
scenario, the video source pad (now pad 1, DEMOD_PAD_VID_OUT) must allow
setting and getting the format. Incidentally, tvp5150_fill_fmt was
implemented for this pad, not for the new analog input pad (now pad 0,
DEMOD_PAD_IF_INPUT).
Fixes:
55606310e77f ("[media] tvp5150: create the expected number of pads")
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Colin Ian King [Thu, 23 Mar 2017 11:57:46 +0000 (08:57 -0300)]
[media] coda: remove redundant call to v4l2_m2m_get_vq
The call to v4ls_m2m_get_vq is only used to get the return value
which is not being used, so it appears to be redundant and can
be removed.
Detected with CoverityScan, CID#
1420674 ("Useless call")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Thu, 24 Nov 2016 07:49:35 +0000 (05:49 -0200)]
[media] em28xx: drop last soc_camera link
The em28xx driver still used the soc_camera.h header for the ov2640
driver. Since this driver no longer uses soc_camera, that include can
be removed.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Mon, 30 Jan 2017 13:50:45 +0000 (11:50 -0200)]
[media] ov2640: add MC support
The MC support is needed by the em28xx driver.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Thu, 24 Nov 2016 07:41:42 +0000 (05:41 -0200)]
[media] ov2640: use standard clk and enable it
Convert v4l2_clk to normal clk and enable the clock.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Hugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Tue, 22 Nov 2016 16:44:37 +0000 (14:44 -0200)]
[media] ov2640: convert from soc-camera to a standard subdev sensor driver
Convert ov2640 to a standard subdev driver. The soc-camera driver no longer
uses this driver, so it can safely be converted.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Hugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Tue, 4 Apr 2017 16:43:33 +0000 (13:43 -0300)]
[media] cec: fix confusing CEC_CAP_RC and IS_REACHABLE(CONFIG_RC_CORE) code
It is a bit confusing how CEC_CAP_RC and IS_REACHABLE(CONFIG_RC_CORE)
interact. By stripping CEC_CAP_RC at the beginning rather than after #else
it should be a bit clearer what is going on.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Lee Jones [Tue, 4 Apr 2017 12:32:19 +0000 (09:32 -0300)]
[media] cec: Fix runtime BUG when (CONFIG_RC_CORE && !CEC_CAP_RC)
Currently when the RC Core is enabled (reachable) core code located
in cec_register_adapter() attempts to populate the RC structure with
a pointer to the 'parent' passed in by the caller.
Unfortunately if the caller did not specify RC capability when calling
cec_allocate_adapter(), then there will be no RC structure to populate.
This causes a "NULL pointer dereference" error.
Fixes:
f51e80804f0 ("[media] cec: pass parent device in register(), not allocate()")
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Cc: <stable@vger.kernel.org> # for v4.10 and up
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Tue, 13 Dec 2016 14:37:16 +0000 (12:37 -0200)]
[media] s5p-cec: add cec-notifier support, move out of staging
By using the CEC notifier framework there is no longer any reason
to manually set the physical address. This was the one blocking
issue that prevented this driver from going out of staging, so do
this move as well.
Update the bindings documenting the new hdmi phandle and
update exynos4.dtsi accordingly.
Tested with my Odroid U3.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
CC: linux-samsung-soc@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Tue, 13 Dec 2016 14:37:16 +0000 (12:37 -0200)]
[media] s5p-cec.txt: document the HDMI controller phandle
Update the bindings documenting the new hdmi phandle.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
CC: linux-samsung-soc@vger.kernel.org
CC: devicetree@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Tue, 13 Dec 2016 14:37:16 +0000 (12:37 -0200)]
[media] ARM: dts: exynos: add HDMI controller phandle to exynos4.dtsi
Add the new hdmi phandle to exynos4.dtsi. This phandle is needed by the
s5p-cec driver to initialize the CEC notifier framework.
Tested with my Odroid U3.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
CC: linux-samsung-soc@vger.kernel.org
CC: devicetree@vger.kernel.org
CC: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>