platform/kernel/linux-exynos.git
8 years ago[media] doc-rst: Correct the ordering of LSBs of the 10-bit raw packed formats
Sakari Ailus [Fri, 11 Mar 2016 22:47:36 +0000 (19:47 -0300)]
[media] doc-rst: Correct the ordering of LSBs of the 10-bit raw packed formats

The 10-bit packed raw bayer format documented that the data of the first
pixel of a four-pixel group was found in the first byte and the two
highest bits of the fifth byte. This was not entirely correct. The two
bits in the fifth byte are the two lowest bits. The second pixel occupies
the second byte and third and fourth least significant bits and so on.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Aviv Greenberg <aviv.d.greenberg@intel.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] pxa_camera: remove an unused structure pointer
Mauro Carvalho Chehab [Fri, 9 Sep 2016 13:59:57 +0000 (10:59 -0300)]
[media] pxa_camera: remove an unused structure pointer

As reported by smatch:

drivers/media/platform/pxa_camera.c: In function 'pxa_dma_start_channels':
drivers/media/platform/pxa_camera.c:457:21: warning: variable 'active' set but not used [-Wunused-but-set-variable]
  struct pxa_buffer *active;
                     ^~~~~~

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] pxa_camera: make soc_mbus_xlate_by_fourcc() static
Mauro Carvalho Chehab [Fri, 9 Sep 2016 13:58:58 +0000 (10:58 -0300)]
[media] pxa_camera: make soc_mbus_xlate_by_fourcc() static

As warned by smatch:

drivers/media/platform/pxa_camera.c:283:39: warning: no previous prototype for 'soc_mbus_xlate_by_fourcc' [-Wmissing-prototypes]
 const struct soc_camera_format_xlate *soc_mbus_xlate_by_fourcc(
                                       ^~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] pxa_camera: allow building it if COMPILE_TEST is set
Hans Verkuil [Tue, 6 Sep 2016 10:37:45 +0000 (07:37 -0300)]
[media] pxa_camera: allow building it if COMPILE_TEST is set

Allow building this driver if COMPILE_TEST is set.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: platform: pxa_camera: fix style
Robert Jarzmik [Tue, 6 Sep 2016 09:04:24 +0000 (06:04 -0300)]
[media] media: platform: pxa_camera: fix style

This is a tiny fix for a switch case which quiets 2 checkpatch harmless
warnings. The generated code is not affected.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: platform: pxa_camera: move pxa_camera out of soc_camera
Robert Jarzmik [Tue, 6 Sep 2016 09:04:23 +0000 (06:04 -0300)]
[media] media: platform: pxa_camera: move pxa_camera out of soc_camera

As the conversion to a v4l2 standalone device is finished, move
pxa_camera one directory up and finish severing any dependency to
soc_camera.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: platform: pxa_camera: change stop_streaming semantics
Robert Jarzmik [Tue, 6 Sep 2016 09:04:22 +0000 (06:04 -0300)]
[media] media: platform: pxa_camera: change stop_streaming semantics

Instead of the legacy behavior where it was required to wait for all
video buffers to be finished by the hardware, use a cancel like strategy
: as soon as the stop_streaming() call is done, abort all DMA transfers,
report the already buffers as failed and return.

This makes stop_streaming() more a "cancel capture" than a "wait for end
of capture" semantic.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: platform: pxa_camera: add debug register access
Robert Jarzmik [Tue, 6 Sep 2016 09:04:21 +0000 (06:04 -0300)]
[media] media: platform: pxa_camera: add debug register access

Add pxa_camera registers access through advanced video debugging.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: platform: pxa_camera: make a standalone v4l2 device
Robert Jarzmik [Tue, 6 Sep 2016 09:04:20 +0000 (06:04 -0300)]
[media] media: platform: pxa_camera: make a standalone v4l2 device

This patch removes the soc_camera API dependency from pxa_camera.
In the current status :
 - all previously captures are working the same on pxa270
 - the s_crop() call was removed, judged not working
   (see what happens soc_camera_s_crop() when get_crop() == NULL)
 - if the pixel clock is provided by then sensor, ie. not MCLK, the dual
   stage change is not handled yet.
   => there is no in-tree user of this, so I'll let it that way

 - the MCLK is not yet finished, it's as in the legacy way,
   ie. activated at video device opening and closed at video device
   closing.
   In a subsequence patch pxa_camera_mclk_ops should be used, and
   platform data MCLK ignored. It will be the sensor's duty to request
   the clock and enable it, which will end in pxa_camera_mclk_ops.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: platform: pxa_camera: remove set_selection
Robert Jarzmik [Tue, 6 Sep 2016 09:04:19 +0000 (06:04 -0300)]
[media] media: platform: pxa_camera: remove set_selection

This is to be seen as a regression as the set_selection (former
set_crop) function is removed. This is a temporary situation in the v4l2
porting, and will have to be added later.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: platform: pxa_camera: add buffer sequencing
Robert Jarzmik [Tue, 6 Sep 2016 09:04:18 +0000 (06:04 -0300)]
[media] media: platform: pxa_camera: add buffer sequencing

Add sequence numbers to completed buffers.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: platform: pxa_camera: make printk consistent
Robert Jarzmik [Tue, 6 Sep 2016 09:04:17 +0000 (06:04 -0300)]
[media] media: platform: pxa_camera: make printk consistent

Make all print consistent by always using :
 - dev_xxx(pcdev_to_dev(pcdev), ....)

This prepares the soc_camera adherence removal by making these call rely
on only pcdev, and not the soc_camera icd structure.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: platform: pxa_camera: introduce sensor_call
Robert Jarzmik [Tue, 6 Sep 2016 09:04:16 +0000 (06:04 -0300)]
[media] media: platform: pxa_camera: introduce sensor_call

Introduce sensor_call(), which will be used for all sensor invocations.
This is a preparation move to v4l2 device conversion, ie. soc_camera
adherence removal.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: platform: pxa_camera: trivial move of functions
Robert Jarzmik [Tue, 6 Sep 2016 09:04:15 +0000 (06:04 -0300)]
[media] media: platform: pxa_camera: trivial move of functions

Move the functions in the file to be regrouped into meaningful blocks :
 1. pxa camera core handling functions, manipulating the herdware
 2. videobuf2 functions, dealing with video buffers
 3. video ioctl (vidioc) related functions
 4. driver probing, removal, suspend and resume

This patch doesn't modify a single line of code.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: platform: pxa_camera: convert to vb2
Robert Jarzmik [Tue, 6 Sep 2016 09:04:14 +0000 (06:04 -0300)]
[media] media: platform: pxa_camera: convert to vb2

Convert pxa_camera from videobuf to videobuf2.

As the soc_camera was already compatible with videobuf2, the port is
quite straightforward.

The special case of this code in which the vb2 to prepare is "too
big" in terms of size for the new capture format, the pxa_camera will
fail.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: mt9m111: move mt9m111 out of soc_camera
Robert Jarzmik [Tue, 6 Sep 2016 09:04:13 +0000 (06:04 -0300)]
[media] media: mt9m111: move mt9m111 out of soc_camera

As the mt9m111 is now working as a standalone v4l2 subdevice sensor,
move it out of soc_camera directory and sever its dependency on
soc_camera.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: mt9m111: use only the SRGB colorspace
Robert Jarzmik [Tue, 6 Sep 2016 09:04:12 +0000 (06:04 -0300)]
[media] media: mt9m111: use only the SRGB colorspace

mt9m111 being a camera sensor, its colorspace should always be SRGB, for
both RGB based formats or YCbCr based ones.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: mt9m111: make a standalone v4l2 subdevice
Robert Jarzmik [Tue, 6 Sep 2016 09:04:11 +0000 (06:04 -0300)]
[media] media: mt9m111: make a standalone v4l2 subdevice

Remove the soc_camera adherence. Mostly the change removes the power
manipulation provided by soc_camera, and instead :
 - powers on the sensor when the s_power control is activated
 - powers on the sensor in initial probe
 - enables and disables the MCLK provided to it in power on/off

This patch also drops support for inverters on synchronisation and clock
lines. It is assumed, if any board ever needs such inverters, support
for them can be added in the future

Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] st-hva: update MAINTAINERS
Jean-Christophe Trotin [Mon, 5 Sep 2016 15:31:29 +0000 (12:31 -0300)]
[media] st-hva: update MAINTAINERS

Add entry for the HVA driver to the MAINTAINERS file.

Signed-off-by: Jean-Christophe Trotin <jean-christophe.trotin@st.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] st-hva: add H.264 video encoding support
Jean-Christophe Trotin [Mon, 5 Sep 2016 14:06:30 +0000 (11:06 -0300)]
[media] st-hva: add H.264 video encoding support

This patch adds the H.264 video encoding capability in the V4L2 HVA
video encoder driver for STMicroelectronics SoC (hva-h264.c).

The main supported features are:
- profile: baseline, main, high, stereo high
- level: up to 4.2
- bitrate mode: CBR, VBR
- entropy mode: CABAC, CAVLC
- video aspect: 1x1 only

Signed-off-by: Yannick Fertre <yannick.fertre@st.com>
Signed-off-by: Jean-Christophe Trotin <jean-christophe.trotin@st.com>
Acked-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] st-hva: multi-format video encoder V4L2 driver
Jean-Christophe Trotin [Mon, 5 Sep 2016 14:06:29 +0000 (11:06 -0300)]
[media] st-hva: multi-format video encoder V4L2 driver

This patch adds V4L2 HVA (Hardware Video Accelerator) video encoder
driver for STMicroelectronics SoC. It uses the V4L2 mem2mem framework.

This patch only contains the core parts of the driver:
- the V4L2 interface with the userland (hva-v4l2.c)
- the hardware services (hva-hw.c)
- the memory management utilities (hva-mem.c)

This patch doesn't include the support of specific codec (e.g. H.264)
video encoding: this support is part of subsequent patches.

Signed-off-by: Yannick Fertre <yannick.fertre@st.com>
Signed-off-by: Jean-Christophe Trotin <jean-christophe.trotin@st.com>
Acked-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] v4l2-subdev.h: fix a typo at a kernel-doc markup
Mauro Carvalho Chehab [Fri, 9 Sep 2016 11:40:15 +0000 (08:40 -0300)]
[media] v4l2-subdev.h: fix a typo at a kernel-doc markup

One struct at the comment was not written well.

Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] v4l2-subdev: fix some references to v4l2_dev
Mauro Carvalho Chehab [Thu, 8 Sep 2016 21:31:17 +0000 (18:31 -0300)]
[media] v4l2-subdev: fix some references to v4l2_dev

There is a warning there, because it was pointing to a different
name. Fix it.

While here, use struct &foo, instead of &struct foo.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] v4l2-flash-led-class.h: document v4l2_flash_ops
Mauro Carvalho Chehab [Thu, 8 Sep 2016 21:23:35 +0000 (18:23 -0300)]
[media] v4l2-flash-led-class.h: document v4l2_flash_ops

Fix this warning:
./include/media/v4l2-flash-led-class.h:103: WARNING: c:type reference target not found: v4l2_flash_ops

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] videobuf2-v4l2: document two helper functions
Mauro Carvalho Chehab [Thu, 8 Sep 2016 21:12:18 +0000 (18:12 -0300)]
[media] videobuf2-v4l2: document two helper functions

Document vb2_ops_wait_prepare() and vb2_ops_wait_finish(),
in order to fix those two warnings:
Documentation/media/kapi/v4l2-dev.rst:166: WARNING: c:func reference target not found: vb2_ops_wait_prepare
Documentation/media/kapi/v4l2-dev.rst:166: WARNING: c:func reference target not found: vb2_ops_wait_finish

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] videobuf2-v4l2.h: improve documentation
Mauro Carvalho Chehab [Thu, 8 Sep 2016 21:01:44 +0000 (18:01 -0300)]
[media] videobuf2-v4l2.h: improve documentation

There are a few issues at the documentation: fields not documented,
bad cross refrences, etc.

Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] videobuf2-v4l2.h: get kernel-doc tags from C file
Mauro Carvalho Chehab [Thu, 8 Sep 2016 17:22:00 +0000 (14:22 -0300)]
[media] videobuf2-v4l2.h: get kernel-doc tags from C file

There are several functions documented at the C file. Move
them to the header, as this is the one used to build the
media books.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] conf_nitpick.py: ignore C domain data used on vb2
Mauro Carvalho Chehab [Thu, 8 Sep 2016 17:12:29 +0000 (14:12 -0300)]
[media] conf_nitpick.py: ignore C domain data used on vb2

Ignore external C domain structs and functions used by VB2
header.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] videobuf2-core.h: improve documentation
Mauro Carvalho Chehab [Thu, 8 Sep 2016 17:08:34 +0000 (14:08 -0300)]
[media] videobuf2-core.h: improve documentation

There are several small issues with the documentation. Fix them,
in order to avoid producing warnings.

While here, also make checkpatch.pl happy.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] videobuf2-core.h: document enum vb2_memory
Mauro Carvalho Chehab [Thu, 8 Sep 2016 17:08:00 +0000 (14:08 -0300)]
[media] videobuf2-core.h: document enum vb2_memory

This enum was not documented. Document it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] videobuf2-core.h: move function descriptions from c file
Mauro Carvalho Chehab [Thu, 8 Sep 2016 16:34:37 +0000 (13:34 -0300)]
[media] videobuf2-core.h: move function descriptions from c file

There are several functions that were documented at the .c
file. As we only include the headers, we need to move them to
there, in order to have documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] conf_nitpick.py: ignore an opaque struct from v4l2-mem2mem.h
Mauro Carvalho Chehab [Thu, 8 Sep 2016 21:01:36 +0000 (18:01 -0300)]
[media] conf_nitpick.py: ignore an opaque struct from v4l2-mem2mem.h

The v4l2_m2m_dev is opaque: its meaning is only known by
v4l2-mem2mem.c. Ignore it on nitpick mode.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] v4l2-mem2mem.h: make kernel-doc parse v4l2-mem2mem.h again
Mauro Carvalho Chehab [Thu, 8 Sep 2016 20:20:44 +0000 (17:20 -0300)]
[media] v4l2-mem2mem.h: make kernel-doc parse v4l2-mem2mem.h again

The kernel-doc C parser doesn't like opaque structures. So,
document it on another way.

This should get rid of this warning:
./include/media/v4l2-mem2mem.h:62: error: Cannot parse struct or union!

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] v4l2-mem2mem.h: document the public structures
Mauro Carvalho Chehab [Thu, 8 Sep 2016 13:16:36 +0000 (10:16 -0300)]
[media] v4l2-mem2mem.h: document the public structures

Most structures here are not documented. Add a documentation
for them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] v4l2-mem2mem.h: document function arguments
Mauro Carvalho Chehab [Thu, 8 Sep 2016 13:39:58 +0000 (10:39 -0300)]
[media] v4l2-mem2mem.h: document function arguments

There are lots of troubles with the function arguments on this
file. Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] v4l2-mem2mem.h: move descriptions from .c file
Mauro Carvalho Chehab [Thu, 8 Sep 2016 13:16:27 +0000 (10:16 -0300)]
[media] v4l2-mem2mem.h: move descriptions from .c file

Several routines are somewhat documented at v4l2-mem2mem.c
file. Move what's there to the header file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] mc-core.rst: fix a warning about an internal routine
Mauro Carvalho Chehab [Thu, 8 Sep 2016 12:57:24 +0000 (09:57 -0300)]
[media] mc-core.rst: fix a warning about an internal routine

Fix this warning:
Documentation/media/kapi/mc-core.rst:97: WARNING: c:func reference target not found: media_devnode_release

The media_device_release() is a function internal to media-devnode.c,
and not exported elsewhere. So, we can't cross-reference it here.
Make it explicit at the documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] rc-map.h: fix a Sphinx warning
Mauro Carvalho Chehab [Thu, 8 Sep 2016 11:18:04 +0000 (08:18 -0300)]
[media] rc-map.h: fix a Sphinx warning

./include/media/rc-map.h:121: WARNING: Inline emphasis start-string without end-string.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] docs-rst: fix two wrong :name: tags
Mauro Carvalho Chehab [Thu, 8 Sep 2016 11:14:10 +0000 (08:14 -0300)]
[media] docs-rst: fix two wrong :name: tags

There's a typo there, causing 4 warnings:

  Documentation/media/uapi/rc/lirc-read.rst:26: WARNING: c:type reference target not found: name
  Documentation/media/uapi/rc/lirc-read.rst:26: WARNING: c:type reference target not found: lirc
  Documentation/media/uapi/v4l/func-poll.rst:25: WARNING: c:type reference target not found: name
  Documentation/media/uapi/v4l/func-poll.rst:25: WARNING: c:type reference target not found: v4l2

 Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media-ioc-g-topology.rst: fix a c domain reference
Mauro Carvalho Chehab [Thu, 8 Sep 2016 10:55:13 +0000 (07:55 -0300)]
[media] media-ioc-g-topology.rst: fix a c domain reference

One reference there is still using :ref:. Fix it, to solve this
warning:
  Documentation/media/uapi/mediactl/media-ioc-g-topology.rst:236: WARNING: undefined label: media-v2-intf-devnode (if the link has no caption the label must precede a section header)

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] dev-sliced-vbi.rst: fix reference for v4l2_mpeg_vbi_ITV0
Mauro Carvalho Chehab [Thu, 8 Sep 2016 10:50:59 +0000 (07:50 -0300)]
[media] dev-sliced-vbi.rst: fix reference for v4l2_mpeg_vbi_ITV0

The struct v4l2_mpeg_vbi_ITV0 is identical to struct v4l2_mpeg_vbi_itv0,
except by its size, and it is documented at the same place at the
book.

Fix cross reference for it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] docs-rst: fix cross-references for videodev2.h
Mauro Carvalho Chehab [Thu, 8 Sep 2016 09:41:26 +0000 (06:41 -0300)]
[media] docs-rst: fix cross-references for videodev2.h

There are several broken references there, due to the conversion to
C domain. Fix them using this shell script and manually adjust what's
broken:

# funcs is a file with the broken functions/references
for i in $(cat funcs|sort|uniq|perl -ne 'print "$1\n" if (m/(\S+)$/)'); do
i=${i//-/_}
echo $i
j=${i//_/-}
for k in $(git grep -l "_$j:" Documentation/); do
sed s,\_$j\:,"c\:type\:\: $i", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/media/*.exceptions); do
sed s,$j,":c\:type\:\`$i\`", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/); do
sed "s,:ref:\`$i <$j>\`,:c:type:\`$i\`," <$k >a && mv a $k
sed "s,:ref:\`$j\`,:c:type:\`$i\`," <$k >a && mv a $k
sed -E "s,:ref:\`(.*)<$j>\`,:c:type:\`\1<$i>\`," <$k >a && mv a $k
done
for k in $(git grep -l "<$j>" include/media); do
sed -E "s,:ref:\`(.*)<$j>\`,enum \&$i," <$k >a && mv a $k
done
done

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] hist-v4l2.rst: don't do refs to old structures
Mauro Carvalho Chehab [Thu, 8 Sep 2016 09:30:27 +0000 (06:30 -0300)]
[media] hist-v4l2.rst: don't do refs to old structures

Several structs were renamed or removed during V4L2 development.
Don't try to cross-reference the legacy ones.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] libv4l-introduction.rst: improve crossr-references
Mauro Carvalho Chehab [Thu, 8 Sep 2016 09:21:01 +0000 (06:21 -0300)]
[media] libv4l-introduction.rst: improve crossr-references

Use C cross-references to mention the V4L2 API calls on all
places it occurs inside this file.

While here, also mark constants as such.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] libv4l-introdution.rst: fix function definitions
Mauro Carvalho Chehab [Thu, 8 Sep 2016 09:07:47 +0000 (06:07 -0300)]
[media] libv4l-introdution.rst: fix function definitions

c:type is not the right tag for function definitions.
Replace them by .. c:function::

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] fix clock_gettime cross-references
Mauro Carvalho Chehab [Thu, 8 Sep 2016 08:51:10 +0000 (05:51 -0300)]
[media] fix clock_gettime cross-references

Fix those warnings:

Documentation/media/uapi/cec/cec-ioc-dqevent.rst:124: WARNING: c:func reference target not found: clock_gettime(2)

By replacing it with the right function name, using this shell script:

for i in `find Documentation/media -type f`; do sed 's,clock_gettime(2),clock_gettime,' <$i >a && mv a $i; done

Please notice that this will make the nitpick mode to shut up
complaining about that, becasue clock_gettime is on its exclude list,
but the cross reference will be undefined until someone documents
this function at the core documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] docs-rst: fix some broken struct references
Mauro Carvalho Chehab [Thu, 8 Sep 2016 08:48:50 +0000 (05:48 -0300)]
[media] docs-rst: fix some broken struct references

The :c:type: references point to the structure name, and not to
struct foo.

Fixed via this shell script:

for i in `find Documentation/media -type f`; do perl -ne 'if (s/\:c\:type\:\`struct\s*(\S+)\`/struct :c:type:`$1`/) { s/struct\s+struct/struct/;  s/(struct\s+\:c\:type\:\`\S+\`)\s+structure/$1/;  } print $_' <$i >a && mv a $i; done

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] docs-rst: simplify c:type: cross references
Mauro Carvalho Chehab [Thu, 8 Sep 2016 08:43:01 +0000 (05:43 -0300)]
[media] docs-rst: simplify c:type: cross references

Instead of using c:type:`struct foo <foo>`, use:
struct c:type:`foo`

This patch was generated via this shell script:

for i in `find Documentation/media -type f`; do perl -ne 'if (m/\:c\:type\:\`struct\s+(\S+)\s*\<(\S+)\>\`/) { $s=$1; $r=$2; if ($s eq $r) { s/\:c\:type\:\`struct\s+(\S+)\s*\<(\S+)\>\`/struct :c:type:`$2`/; s/struct\s+struct/struct/;  s/(struct\s+\:c\:type\:\`\S+\`)\s+structure/$1/;  }} print $_' <$i >a && mv a $i; done

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] docs-rst: fix cec bad cross-references
Mauro Carvalho Chehab [Wed, 31 Aug 2016 22:15:05 +0000 (19:15 -0300)]
[media] docs-rst: fix cec bad cross-references

Fix some CEC cross references that are broken.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] docs-rst: fix dmx bad cross-references
Mauro Carvalho Chehab [Wed, 31 Aug 2016 21:57:07 +0000 (18:57 -0300)]
[media] docs-rst: fix dmx bad cross-references

Some structs are pointed via the typedef. As we replaced
those references, fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] fix broken references on dvb/video*rst
Mauro Carvalho Chehab [Wed, 31 Aug 2016 19:34:07 +0000 (16:34 -0300)]
[media] fix broken references on dvb/video*rst

Trivially fix those broken references, by copying the structs
fron the header, just like other API documentation at the
DVB side.

This doesn't have the level of quality used at the V4L2 side
of the API, but, as this documents a deprecated API, used
only by av7110 driver, it doesn't make much sense to invest
time making it better.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] docs-rst: fix the remaining broken links for DVB CA API
Mauro Carvalho Chehab [Wed, 31 Aug 2016 18:59:14 +0000 (15:59 -0300)]
[media] docs-rst: fix the remaining broken links for DVB CA API

Several links are broken, as they were using the typedef
name, instead of using the corresponding structs. Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] ca-set-pid.rst: document struct ca_pid
Mauro Carvalho Chehab [Wed, 31 Aug 2016 18:59:11 +0000 (15:59 -0300)]
[media] ca-set-pid.rst: document struct ca_pid

Add a table describing the fields on this struct, based
on ca.h header.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] ca-get-slot-info.rst: document struct ca_slot_info
Mauro Carvalho Chehab [Wed, 31 Aug 2016 17:15:56 +0000 (14:15 -0300)]
[media] ca-get-slot-info.rst: document struct ca_slot_info

Add documentation for struct ca_slot_info and for the two
sets of define used by it, according with what's there at the
ca.h header.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] ca-get-msg.rst: add a boilerplate for struct ca_msg
Mauro Carvalho Chehab [Wed, 31 Aug 2016 17:14:26 +0000 (14:14 -0300)]
[media] ca-get-msg.rst: add a boilerplate for struct ca_msg

There are no descriptions at ca.h header for this struct.
Yet, as we want to get rid of the warnings, let's add a
boilerplate, with just the struct types and fields.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] ca-get-descr-info.rst: add doc for for struct ca_descr_info
Mauro Carvalho Chehab [Wed, 31 Aug 2016 17:07:38 +0000 (14:07 -0300)]
[media] ca-get-descr-info.rst: add doc for for struct ca_descr_info

The documentation follows what's there at the ca.h header.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] ca-get-cap.rst: add a table for struct ca_caps
Mauro Carvalho Chehab [Wed, 31 Aug 2016 16:07:43 +0000 (13:07 -0300)]
[media] ca-get-cap.rst: add a table for struct ca_caps

Add a flat-table describing struct ca_caps, as found at
the source file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] docs-rst exceptions: use C domain references for DVB headers
Mauro Carvalho Chehab [Tue, 30 Aug 2016 13:21:03 +0000 (10:21 -0300)]
[media] docs-rst exceptions: use C domain references for DVB headers

Now that we moved away from the :ref: type of references,
we need to update the exceptions lists.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] v4l2-subdev.h: fix a doc nitpick warning
Mauro Carvalho Chehab [Wed, 31 Aug 2016 00:08:17 +0000 (21:08 -0300)]
[media] v4l2-subdev.h: fix a doc nitpick warning

One markup tag is wrong here.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] v4l2-subdev.rst: get rid of legacy functions
Mauro Carvalho Chehab [Wed, 31 Aug 2016 00:01:57 +0000 (21:01 -0300)]
[media] v4l2-subdev.rst: get rid of legacy functions

There are two warnings that are due to functions that has long
gone:

Documentation/media/kapi/v4l2-subdev.rst:417: WARNING: c:func reference target not found: v4l2_i2c_new_subdev_cfg
Documentation/media/kapi/v4l2-subdev.rst:436: WARNING: c:func reference target not found: v4l2_i2c_new_probed_subdev

Update the documentation to remove those.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] v4l2-dv-timings.h: let kernel-doc parte the typedef argument
Mauro Carvalho Chehab [Tue, 30 Aug 2016 23:11:11 +0000 (20:11 -0300)]
[media] v4l2-dv-timings.h: let kernel-doc parte the typedef argument

Now that scripts/kernel-doc was fixed to parse the typedef
argument used here, let it produce documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] v4l2-device.h: fix some doc tags
Mauro Carvalho Chehab [Tue, 30 Aug 2016 22:16:25 +0000 (19:16 -0300)]
[media] v4l2-device.h: fix some doc tags

Fix some minor issues at the documentation tags on this file,
adding cross-references where needed, and fixing some broken
ones.

While here, fix a few spaces before tabs to make Checkpatch happier.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] v4l2-dev.rst: fix a broken c domain reference
Mauro Carvalho Chehab [Tue, 30 Aug 2016 21:55:17 +0000 (18:55 -0300)]
[media] v4l2-dev.rst: fix a broken c domain reference

The "struct" were inside the reference, causing it to break.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] v4l2-ioctl.h: document the remaining functions
Mauro Carvalho Chehab [Tue, 30 Aug 2016 15:18:09 +0000 (12:18 -0300)]
[media] v4l2-ioctl.h: document the remaining functions

There are several undocumented functions here; document them.

While here, make checkpatch.pl happy.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] cec-ioc-dqevent.rst: fix some undefined references
Mauro Carvalho Chehab [Mon, 29 Aug 2016 22:45:57 +0000 (19:45 -0300)]
[media] cec-ioc-dqevent.rst: fix some undefined references

Documentation/output/cec.h.rst:6: WARNING: c:type reference target not found: cec_event_state_change
Documentation/output/cec.h.rst:6: WARNING: c:type reference target not found: cec_event_state_change
Documentation/output/cec.h.rst:6: WARNING: c:type reference target not found: cec_event_lost_msgs
Documentation/output/cec.h.rst:6: WARNING: c:type reference target not found: cec_event_lost_msgs
Documentation/output/cec.h.rst:6: WARNING: c:type reference target not found: cec_event_state_change
Documentation/output/cec.h.rst:6: WARNING: c:type reference target not found: cec_event_lost_msgs

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] v4l2-ctrls.h: Fix some c:type references
Mauro Carvalho Chehab [Mon, 29 Aug 2016 22:29:58 +0000 (19:29 -0300)]
[media] v4l2-ctrls.h: Fix some c:type references

Now that the uAPI is using c:type, let's use it here too.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] docs-rst: use C domain for enum references on uapi
Mauro Carvalho Chehab [Mon, 29 Aug 2016 21:40:21 +0000 (18:40 -0300)]
[media] docs-rst: use C domain for enum references on uapi

Change the parse-headers.pl and the corresponding files to use
the C domain for enum references.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] v4l2-ctrls.h: fix doc reference for prepare_ext_ctrls()
Mauro Carvalho Chehab [Mon, 29 Aug 2016 21:43:02 +0000 (18:43 -0300)]
[media] v4l2-ctrls.h: fix doc reference for prepare_ext_ctrls()

The prepare_ext_ctrls() function is actually internal to the
v4l2-ctrls.c implementation, so it doesn't have a declaration
for the kAPI header to reference it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] diff-v4l.rst: Fix V4L version 1 references
Mauro Carvalho Chehab [Mon, 29 Aug 2016 21:22:52 +0000 (18:22 -0300)]
[media] diff-v4l.rst: Fix V4L version 1 references

The V4L version 1 structures had long gone from the Linux Kernel.
It doesn't make sense to use cross-references for them, as they
won't be found.

So, get rid of them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] docs-rst: convert uAPI structs to C domain
Mauro Carvalho Chehab [Mon, 29 Aug 2016 20:37:59 +0000 (17:37 -0300)]
[media] docs-rst: convert uAPI structs to C domain

instead of declaring the uAPI structs using usual refs, e. g.:
.. _foo-struct:

Use the C domain way:
.. c:type:: foo_struct

This way, the kAPI documentation can use cross-references to
point to the uAPI symbols.

That solves about ~100 undefined warnings like:
WARNING: c:type reference target not found: foo_struct

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] v4l2-ctrls: document some extra data structures
Mauro Carvalho Chehab [Mon, 29 Aug 2016 20:26:15 +0000 (17:26 -0300)]
[media] v4l2-ctrls: document some extra data structures

The typedefs and a macro are not defined. While here, improve a
few bits on the documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] rc-map.h: document structs/enums on it
Mauro Carvalho Chehab [Mon, 29 Aug 2016 20:00:22 +0000 (17:00 -0300)]
[media] rc-map.h: document structs/enums on it

There are some structs/enums that aren't documented via
kernel-doc markup. Add documentation for them.

Fix those warnings:
./include/media/rc-map.h:103: WARNING: c:type reference target not found: rc_map_list
./include/media/rc-map.h:110: WARNING: c:type reference target not found: rc_map_list
./include/media/rc-map.h:117: WARNING: c:type reference target not found: rc_map

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] conf_nitpick.py: ignore external functions used on mediactl
Mauro Carvalho Chehab [Mon, 29 Aug 2016 19:09:16 +0000 (16:09 -0300)]
[media] conf_nitpick.py: ignore external functions used on mediactl

There are some functions/macros used by the mediactl documentation
that are alien to the media subsystem. Ignore them.

After this patch, the media core will only complain about this
static function:
Documentation/media/kapi/mc-core.rst:97: WARNING: c:func reference target not found: media_devnode_release

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] docs-rst: improve the kAPI documentation for the mediactl
Mauro Carvalho Chehab [Mon, 29 Aug 2016 19:09:11 +0000 (16:09 -0300)]
[media] docs-rst: improve the kAPI documentation for the mediactl

There are several issues on the documentation:
  - the media.h header were not properly referenced;
  - verbatim expressions were not properly marked as such;
  - struct member references were wrong;
  - some notes were not using the right markup;
  - a comment that were moved to the kernel-doc markup were
    duplicated as a comment inside the struct media_entity;
  - some args were not pointing to the struct they're using;
  - macros weren't documented.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] demux.h: fix a documentation warning
Mauro Carvalho Chehab [Mon, 29 Aug 2016 19:04:01 +0000 (16:04 -0300)]
[media] demux.h: fix a documentation warning

The kernel-doc parser didn't handle well the private:
tag. Rewrite it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] mc-core.rst: Fix cross-references to the source
Mauro Carvalho Chehab [Mon, 29 Aug 2016 19:03:00 +0000 (16:03 -0300)]
[media] mc-core.rst: Fix cross-references to the source

The cross-reference to "struct media_pad" was pointing to
a place that doesn't exist. Fix it, and adjust the second
reference on the same paragraph to use the same text.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] demux.h: Fix a few documentation issues
Mauro Carvalho Chehab [Mon, 29 Aug 2016 13:05:49 +0000 (10:05 -0300)]
[media] demux.h: Fix a few documentation issues

demux.h was lacking documentation for the DMX_FE_ENTRY macro:
./drivers/media/dvb-core/demux.h:511: WARNING: c:func reference target not found: DMX_FE_ENTRY

While here, get rid of unused parameters and fix a few minor issues
at the header file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] dvb_ringbuffer.h: document the define macros
Mauro Carvalho Chehab [Mon, 29 Aug 2016 13:01:06 +0000 (10:01 -0300)]
[media] dvb_ringbuffer.h: document the define macros

There are a few define macros not documented, because the ReST
output was causing more warnings.

Now that this got fixed, document them. While here, fix the
remaining coding style issues.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] dtv-core.rst: move DTV ringbuffer notes to kAPI doc
Mauro Carvalho Chehab [Mon, 29 Aug 2016 11:39:32 +0000 (08:39 -0300)]
[media] dtv-core.rst: move DTV ringbuffer notes to kAPI doc

Instead of keeping those notes at the file on a non-structured
way, move them to dtv-core.rst, using the proper ReST tags.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] dvb_ringbuffer.h: Document all functions
Mauro Carvalho Chehab [Mon, 29 Aug 2016 11:38:01 +0000 (08:38 -0300)]
[media] dvb_ringbuffer.h: Document all functions

There are several functions there there weren't properly
documented. Add documentation for them.

While here, make checkpatch.pl happier.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] conf_nitpick.py: add external vars to ignore list
Mauro Carvalho Chehab [Mon, 29 Aug 2016 11:39:47 +0000 (08:39 -0300)]
[media] conf_nitpick.py: add external vars to ignore list

There a some other types and functions that aren't declared
inside the media document but are elsewhere. Add them to the
ignore list.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] docs-rst: parse-headers.pl: use the C domain for cross-references
Mauro Carvalho Chehab [Wed, 31 Aug 2016 09:44:21 +0000 (06:44 -0300)]
[media] docs-rst: parse-headers.pl: use the C domain for cross-references

Instead of keep using the normal reference, move to the C
domain ones. Using C domains everywhere will allow
cross-references between kAPI and uAPI docs.

Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] docs-rst: parse-headers.pl: make debug a command line option
Mauro Carvalho Chehab [Wed, 31 Aug 2016 09:41:40 +0000 (06:41 -0300)]
[media] docs-rst: parse-headers.pl: make debug a command line option

Add a parser for the --debug option, in order to allow
seeing what the parser is doing.

Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] Documentation: DT: add bindings for ST HVA
Jean-Christophe Trotin [Mon, 5 Sep 2016 14:06:28 +0000 (11:06 -0300)]
[media] Documentation: DT: add bindings for ST HVA

This patch adds DT binding documentation for STMicroelectronics hva
driver.

Signed-off-by: Yannick Fertre <yannick.fertre@st.com>
Signed-off-by: Jean-Christophe Trotin <jean-christophe.trotin@st.com>
Acked-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] cobalt: update EDID
Hans Verkuil [Mon, 5 Sep 2016 14:30:39 +0000 (11:30 -0300)]
[media] cobalt: update EDID

Update the cobalt EDID, fixing various incorrect values (wrong name,
product code, various video capabilities).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] vivid: update EDID
Hans Verkuil [Mon, 5 Sep 2016 14:30:08 +0000 (11:30 -0300)]
[media] vivid: update EDID

Update the vivid EDID, fixing various incorrect values (wrong name,
product code, various video capabilities).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] tw5864-core: remove excessive irqsave
Andrey Utkin [Wed, 24 Aug 2016 23:17:18 +0000 (20:17 -0300)]
[media] tw5864-core: remove excessive irqsave

As warned by smatch:
drivers/media/pci/tw5864/tw5864-core.c:160 tw5864_h264_isr() error: double lock 'irqsave:flags'
drivers/media/pci/tw5864/tw5864-core.c:174 tw5864_h264_isr() error: double unlock 'irqsave:flags'

Two different spinlocks are obtained, so having two calls is correct,
but second irqsave is superfluous, and using same "flags" variable is
just wrong.

Reported-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] Revert "[media] tw5864: remove double irq lock code"
Hans Verkuil [Mon, 5 Sep 2016 13:09:17 +0000 (10:09 -0300)]
[media] Revert "[media] tw5864: remove double irq lock code"

This reverts commit 617e901a12ad ("[media] tw5864: remove double irq lock code").

That commit was rejected by Andrey Utkin <andrey_utkin@fastmail.com>,
but it had already been merged. Revert and apply Andrey's corrected
patch next.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] pulse8-cec: some small fixes
Johan Fjeldtvedt [Tue, 30 Aug 2016 12:31:28 +0000 (09:31 -0300)]
[media] pulse8-cec: some small fixes

Fix some small things:
    - clean up setup function
    - use MSGEND instead of 0xfe
    - don't assign "return value" from cec_phys_addr to err,
      it has return type void.

Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] atmel-isc: remove the warning
Songjun Wu [Wed, 24 Aug 2016 08:49:28 +0000 (05:49 -0300)]
[media] atmel-isc: remove the warning

Replace the 'IS_ERR_VALUE(irq)' with 'ret < 0' in
function 'atmel_isc_probe'.

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Songjun Wu <songjun.wu@microchip.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: tw686x: Support frame sizes and frame intervals enumeration
Ezequiel Garcia [Mon, 22 Aug 2016 16:12:24 +0000 (13:12 -0300)]
[media] media: tw686x: Support frame sizes and frame intervals enumeration

This commit adds support for VIDIOC_ENUM_FRAMESIZES
and VIDIOC_ENUM_FRAMEINTERVALS enumeration ioctls.

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@s-opensource.com>
8 years ago[media] pulse8-cec: sync configuration with adapter
Johan Fjeldtvedt [Mon, 22 Aug 2016 09:04:54 +0000 (06:04 -0300)]
[media] pulse8-cec: sync configuration with adapter

When the configuration is changed, they are also written to the adapter.
This allows the adapter to continue operating in autonomous mode with
the same settings when it is disconnected from the driver (typically by
going into suspend). For adapters with firmware version 2 or greater, the
settings are also persisted in EEPROM.

A new module parameter is added to optionally also use the configuration
already present in the adapter when it is connected. This option is
enabled by default.

When a new configuration is written, the autonomous mode is
automatically enabled. When the device is unconfigured, autonomous mode
is disabled.

Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] pulse8-cec: add notes about behavior in autonomous mode
Johan Fjeldtvedt [Mon, 22 Aug 2016 09:04:53 +0000 (06:04 -0300)]
[media] pulse8-cec: add notes about behavior in autonomous mode

The pulse8 dongle has some quirky behaviors when in autonomous mode.
Document these.

Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] pulse8-cec: serialize communication with adapter
Johan Fjeldtvedt [Mon, 22 Aug 2016 09:04:52 +0000 (06:04 -0300)]
[media] pulse8-cec: serialize communication with adapter

Make sending messages to the adapter serialized within the driver.

send_and_wait is split into send_and_wait_once, which only sends once
and checks for the result, and the higher level send_and_wait, which
performs locking and retries.

Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] cec: allow configuration both from within driver and from user space
Johan Fjeldtvedt [Mon, 22 Aug 2016 09:04:51 +0000 (06:04 -0300)]
[media] cec: allow configuration both from within driver and from user space

It makes sense for adapters such as the Pulse-Eight to be configurable
both from within the driver and from user space, so remove the
requirement that drivers only can call cec_s_log_addrs or
cec_s_phys_addr if they don't expose those capabilities to user space.

Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] radio-si470x-i2c: Delete owner assignment
Markus Elfring [Mon, 15 Aug 2016 05:01:56 +0000 (02:01 -0300)]
[media] radio-si470x-i2c: Delete owner assignment

The field "owner" is set by core. Thus delete an extra initialisation.

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] vcodec: mediatek: Add g/s_selection support for V4L2 Encoder
Tiffany Lin [Mon, 15 Aug 2016 02:15:33 +0000 (23:15 -0300)]
[media] vcodec: mediatek: Add g/s_selection support for V4L2 Encoder

This patch add g/s_selection for MT8173 V4L2 Encoder.
Only output queue support g/s_selection to configure crop.
The top/left of active rectangle should always be (0,0)

Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media/i2c: Delete owner assignment
Markus Elfring [Sun, 14 Aug 2016 20:20:26 +0000 (17:20 -0300)]
[media] media/i2c: Delete owner assignment

The field "owner" is set by core. Thus delete an extra initialisation.

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] smiapp: Remove set_xclk() callback from hwconfig
Sakari Ailus [Wed, 31 Aug 2016 12:38:54 +0000 (09:38 -0300)]
[media] smiapp: Remove set_xclk() callback from hwconfig

The clock framework is generally so well supported that there's no reason
to keep this one around.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] smiapp: Switch to gpiod API for GPIO control
Sakari Ailus [Sat, 13 Aug 2016 15:46:50 +0000 (12:46 -0300)]
[media] smiapp: Switch to gpiod API for GPIO control

Switch from the old gpio API to the new descriptor based gpiod API.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>