OSDN Git Service

uclinux-h8/linux.git
9 years ago[media] DocBook media: improve V4L2_DV_FL_HALF_LINE documentation
Hans Verkuil [Fri, 20 Mar 2015 17:05:02 +0000 (14:05 -0300)]
[media] DocBook media: improve V4L2_DV_FL_HALF_LINE documentation

Explicitly specify where the half-line is added or removed in
each field.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Prashant Laddha <prladdha@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid-tpg.c: fix wrong Bt.2020 coefficients
Hans Verkuil [Fri, 20 Mar 2015 16:23:06 +0000 (13:23 -0300)]
[media] vivid-tpg.c: fix wrong Bt.2020 coefficients

Mistyping 0.2627 as 0.2726 I can understand, but -0.4598 as -0.4629? No idea how
I managed that. Anyway, these coefficients are now correct again.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook media: fix BT.2020 description
Hans Verkuil [Thu, 19 Mar 2015 14:31:10 +0000 (11:31 -0300)]
[media] DocBook media: fix BT.2020 description

One number was wrong (0.6789 -> 0.6780) and Y' should have been Yc'.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook media: improve event documentation
Hans Verkuil [Wed, 18 Mar 2015 10:05:31 +0000 (07:05 -0300)]
[media] DocBook media: improve event documentation

It always annoyed me that the event type documentation was separate from the struct
v4l2_event documentation. This patch moves it all to one place, VIDIOC_DQEVENT.

This makes much more sense.

Also changed the 'changes-flags' ref to 'ctrl-changes-flags' since this referred to
control changes. There is a src-changes-flags as well, so 'changes-flags' was a bit
vague.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] smiapp: Read link-frequencies property from the endpoint node
Sakari Ailus [Mon, 9 Mar 2015 21:46:32 +0000 (18:46 -0300)]
[media] smiapp: Read link-frequencies property from the endpoint node

The documentation stated that the link-frequencies property belongs to the
endpoint node, not to the device's of_node. Fix this.

There are no DT board descriptions using the driver yet, so a fix in the
driver is sufficient.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] mn88473: implement lock for all delivery systems
Benjamin Larsson [Sat, 21 Mar 2015 10:18:07 +0000 (07:18 -0300)]
[media] mn88473: implement lock for all delivery systems

Add capability to check if digital TV has lock for all delivery
systems.

Signed-off-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] mn88472: define symbol rate limits
Antti Palosaari [Mon, 16 Mar 2015 22:01:53 +0000 (19:01 -0300)]
[media] mn88472: 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

Lets add some reasonable limits in order to keep w_scan happy :)

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] mn88473: define symbol rate limits
Antti Palosaari [Mon, 16 Mar 2015 21:56:21 +0000 (18:56 -0300)]
[media] mn88473: 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

Lets add some reasonable limits in order to keep w_scan happy :)

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] mn88472: check if firmware is already running before loading it
Benjamin Larsson [Sun, 15 Mar 2015 22:57:54 +0000 (19:57 -0300)]
[media] mn88472: check if firmware is already running before loading it

Signed-off-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] mn88473: check if firmware is already running before loading it
Benjamin Larsson [Sun, 15 Mar 2015 22:57:53 +0000 (19:57 -0300)]
[media] mn88473: check if firmware is already running before loading it

Signed-off-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] mn88473: implement firmware parity check
Benjamin Larsson [Sun, 15 Mar 2015 22:57:52 +0000 (19:57 -0300)]
[media] mn88473: implement firmware parity check

Signed-off-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] mn88472: implement firmware parity check
Benjamin Larsson [Sun, 15 Mar 2015 22:57:51 +0000 (19:57 -0300)]
[media] mn88472: implement firmware parity check

Signed-off-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] mn88472: implement lock for all delivery systems
Benjamin Larsson [Sun, 15 Mar 2015 22:57:50 +0000 (19:57 -0300)]
[media] mn88472: implement lock for all delivery systems

The increase of the lock timeout is needed for dvb-t2.

Signed-off-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: lower the rc poll time to mitigate i2c transfer errors
Benjamin Larsson [Sun, 15 Mar 2015 22:57:48 +0000 (19:57 -0300)]
[media] rtl28xxu: lower the rc poll time to mitigate i2c transfer errors

The Astrometa device has issues with i2c transfers. Lowering the
poll time somehow makes these errors disappear.

Signed-off-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] r820t: change read_gain() code to match register layout
Benjamin Larsson [Sun, 15 Mar 2015 22:57:47 +0000 (19:57 -0300)]
[media] r820t: change read_gain() code to match register layout

Signed-off-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] r820t: add DVBC profile in sysfreq_sel
Benjamin Larsson [Sun, 15 Mar 2015 22:57:46 +0000 (19:57 -0300)]
[media] r820t: add DVBC profile in sysfreq_sel

This will make the Astrometa DVB-T/T2/C usb stick be able to pick up
muxes around 290-314 MHz.

Signed-off-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] v4l: mt9v032: Add OF support
Laurent Pinchart [Wed, 1 Jan 2014 17:40:35 +0000 (14:40 -0300)]
[media] v4l: mt9v032: Add OF support

Parse DT properties into a platform data structure when a DT node is
available.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] of: Add vendor prefix for Aptina Imaging
Laurent Pinchart [Thu, 12 Mar 2015 23:53:51 +0000 (20:53 -0300)]
[media] of: Add vendor prefix for Aptina Imaging

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l: mt9v032: Consider control initialization errors as fatal
Laurent Pinchart [Wed, 1 Jan 2014 17:40:35 +0000 (14:40 -0300)]
[media] v4l: mt9v032: Consider control initialization errors as fatal

The device requires control to be properly operated, they're not
optional.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l: mt9p031: Convert to the gpiod API
Laurent Pinchart [Sat, 20 Sep 2014 21:38:56 +0000 (18:38 -0300)]
[media] v4l: mt9p031: Convert to the gpiod API

This simplifies platform data and DT integration.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: i2c: mt9p031: add support for asynchronous probing
Lad, Prabhakar [Fri, 27 Feb 2015 16:10:19 +0000 (13:10 -0300)]
[media] media: i2c: mt9p031: add support for asynchronous probing

Both synchronous and asynchronous mt9p031 subdevice probing
is supported by this patch.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: i2c: mt9p031: make sure we destroy the mutex
Lad, Prabhakar [Thu, 26 Feb 2015 18:05:38 +0000 (15:05 -0300)]
[media] media: i2c: mt9p031: make sure we destroy the mutex

Make sure to call mutex_destroy() in case of probe failure or module
unload.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] mt9p031: fixed calculation of clk_div
Enrico Scholz [Wed, 4 Feb 2015 14:53:32 +0000 (11:53 -0300)]
[media] mt9p031: fixed calculation of clk_div

There must be used 'min_t', not 'max_t' for calculating the divider.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] staging: media: omap4iss: video: Don't WARN() on unknown pixel formats
Laurent Pinchart [Tue, 3 Mar 2015 11:08:42 +0000 (08:08 -0300)]
[media] staging: media: omap4iss: video: Don't WARN() on unknown pixel formats

When mapping from a V4L2 pixel format to a media bus format in the
VIDIOC_TRY_FMT and VIDIOC_S_FMT handlers, the requested format may be
unsupported by the driver. Return a hardcoded default format instead of
WARN()ing in that case.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] staging: media: omap4iss: Cleanup media entities after unregistration
Laurent Pinchart [Thu, 11 Dec 2014 13:23:57 +0000 (10:23 -0300)]
[media] staging: media: omap4iss: Cleanup media entities after unregistration

The ipipeif, ipipe and resizer media entities are cleaned up before
unregistering the media device, creating a race condition. Fix it by
cleaning them up at cleanup time.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] add raw video stream support for Samsung SUR40
Florian Echtler [Mon, 16 Mar 2015 09:48:23 +0000 (06:48 -0300)]
[media] add raw video stream support for Samsung SUR40

This patch adds raw video support for the Samsung SUR40 using vbuf2-dma-sg.
All tests from v4l2-compliance pass. Support for VB2_USERPTR is currently
disabled due to unexpected interference with dma-sg buffer sizes.

Signed-off-by: Florian Echtler <floe@butterbrot.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[hans.verkuil@cisco.com: fix compile warning: %ld -> %zd]

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook media: fix awkward language in VIDIOC_QUERYCAP
Hans Verkuil [Sun, 15 Mar 2015 20:54:30 +0000 (17:54 -0300)]
[media] DocBook media: fix awkward language in VIDIOC_QUERYCAP

Fix some awkward language in the VIDIOC_QUERYCAP description.

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@osg.samsung.com>
9 years ago[media] DocBook media: fix VIDIOC_CROPCAP type description
Hans Verkuil [Sun, 15 Mar 2015 20:51:54 +0000 (17:51 -0300)]
[media] DocBook media: fix VIDIOC_CROPCAP type description

The type field of VIDIOC_CROPCAP does not allow the MPLANE variants, just
as all the other crop/selection related ioctls.

Fix the description of CROPCAP and G_CROP and make the text describing
this consistent for all selection ioctls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: sanitize selection rectangle
Hans Verkuil [Sun, 15 Mar 2015 16:40:04 +0000 (13:40 -0300)]
[media] vivid: sanitize selection rectangle

Handle values like ~0 as width, height, left or top fields.
Just strip off the top 16 bits will ensure that the calculations
remain OK.

Found with v4l2-compliance.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: report only one frameinterval
Hans Verkuil [Fri, 13 Mar 2015 16:22:07 +0000 (13:22 -0300)]
[media] vivid: report only one frameinterval

The vivid driver reports a range of frame intervals for non-webcams, when in fact
the frame interval is fixed for those inputs as it depends on the DV timings or
standard. Just report the single discrete frame interval instead.

Caught by v4l2-compliance.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: allow s_dv_timings if it is the same as the current
Hans Verkuil [Sat, 14 Mar 2015 12:35:23 +0000 (09:35 -0300)]
[media] vivid: allow s_dv_timings if it is the same as the current

Allow setting the same timings as the current timings (i.e., do nothing in that
case). The code was actually there, but the vb2_is_busy() call was done before
the timings check instead of afterwards.

Found by v4l2-compliance.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: add support for 8-bit Bayer formats
Hans Verkuil [Sat, 14 Mar 2015 11:01:50 +0000 (08:01 -0300)]
[media] vivid: add support for 8-bit Bayer formats

Add support for: PIX_FMT_SBGGR8, SGBRG8, SGRBG8 and SRGGB8.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: use v4l2_device.release to clean up the driver
Hans Verkuil [Fri, 13 Mar 2015 10:41:05 +0000 (07:41 -0300)]
[media] vivid: use v4l2_device.release to clean up the driver

Use the release callback of the v4l2_device to clean up the memory.
This prevents vivid from breaking if someone tries to unbind the
driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: turn this into a platform_device
Hans Verkuil [Fri, 13 Mar 2015 08:40:37 +0000 (05:40 -0300)]
[media] vivid: turn this into a platform_device

This turns this driver into a platform device. This ensures that it
appears in /sys/bus/platform_device since it now has a proper parent
device.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: add support for packed YUV formats
Hans Verkuil [Fri, 13 Mar 2015 09:35:40 +0000 (06:35 -0300)]
[media] vivid: add support for packed YUV formats

Add support for the packed YUV formats YUV444, YUV555, YUV565 and YUV32.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: add support for BGR666
Hans Verkuil [Fri, 13 Mar 2015 08:36:08 +0000 (05:36 -0300)]
[media] vivid: add support for BGR666

Add support for the four byte BGR666 format.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook media: clarify BGR666
Hans Verkuil [Fri, 13 Mar 2015 10:54:12 +0000 (07:54 -0300)]
[media] DocBook media: clarify BGR666

The documentation is not clear whether this is a three or four byte
format. Clarify this.

Also move the BGR666 format to the other 32 bit formats.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: add support for PIX_FMT_RGB332
Hans Verkuil [Thu, 12 Mar 2015 18:40:36 +0000 (15:40 -0300)]
[media] vivid: add support for PIX_FMT_RGB332

Add support for the one-byte-per-pixel RGB332 format.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: add support for NV24 and NV42
Hans Verkuil [Fri, 13 Mar 2015 08:51:21 +0000 (05:51 -0300)]
[media] vivid: add support for NV24 and NV42

Add support for the YUV 4:4:4 formats NV24 and NV42.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: add support for [A|X]RGB555X
Hans Verkuil [Thu, 12 Mar 2015 08:08:01 +0000 (05:08 -0300)]
[media] vivid: add support for [A|X]RGB555X

Only RGB555X was supported, add support for the other two variants.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: fix format comments
Hans Verkuil [Wed, 11 Mar 2015 11:16:03 +0000 (08:16 -0300)]
[media] vivid: fix format comments

Clarify which formats have an alpha channel and which do not by
using 'x' instead of 'a' if there is no alpha channel.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: add RGB444 support
Hans Verkuil [Wed, 11 Mar 2015 11:14:34 +0000 (08:14 -0300)]
[media] vivid: add RGB444 support

Add support for (A/X)RGB444 formats.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: add the new planar and monochrome formats
Hans Verkuil [Mon, 9 Mar 2015 13:37:52 +0000 (10:37 -0300)]
[media] vivid: add the new planar and monochrome formats

Everything is in place to support these formats, so add them to
the list.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: add downsampling support
Hans Verkuil [Mon, 9 Mar 2015 15:06:27 +0000 (12:06 -0300)]
[media] vivid: add downsampling support

Add support in vivid for downsampling. Most of the changes are in
vivid_copy_buffer which needs to know about the right line widths.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: add support for single buffer planar formats
Hans Verkuil [Mon, 9 Mar 2015 15:03:52 +0000 (12:03 -0300)]
[media] vivid: add support for single buffer planar formats

Make vivid aware of the difference of planes and buffers. Note that
this does not yet add support for hor/vert downsampled formats.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: add new format fields
Hans Verkuil [Sat, 7 Mar 2015 18:04:49 +0000 (15:04 -0300)]
[media] vivid: add new format fields

These fields are necessary to handle the new planar formats.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid-tpg: split off the pattern drawing code
Hans Verkuil [Mon, 9 Mar 2015 14:52:43 +0000 (11:52 -0300)]
[media] vivid-tpg: split off the pattern drawing code

The last part of the vivid-tpg refactoring: split off the pattern
drawing code into a function of its own. This greatly improves the
readability and maintainability of this code.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid-tpg: move the 'extras' drawing to a separate function
Hans Verkuil [Mon, 9 Mar 2015 14:47:48 +0000 (11:47 -0300)]
[media] vivid-tpg: move the 'extras' drawing to a separate function

This moves the drawing code for the extras (border, square, etc) to
a function of its own instead of having this in the main for loop.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid-tpg: move 'extras' parameters to tpg_draw_params
Hans Verkuil [Mon, 9 Mar 2015 14:39:19 +0000 (11:39 -0300)]
[media] vivid-tpg: move 'extras' parameters to tpg_draw_params

Any parameters related to drawing 'extras' like the border, the square,
etc. are moved to struct tpg_draw_params.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid-tpg: move pattern-related fields to struct tpg_draw_params
Hans Verkuil [Mon, 9 Mar 2015 14:30:05 +0000 (11:30 -0300)]
[media] vivid-tpg: move pattern-related fields to struct tpg_draw_params

Add a new function that fills in pattern-related fields in struct
tpg_draw_params.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid-tpg: move common parameters to tpg_draw_params
Hans Verkuil [Mon, 9 Mar 2015 14:26:43 +0000 (11:26 -0300)]
[media] vivid-tpg: move common parameters to tpg_draw_params

Replace local variables by fields in the tpg_draw_params struct.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid-tpg: add a new tpg_draw_params structure
Hans Verkuil [Mon, 9 Mar 2015 14:07:23 +0000 (11:07 -0300)]
[media] vivid-tpg: add a new tpg_draw_params structure

This is needed to refactor the drawing function which is much too big.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid-tpg: add const where appropriate
Hans Verkuil [Mon, 9 Mar 2015 14:04:02 +0000 (11:04 -0300)]
[media] vivid-tpg: add const where appropriate

Added 'const' to several functions where that is possible to do.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid-tpg: add helper functions to simplify common calculations
Hans Verkuil [Sun, 8 Mar 2015 08:53:10 +0000 (05:53 -0300)]
[media] vivid-tpg: add helper functions to simplify common calculations

Add helper functions to handle horizontal downscaling and horizontal
scaling.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid-tpg: add support for V4L2_PIX_FMT_GREY
Hans Verkuil [Sat, 7 Mar 2015 17:57:50 +0000 (14:57 -0300)]
[media] vivid-tpg: add support for V4L2_PIX_FMT_GREY

Add monochrome support to the TPG.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid-tpg: add support for more planar formats
Hans Verkuil [Sat, 7 Mar 2015 17:55:09 +0000 (14:55 -0300)]
[media] vivid-tpg: add support for more planar formats

Now that the support for hor/vert downsampled planar formats is in
place we can add support for such formats to the TPG.

This patch adds support for:

V4L2_PIX_FMT_YUV420M
V4L2_PIX_FMT_YVU420M
V4L2_PIX_FMT_YUV420
V4L2_PIX_FMT_YVU420
V4L2_PIX_FMT_YUV422P
V4L2_PIX_FMT_NV16
V4L2_PIX_FMT_NV61
V4L2_PIX_FMT_NV12
V4L2_PIX_FMT_NV21
V4L2_PIX_FMT_NV12P
V4L2_PIX_FMT_NV21P

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid-tpg: finish hor/vert downsampling support
Hans Verkuil [Sat, 7 Mar 2015 17:50:41 +0000 (14:50 -0300)]
[media] vivid-tpg: finish hor/vert downsampling support

Implement horizontal and vertical downsampling when filling in the
plane. The TPG is now ready to support such formats.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid-tpg: add hor/vert downsampling support to tpg_gen_text
Hans Verkuil [Sat, 7 Mar 2015 17:23:16 +0000 (14:23 -0300)]
[media] vivid-tpg: add hor/vert downsampling support to tpg_gen_text

This will just skip lines/pixels since color fidelity is not quite
as important here as it is with the test patterns themselves.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid-tpg: correctly average the two pixels in gen_twopix()
Hans Verkuil [Sat, 7 Mar 2015 17:15:25 +0000 (14:15 -0300)]
[media] vivid-tpg: correctly average the two pixels in gen_twopix()

gen_twopix() is always called twice: once for the first and once for
the second pixel. Improve the code to properly average the two if the
format requires horizontal downsampling.

This is necessary for patterns like 1x1 red/blue checkers.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid-tpg: precalculate downsampled lines
Hans Verkuil [Sat, 7 Mar 2015 17:06:43 +0000 (14:06 -0300)]
[media] vivid-tpg: precalculate downsampled lines

When dealing with vertical downsampling two successive lines have to be
averaged. In the case of the test pattern generator that only happens
if the two lines are using different patterns. So precalculate the average
between two pattern lines: one of pattern P and one of pattern P + 1.

That way there is no need to do any on-the-fly downsampling: it's all done
in the precalculate phase.

This patch also implements horizontal downsampling in the precalculate phase.
The only thing that needs to be done is to half the width since the actual
downsampling happens when two pixels at a time are generated.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid-tpg: add hor/vert downsampling fields
Hans Verkuil [Sat, 7 Mar 2015 16:57:27 +0000 (13:57 -0300)]
[media] vivid-tpg: add hor/vert downsampling fields

This is step one of supporting horizontal and vertical downsampling.
This just adds support for the h/vdownsampling fields and it increases
the maximum number of planes to 3.

Currently none of the planar formats need horizontal or vertical
downsampling, so this change has no effect at the moment.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid-tpg: add helper functions for single buffer planar formats
Hans Verkuil [Sat, 7 Mar 2015 16:39:01 +0000 (13:39 -0300)]
[media] vivid-tpg: add helper functions for single buffer planar formats

Add helpers functions to determine the line widths and image sizes
for planar formats that are stores in a single buffer.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid-tpg: separate planes and buffers
Hans Verkuil [Sat, 7 Mar 2015 16:01:53 +0000 (13:01 -0300)]
[media] vivid-tpg: separate planes and buffers

Add a new field that contains the number of buffers. This may be
less than the number of planes in case multiple planes are combined
into one buffer.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: do not allow video loopback for SEQ_TB/BT
Hans Verkuil [Mon, 9 Mar 2015 13:06:55 +0000 (10:06 -0300)]
[media] vivid: do not allow video loopback for SEQ_TB/BT

Sequential top-bottom/bottom-top fields are not supported as video loopback.
This is too much work to implement for field settings that are rarely used.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid-tpg: don't add offset when switching to monochrome
Hans Verkuil [Sat, 7 Mar 2015 15:53:39 +0000 (12:53 -0300)]
[media] vivid-tpg: don't add offset when switching to monochrome

The grayscale values are still full range sRGB, so don't add the
limited range offset.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: add new checkboard patterns
Hans Verkuil [Sat, 7 Mar 2015 15:49:57 +0000 (12:49 -0300)]
[media] vivid: add new checkboard patterns

Add a 2x2 checker patterns and 1x1 and 2x2 red/blue checker patterns.

Useful for testing 4:2:2 and 4:2:0 formats.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: fix test pattern movement for V4L2_FIELD_ALTERNATE
Hans Verkuil [Sat, 7 Mar 2015 15:38:42 +0000 (12:38 -0300)]
[media] vivid: fix test pattern movement for V4L2_FIELD_ALTERNATE

The successive TOP/BOTTOM fields did not move as they should: only
every other field actually changed position.

The cause was that the tpg needs to know if it is dealing with a
FIELD_ALTERNATE case since that requires slightly different handling.

So tell the TPG whether or not the field setting is for the ALTERNATE
case or not.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: use TPG_MAX_PLANES instead of hardcoding plane-arrays
Hans Verkuil [Sat, 7 Mar 2015 15:30:43 +0000 (12:30 -0300)]
[media] vivid: use TPG_MAX_PLANES instead of hardcoding plane-arrays

Two arrays of size 'max number of planes' have a hardcoded size instead
of using TPG_MAX_PLANES. Fix that, since TPG_MAX_PLANES will be increased
later on.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: wrong top/bottom order for FIELD_ALTERNATE
Hans Verkuil [Fri, 6 Mar 2015 14:24:04 +0000 (11:24 -0300)]
[media] vivid: wrong top/bottom order for FIELD_ALTERNATE

The condition to decide whether the current field is top or bottom
was inverted. Fix this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: fix typo in plane size checks
Hans Verkuil [Sat, 7 Mar 2015 15:19:36 +0000 (12:19 -0300)]
[media] vivid: fix typo in plane size checks

The plane size check was hardcoded to plane 0 instead of using the plane
index.

This failed when using the NV61M format which has a larger plane size for
the second plane compared to the first plane.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: the overlay API wasn't disabled completely for multiplanar
Hans Verkuil [Mon, 9 Mar 2015 15:34:32 +0000 (12:34 -0300)]
[media] vivid: the overlay API wasn't disabled completely for multiplanar

If the vivid driver is loaded in multiplanar mode, then the capture overlay
functionality should be disabled. This wasn't fully done, which led to
v4l2-compliance errors.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rcar-vin: Don't implement empty optional clock operations
Laurent Pinchart [Mon, 9 Mar 2015 06:39:35 +0000 (03:39 -0300)]
[media] rcar-vin: Don't implement empty optional clock operations

The clock_start and clock_stop operations are now optional, don't
implement empty stubs.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] soc-camera: Make clock_start and clock_stop operations optional
Laurent Pinchart [Mon, 9 Mar 2015 06:39:34 +0000 (03:39 -0300)]
[media] soc-camera: Make clock_start and clock_stop operations optional

Instead of forcing drivers to implement empty clock operations, make
them optional.

v4l2 clock registration in the soc-camera core should probably be
conditionned on the availability of those operations, but careful
review and/or testing of all drivers would be needed, so that should be
a separate step.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] soc-camera: Unregister v4l2 clock in the OF bind error path
Laurent Pinchart [Mon, 9 Mar 2015 06:39:33 +0000 (03:39 -0300)]
[media] soc-camera: Unregister v4l2 clock in the OF bind error path

The v4l2 clock registered in soc_of_bind() must be unregistered if an
error occurs and makes the function fail.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: ov2640: add primary dt support
Josh Wu [Tue, 10 Feb 2015 09:31:35 +0000 (06:31 -0300)]
[media] media: ov2640: add primary dt support

Add device tree support for ov2640.
In device tree, user needs to provide the master clock (xvclk).
User can add the reset/pwdn pins if they have.

Cc: devicetree@vger.kernel.org
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: ov2640: dt: add the device tree binding document
Josh Wu [Tue, 10 Feb 2015 09:31:36 +0000 (06:31 -0300)]
[media] media: ov2640: dt: add the device tree binding document

Add the document for ov2640 dt.

Cc: devicetree@vger.kernel.org
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: ov2640: add async probe function
Josh Wu [Mon, 2 Mar 2015 01:52:38 +0000 (22:52 -0300)]
[media] media: ov2640: add async probe function

In async probe, there is a case that ov2640 is probed before the
host device which provided 'mclk'.
To support this async probe, we will get 'mclk' at first in the probe(),
if failed it will return -EPROBE_DEFER. That will let ov2640 wait for
the host device probed.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: soc-camera: use icd->control instead of icd->pdev for reset()
Josh Wu [Tue, 10 Feb 2015 09:31:33 +0000 (06:31 -0300)]
[media] media: soc-camera: use icd->control instead of icd->pdev for reset()

icd->control is the sub device dev, i.e. i2c device.
icd->pdev is the soc camera device's device.

To be consitent with power() function, we will call reset() with
icd->control as well.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] V4L: add CCF support to the v4l2_clk API
Guennadi Liakhovetski [Sun, 1 Feb 2015 11:12:33 +0000 (08:12 -0300)]
[media] V4L: add CCF support to the v4l2_clk API

V4L2 clocks, e.g. used by camera sensors for their master clock, do not
have to be supplied by a different V4L2 driver, they can also be
supplied by an independent source. In this case the standart kernel
clock API should be used to handle such clocks. This patch adds support
for such cases.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] V4L: remove clock name from v4l2_clk API
Guennadi Liakhovetski [Sat, 31 Jan 2015 23:21:32 +0000 (20:21 -0300)]
[media] V4L: remove clock name from v4l2_clk API

All uses of the v4l2_clk API so far only register one clock with a fixed
name. This allows us to get rid of it, which also will make CCF and DT
integration easier.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l2-ioctl: allow all controls if ctrl_class == 0
Hans Verkuil [Sat, 14 Mar 2015 16:28:25 +0000 (13:28 -0300)]
[media] v4l2-ioctl: allow all controls if ctrl_class == 0

The check_ext_ctrls() function in v4l2-ioctl.c checks if all controls in the
control array are from the same control class as c->ctrl_class. However,
that check should only be done if c->ctrl_class != 0. A 0 value means
that this restriction does not apply.

So return 1 (OK) if c->ctrl_class == 0.

Found by running v4l2-compliance on the uvc 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@osg.samsung.com>
9 years ago[media] v4l2-dev: disable selection ioctls for non-video devices
Hans Verkuil [Fri, 13 Mar 2015 16:25:53 +0000 (13:25 -0300)]
[media] v4l2-dev: disable selection ioctls for non-video devices

The selection/cropping ioctls are only valid for video nodes, not for vbi.

Found by v4l2-compliance when run on a VBI device node.

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@osg.samsung.com>
9 years ago[media] au0828: fix broken streaming
Hans Verkuil [Fri, 13 Mar 2015 13:41:39 +0000 (10:41 -0300)]
[media] au0828: fix broken streaming

Commit c5036d61e0bed3f4f51391a145638b426825e69c ("media: au0828: drop
vbi_buffer_filled() and re-use buffer_filled()") broke video and vbi streaming.

The vb2_buffer struct was copied instead of taking a pointer to it, but
vb2_buffer_done() needs the real object, not a copy, since it is hooking
the buffer into a different list.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook media: fix PIX_FMT_SGRBR8 example
Hans Verkuil [Fri, 13 Mar 2015 11:00:05 +0000 (08:00 -0300)]
[media] DocBook media: fix PIX_FMT_SGRBR8 example

Fix the example of the V4L2_PIX_FMT_SGRBG8 Bayer format.

The even lines should read BGBG, not RBRB.

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@osg.samsung.com>
9 years ago[media] cx231xx: fix compiler warnings
Hans Verkuil [Fri, 13 Mar 2015 10:00:07 +0000 (07:00 -0300)]
[media] cx231xx: fix compiler warnings

If CONFIG_VIDEO_CX231XX_RC is undefined, then these compiler warnings
are generated:

In file included from drivers/media/usb/cx231xx/cx231xx-cards.c:23:0:
drivers/media/usb/cx231xx/cx231xx-cards.c: In function ‘cx231xx_release_resources’:
drivers/media/usb/cx231xx/cx231xx.h:982:30: warning: statement with no effect [-Wunused-value]
 #define cx231xx_ir_exit(dev) (0)
                              ^
drivers/media/usb/cx231xx/cx231xx-cards.c:1158:2: note: in expansion of macro ‘cx231xx_ir_exit’
  cx231xx_ir_exit(dev);
  ^
drivers/media/usb/cx231xx/cx231xx-cards.c: In function ‘cx231xx_init_dev’:
drivers/media/usb/cx231xx/cx231xx.h:981:30: warning: statement with no effect [-Wunused-value]
 #define cx231xx_ir_init(dev) (0)
                              ^
drivers/media/usb/cx231xx/cx231xx-cards.c:1351:2: note: in expansion of macro ‘cx231xx_ir_init’
  cx231xx_ir_init(dev);
  ^
drivers/media/usb/cx231xx/cx231xx-cards.c: In function ‘cx231xx_usb_probe’:
drivers/media/usb/cx231xx/cx231xx.h:982:30: warning: statement with no effect [-Wunused-value]
 #define cx231xx_ir_exit(dev) (0)
                              ^
drivers/media/usb/cx231xx/cx231xx-cards.c:1705:2: note: in expansion of macro ‘cx231xx_ir_exit’
  cx231xx_ir_exit(dev);
  ^
drivers/media/usb/cx231xx/cx231xx-cards.c: In function ‘cx231xx_usb_disconnect’:
drivers/media/usb/cx231xx/cx231xx.h:982:30: warning: statement with no effect [-Wunused-value]
 #define cx231xx_ir_exit(dev) (0)
                              ^
drivers/media/usb/cx231xx/cx231xx-cards.c:1754:3: note: in expansion of macro ‘cx231xx_ir_exit’
   cx231xx_ir_exit(dev);
   ^

Fix by using static inlines instead of defines.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] wl128x-radio really depends on TI_ST
Arnd Bergmann [Thu, 12 Mar 2015 10:29:42 +0000 (07:29 -0300)]
[media] wl128x-radio really depends on TI_ST

All other drivers using the TI_ST infrastructure use
'depends on' for this symbol, and it makes no sense
to only enable that if CONFIG_NET is enable, because
the radio driver also depends on CONFIG_NET itself:

ERROR: "skb_queue_purge" [drivers/media/radio/wl128x/fm_drv.ko] undefined!
ERROR: "skb_push" [drivers/media/radio/wl128x/fm_drv.ko] undefined!
ERROR: "skb_pull" [drivers/media/radio/wl128x/fm_drv.ko] undefined!

Making the driver dependency explicit solves randconfig
build problems and makes it more obvious to the reader.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: fix compiler warning
Hans Verkuil [Thu, 12 Mar 2015 07:27:43 +0000 (04:27 -0300)]
[media] rtl2832: fix compiler warning

>From the daily build:

rtl2832.c: In function 'rtl2832_read_status':
rtl2832.c:703:12: warning: 'tmp' may be used uninitialized in this function [-Wmaybe-uninitialized]
  } else if (tmp == 10) {
            ^

The code is OK, it's just the compiler that cannot figure out what's
going on. So just init 'tmp' to 0.

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: cx23885: don't export static symbol
Julia Lawall [Wed, 11 Mar 2015 16:56:29 +0000 (13:56 -0300)]
[media] media: pci: cx23885: don't export static symbol

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
type T;
identifier f;
@@

static T f (...) { ... }

@@
identifier r.f;
declarer name EXPORT_SYMBOL;
@@

-EXPORT_SYMBOL(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] DocBook media: fix section IDs
Hans Verkuil [Wed, 11 Mar 2015 12:51:12 +0000 (09:51 -0300)]
[media] DocBook media: fix section IDs

The colorspace section IDs were assigned to the title instead of to the
section. Some links failed because of that.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook v4l: update bytesperline handling
Hans Verkuil [Wed, 11 Mar 2015 12:00:45 +0000 (09:00 -0300)]
[media] DocBook v4l: update bytesperline handling

The documentation says that the bytesperline field in v4l2_pix_format refers
to the largest plane in the case of planar formats (i.e. multiple planes
stores in a single buffer).

For almost all planar formats the first plane is also the largest (or equal)
plane, except for two formats: V4L2_PIX_FMT_NV24/NV42. For this YUV 4:4:4
format the second chroma plane is twice the size of the first luma plane.

Looking at the very few drivers that support this format the bytesperline
value that they report is actually that of the first plane and not that
of the largest plane.

Rather than fixing the drivers it makes more sense to update the documentation
since it is very difficult to use the largest plane for this. You would have
to check what the format is in order to know to which plane bytesperline
belongs, which makes calculations much more difficult.

This patch updates the documentation accordingly.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] MAINTAINERS: Update the maintainer mail address for stk1160
Ezequiel Garcia [Tue, 10 Mar 2015 14:43:20 +0000 (11:43 -0300)]
[media] MAINTAINERS: Update the maintainer mail address for stk1160

I'd rather use my work mail address to get patches, so let's update it.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] stk1160: Make sure current buffer is released
Ezequiel Garcia [Tue, 10 Mar 2015 14:37:14 +0000 (11:37 -0300)]
[media] stk1160: Make sure current buffer is released

The available (i.e. not used) buffers are returned by stk1160_clear_queue(),
on the stop_streaming() path. However, this is insufficient and the current
buffer must be released as well. Fix it.

Cc: stable@vger.kernel.org
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: davinci: vpif_display: embed video_device struct in channel_obj
Lad, Prabhakar [Sun, 8 Mar 2015 21:57:24 +0000 (18:57 -0300)]
[media] media: davinci: vpif_display: embed video_device struct in channel_obj

Embed video_device struct (video_dev) in channel_obj and also the
Unregister path doesn't need to free the video_device structure,
hence, change the video_device.release callback point to
video_device_release_empty.

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: davinci: vpif_capture: embed video_device struct in channel_obj
Lad, Prabhakar [Sun, 8 Mar 2015 21:57:23 +0000 (18:57 -0300)]
[media] media: davinci: vpif_capture: embed video_device struct in channel_obj

Embed video_device struct (video_dev) in channel_obj and also the
Unregister path doesn't need to free the video_device structure,
hence, change the video_device.release callback point to
video_device_release_empty.

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: blackfin: bfin_capture: embed video_device struct in bcap_device
Lad, Prabhakar [Sun, 8 Mar 2015 14:40:53 +0000 (11:40 -0300)]
[media] media: blackfin: bfin_capture: embed video_device struct in bcap_device

Embed video_device struct (video_dev) in bcap_device and
Unregister path doesn't need to free the video_device
structure, hence, change the video_device.release callback
point to video_device_release_empty.

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: blackfin: bfin_capture: drop bcap_get_unmapped_area()
Lad, Prabhakar [Sun, 8 Mar 2015 14:40:52 +0000 (11:40 -0300)]
[media] media: blackfin: bfin_capture: drop bcap_get_unmapped_area()

this patch drops bcap_get_unmapped_area() and uses
vb2_fop_get_unmapped_area() helper provided by the vb2 core.

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: blackfin: bfin_capture: set v4l2 buffer sequence
Lad, Prabhakar [Sun, 8 Mar 2015 14:40:51 +0000 (11:40 -0300)]
[media] media: blackfin: bfin_capture: set v4l2 buffer sequence

this patch adds support to set the v4l2 buffer sequence.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Tested-by: Scott Jiang <scott.jiang.linux@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: blackfin: bfin_capture: add support for VIDIOC_EXPBUF
Lad, Prabhakar [Sun, 8 Mar 2015 14:40:50 +0000 (11:40 -0300)]
[media] media: blackfin: bfin_capture: add support for VIDIOC_EXPBUF

this patch adds support for VIDIOC_EXPBUF.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Tested-by: Scott Jiang <scott.jiang.linux@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: blackfin: bfin_capture: add support for VB2_DMABUF
Lad, Prabhakar [Sun, 8 Mar 2015 14:40:49 +0000 (11:40 -0300)]
[media] media: blackfin: bfin_capture: add support for VB2_DMABUF

this patch adds support for VB2_DMABUF.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Tested-by: Scott Jiang <scott.jiang.linux@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: blackfin: bfin_capture: add support for vidioc_create_bufs
Lad, Prabhakar [Sun, 8 Mar 2015 14:40:48 +0000 (11:40 -0300)]
[media] media: blackfin: bfin_capture: add support for vidioc_create_bufs

this patch adds support for vidioc_create_bufs.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Tested-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>