openwrt/staging/blogic.git
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>
8 years ago[media] smiapp: Constify the regs argument to smiapp_write_8s()
Sakari Ailus [Sat, 13 Aug 2016 15:49:17 +0000 (12:49 -0300)]
[media] smiapp: Constify the regs argument to smiapp_write_8s()

The data may now be const as well.

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: Return -EPROBE_DEFER if the clock cannot be obtained
Sakari Ailus [Mon, 29 Aug 2016 20:28:25 +0000 (17:28 -0300)]
[media] smiapp: Return -EPROBE_DEFER if the clock cannot be obtained

The clock may be provided by a driver which is yet to probe. Print the
actual error code as well.

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: Rename smiapp_platform_data as smiapp_hwconfig
Sakari Ailus [Thu, 11 Aug 2016 10:43:50 +0000 (07:43 -0300)]
[media] smiapp: Rename smiapp_platform_data as smiapp_hwconfig

This is really configuration to the driver originating from DT or
elsewhere. Do not call it platform data.

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: Unify enforced and need-based 8-bit read
Sakari Ailus [Sat, 13 Dec 2014 20:53:37 +0000 (18:53 -0200)]
[media] smiapp: Unify enforced and need-based 8-bit read

Unify enforced 8-bit read access with that based on actual need.

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] cx231xx-cards: unregister IR earlier
Mauro Carvalho Chehab [Mon, 5 Sep 2016 09:55:59 +0000 (06:55 -0300)]
[media] cx231xx-cards: unregister IR earlier

Without this patch, a bug is issued when the module is removed:

[ 1417.425863] cx231xx 1-3.1.4:1.1: Cx231xx dvb Extension removed
[ 1417.571923] BUG: unable to handle kernel paging request at ffffffffc081a024
[ 1417.571962] IP: [<ffffffff813da854>] string+0x24/0x80
[ 1417.571987] PGD 1c09067 PUD 1c0b067 PMD 88e653067 PTE 0
[ 1417.572013] Oops: 0000 [#1] SMP
[ 1417.572026] Modules linked in: mb86a20s dvb_core cx231xx_alsa ir_kbd_i2c(-) tda18271 tea5767 tuner cx25840 cx231xx i2c_mux videobuf_vmalloc tveeprom cx2341x videobuf_core rc_core v4l2_common videodev media bnep usblp fuse xt_CHECKSUM iptable_mangle tun ebtable_filter ebtables ip6table_filter ip6_tables xt_physdev br_netfilter bridge nf_log_ipv4 nf_log_common xt_LOG xt_conntrack ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack cpufreq_stats vfat fat snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel snd_hda_intel snd_hda_codec kvm snd_hda_core snd_hwdep snd_seq snd_seq_device snd_pcm irqbypass crct10dif_pclmul iTCO_wdt crc32_pclmul nfsd hci_uart iTCO_vendor_support
[ 1417.572317]  snd_timer ghash_clmulni_intel btbcm intel_cstate btqca snd intel_uncore btintel intel_rapl_perf mei_me bluetooth mei shpchp soundcore pcspkr i2c_i801 auth_rpcgss wmi acpi_als kfifo_buf nfs_acl industrialio rfkill lockd pinctrl_sunrisepoint pinctrl_intel tpm_tis tpm intel_lpss_acpi intel_lpss acpi_pad grace sunrpc binfmt_misc hid_logitech_hidpp hid_logitech_dj 8021q garp stp llc mrp i915 i2c_algo_bit drm_kms_helper drm e1000e sdhci_pci sdhci mmc_core crc32c_intel ptp pps_core video i2c_hid fjes analog gameport joydev [last unloaded: rc_pixelview_002t]
[ 1417.572487] CPU: 4 PID: 24493 Comm: rmmod Tainted: G        W       4.7.0+ #2
[ 1417.572504] Hardware name:                  /NUC6i7KYB, BIOS KYSKLi70.86A.0041.2016.0817.1130 08/17/2016
[ 1417.572526] task: ffff880894b81e80 ti: ffff880896bdc000 task.ti: ffff880896bdc000
[ 1417.572544] RIP: 0010:[<ffffffff813da854>]  [<ffffffff813da854>] string+0x24/0x80
[ 1417.572564] RSP: 0018:ffff880896bdfbe8  EFLAGS: 00010286
[ 1417.572577] RAX: ffffffffc081a025 RBX: ffff8808935aa15c RCX: ffff0a00ffffff04
[ 1417.572594] RDX: ffffffffc081a024 RSI: ffffffffffffffff RDI: ffff8808935aa15c
[ 1417.572610] RBP: ffff880896bdfbe8 R08: fffffffffffffffe R09: ffff8808935aa91c
[ 1417.572628] R10: ffffffffc07b85d6 R11: 0000000000000000 R12: ffff8808935aa91c
[ 1417.572644] R13: 00000000000007c5 R14: ffffffffc07b85dd R15: ffffffffc07b85dd
[ 1417.572662] FS:  00007f5a5392d700(0000) GS:ffff8808bed00000(0000) knlGS:0000000000000000
[ 1417.572681] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1417.572705] CR2: ffffffffc081a024 CR3: 0000000897188000 CR4: 00000000003406e0
[ 1417.572735] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1417.572761] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 1417.572778] Stack:
[ 1417.572785]  ffff880896bdfc48 ffffffff813dcf77 0000000000000005 ffff8808935aa157
[ 1417.572806]  ffff880896bdfc58 ffff0a00ffffff04 000000009d27375e ffff8808935aa000
[ 1417.572829]  0000000000000800 ffff880896182800 0000000000000000 ffff88089e898ae0
[ 1417.572850] Call Trace:
[ 1417.572860]  [<ffffffff813dcf77>] vsnprintf+0x2d7/0x500
[ 1417.572873]  [<ffffffff813d3e12>] add_uevent_var+0x82/0x120
[ 1417.572890]  [<ffffffffc07b534d>] rc_dev_uevent+0x2d/0x60 [rc_core]
[ 1417.572907]  [<ffffffff81515969>] dev_uevent+0xd9/0x2d0
[ 1417.572921]  [<ffffffff813d4309>] kobject_uevent_env+0x2d9/0x4f0
[ 1417.572938]  [<ffffffff813d452b>] kobject_uevent+0xb/0x10
[ 1417.572954]  [<ffffffff81513a3f>] device_del+0x18f/0x260
[ 1417.572974]  [<ffffffff813d2db7>] ? kobject_put+0x27/0x50
[ 1417.572998]  [<ffffffffc07b5e25>] rc_unregister_device+0x75/0xb0 [rc_core]
[ 1417.573028]  [<ffffffffc07e6023>] ir_remove+0x23/0x30 [ir_kbd_i2c]
[ 1417.573055]  [<ffffffff8162bf88>] i2c_device_remove+0x58/0xb0
[ 1417.573078]  [<ffffffff81518191>] __device_release_driver+0xa1/0x160
[ 1417.573102]  [<ffffffff81518de6>] driver_detach+0xa6/0xb0
[ 1417.573122]  [<ffffffff81517b25>] bus_remove_driver+0x55/0xd0
[ 1417.573146]  [<ffffffff815195bc>] driver_unregister+0x2c/0x50
[ 1417.573168]  [<ffffffff8162cf62>] i2c_del_driver+0x22/0x50
[ 1417.573194]  [<ffffffffc07e6ba4>] ir_kbd_driver_exit+0x10/0x46c [ir_kbd_i2c]
[ 1417.573227]  [<ffffffff81126348>] SyS_delete_module+0x1b8/0x220
[ 1417.573254]  [<ffffffff817debf2>] entry_SYSCALL_64_fastpath+0x1a/0xa4
[ 1417.573279] Code: eb e9 76 ff ff ff 90 55 49 89 f1 48 89 ce 48 c1 fe 30 48 81 fa ff 0f 00 00 48 89 e5 4c 8d 46 ff 76 40 48 85 f6 74 4e 48 8d 42 01 <0f> b6 12 84 d2 74 43 49 01 c0 31 f6 eb 0c 48 83 c0 01 0f b6 50
[ 1417.573437] RIP  [<ffffffff813da854>] string+0x24/0x80
[ 1417.573455]  RSP <ffff880896bdfbe8>
[ 1417.573465] CR2: ffffffffc081a024
[ 1417.580053] ---[ end trace 4ca9e2eced326a62 ]---

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] cx231xx: can't proceed if I2C bus register fails
Mauro Carvalho Chehab [Mon, 5 Sep 2016 08:56:37 +0000 (05:56 -0300)]
[media] cx231xx: can't proceed if I2C bus register fails

The driver should not ignore errors while registering the I2C
bus, as this device can't even minimally work without the buses,
as it uses those buses internally to talk with the several IP
blocks inside the chip.

Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] cx231xx-i2c: handle errors with cx231xx_get_i2c_adap()
Mauro Carvalho Chehab [Mon, 5 Sep 2016 08:41:53 +0000 (05:41 -0300)]
[media] cx231xx-i2c: handle errors with cx231xx_get_i2c_adap()

The cx231xx_get_i2c_adap() function should return the I2C
adapter that will be used to talk with a device. It should never
be NULL, as otherwise the driver will try to dereference a
null pointer.

We might instead fix the callers, but if this condition
ever happens, it is really a driver bug, because i2c_port
should always be a value from enum CX231XX_I2C_MASTER_PORT.

Found when checking the code due to this bug:

[   39.769021] BUG: unable to handle kernel NULL pointer dereference at 0000000000000002
[   39.769105] IP: [<ffffffff81638393>] i2c_master_send+0x13/0x70

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] cx231xx-core: fix GPIO comments
Mauro Carvalho Chehab [Sat, 3 Sep 2016 17:36:16 +0000 (14:36 -0300)]
[media] cx231xx-core: fix GPIO comments

The number of the cx231xx REQ for GPIO register set/get are wrong.
They should follow what's there at cx231xx-pcb-cfg.h.

Noticed while checking the cx231xx parser at the v4l-utils.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] cx231xx: prints error code if can't switch TV mode
Mauro Carvalho Chehab [Sun, 4 Sep 2016 13:08:17 +0000 (10:08 -0300)]
[media] cx231xx: prints error code if can't switch TV mode

If something bad happens when switching between digital
and analog mode, prints an error and outputs the returned code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] cx231xx: fix GPIOs for Pixelview SBTVD hybrid
Mauro Carvalho Chehab [Sun, 4 Sep 2016 13:06:39 +0000 (10:06 -0300)]
[media] cx231xx: fix GPIOs for Pixelview SBTVD hybrid

This device uses GPIOs: 28 to switch between analog and
digital modes: on digital mode, it should be set to 1.

The code that sets it on analog mode is OK, but it misses
the logic that sets it on digital mode.

Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] cx231xx: don't return error on success
Mauro Carvalho Chehab [Sun, 4 Sep 2016 12:56:33 +0000 (09:56 -0300)]
[media] cx231xx: don't return error on success

The cx231xx_set_agc_analog_digital_mux_select() callers
expect it to return 0 or an error. Returning a positive value
makes the first attempt to switch between analog/digital to fail.

Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] mb86a20s: fix demod settings
Mauro Carvalho Chehab [Sun, 4 Sep 2016 13:43:53 +0000 (10:43 -0300)]
[media] mb86a20s: fix demod settings

With the current settings, only one channel locks properly.
That's likely because, when this driver was written, Brazil
were still using experimental transmissions.

Change it to reproduce the settings used by the newer drivers.
That makes it lock on other channels.

Tested with both PixelView SBTVD Hybrid (cx231xx-based) and
C3Tech Digital Duo HDTV/SDTV (em28xx-based) devices.

Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] mb86a20s: fix the locking logic
Mauro Carvalho Chehab [Sun, 4 Sep 2016 13:16:18 +0000 (10:16 -0300)]
[media] mb86a20s: fix the locking logic

On this frontend, it takes a while to start output normal
TS data. That only happens on state S9. On S8, the TS output
is enabled, but it is not reliable enough.

However, the zigzag loop is too fast to let it sync.

As, on practical tests, the zigzag software loop doesn't
seem to be helping, but just slowing down the tuning, let's
switch to hardware algorithm, as the tuners used on such
devices are capable of work with frequency drifts without
any help from software.

Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] tea5767: use module prefix on printed messages
Mauro Carvalho Chehab [Mon, 5 Sep 2016 10:21:27 +0000 (07:21 -0300)]
[media] tea5767: use module prefix on printed messages

use pr_fmt() & friends for error messages to output like:

[    9.651721] tea5767: Chip ID is not zero. It is not a TEA5767

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] tda18271: use prefix on all printk messages
Mauro Carvalho Chehab [Mon, 5 Sep 2016 10:21:18 +0000 (07:21 -0300)]
[media] tda18271: use prefix on all printk messages

Some messages have a hardcoded prefix; others not. Use the
pr_fmt() to ensure that all messages will use the same prefix.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agoMerge branch 'docs-next' of git://git.lwn.net/linux into patchwork
Mauro Carvalho Chehab [Mon, 5 Sep 2016 18:13:27 +0000 (15:13 -0300)]
Merge branch 'docs-next' of git://git.lwn.net/linux into patchwork

* 'docs-next' of git://git.lwn.net/linux:
  doc-rst: define PDF's of the media folder
  doc-rst: generic way to build PDF of sub-folders
  docs: sphinx-extensions: add metadata parallel-safe
  docs-rst: kernel-doc: fix typedef output in RST format
  docs-rst: improve typedef parser
  docs: kernel-parameter: Improve the description of nr_cpus and maxcpus
  docs-rst: kernel-doc: better output struct members

8 years agoMerge branch 'doc/4.9' into docs-next
Jonathan Corbet [Thu, 1 Sep 2016 14:56:20 +0000 (08:56 -0600)]
Merge branch 'doc/4.9' into docs-next

8 years agodoc-rst: define PDF's of the media folder
Markus Heiser [Wed, 24 Aug 2016 15:36:15 +0000 (17:36 +0200)]
doc-rst: define PDF's of the media folder

To build only the PDF of the media folder run::

  make SPHINXDIRS=media pdfdocs

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
8 years agodoc-rst: generic way to build PDF of sub-folders
Markus Heiser [Wed, 24 Aug 2016 15:36:14 +0000 (17:36 +0200)]
doc-rst: generic way to build PDF of sub-folders

This extends the method to build only sub-folders to the targets
"latexdocs" and "pdfdocs". To do so, a conf.py in the sub-folder is
required, where the latex_documents of the sub-folder are
defined. E.g. to build only gpu's PDF add the following to the
Documentation/gpu/conf.py::

  +latex_documents = [
  +    ("index", "gpu.tex", "Linux GPU Driver Developer's Guide",
  +     "The kernel development community", "manual"),
  +]

and run:

  make SPHINXDIRS=gpu pdfdocs

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
8 years agodocs: sphinx-extensions: add metadata parallel-safe
Markus Heiser [Wed, 24 Aug 2016 13:35:24 +0000 (15:35 +0200)]
docs: sphinx-extensions: add metadata parallel-safe

The setup() function of a Sphinx-extension can return a dictionary. This
is treated by Sphinx as metadata of the extension [1].

With metadata "parallel_read_safe = True" a extension is marked as
save for "parallel reading of source". This is needed if you want
build in parallel with N processes. E.g.:

  make SPHINXOPTS=-j4 htmldocs

will no longer log warnings like:

  WARNING: the foobar extension does not declare if it is safe for
  parallel reading, assuming it isn't - please ask the extension author
  to check and make it explicit.

Add metadata to extensions:

* kernel-doc
* flat-table
* kernel-include

[1] http://www.sphinx-doc.org/en/stable/extdev/#extension-metadata

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Tested-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
8 years agodocs-rst: kernel-doc: fix typedef output in RST format
Mauro Carvalho Chehab [Tue, 30 Aug 2016 23:20:58 +0000 (20:20 -0300)]
docs-rst: kernel-doc: fix typedef output in RST format

When using a typedef function like this one:
typedef bool v4l2_check_dv_timings_fnc (const struct v4l2_dv_timings * t, void * handle);

The Sphinx C domain expects it to create a c:type: reference,
as that's the way it creates the type references when parsing
a c:function:: declaration.

So, a declaration like:

.. c:function:: bool v4l2_valid_dv_timings (const struct v4l2_dv_timings * t, const struct v4l2_dv_timings_cap * cap, v4l2_check_dv_timings_fnc fnc, void * fnc_handle)

Will create a cross reference for :c:type:`v4l2_check_dv_timings_fnc`.

So, when outputting such typedefs in RST format, we need to handle
this special case, as otherwise it will produce those warnings:

./include/media/v4l2-dv-timings.h:43: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc
./include/media/v4l2-dv-timings.h:60: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc
./include/media/v4l2-dv-timings.h:81: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc

So, change the kernel-doc script to produce a RST output for the
above typedef as:
.. c:type:: v4l2_check_dv_timings_fnc

   **Typedef**: timings check callback

**Syntax**

  ``bool v4l2_check_dv_timings_fnc (const struct v4l2_dv_timings * t, void * handle);``

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
8 years agodocs-rst: improve typedef parser
Mauro Carvalho Chehab [Tue, 30 Aug 2016 23:20:57 +0000 (20:20 -0300)]
docs-rst: improve typedef parser

Improve the parser to handle typedefs like:

typedef bool v4l2_check_dv_timings_fnc(const struct v4l2_dv_timings *t, void *handle);

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
8 years agodocs: kernel-parameter: Improve the description of nr_cpus and maxcpus
Baoquan He [Wed, 24 Aug 2016 05:06:45 +0000 (13:06 +0800)]
docs: kernel-parameter: Improve the description of nr_cpus and maxcpus

From the old description people still can't get what's the exact
difference between nr_cpus and maxcpus. Especially in kdump kernel
nr_cpus is always suggested if it's implemented in the ARCH. The
reason is nr_cpus is used to limit the max number of possible cpu
in system, the sum of already plugged cpus and hot plug cpus can't
exceed its value. However maxcpus is used to limit how many cpus
are allowed to be brought up during bootup.

Signed-off-by: Baoquan He <bhe@redhat.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
8 years ago[media] m2m-deinterlace: Fix error print during probe
Peter Ujfalusi [Tue, 23 Aug 2016 13:39:39 +0000 (10:39 -0300)]
[media] m2m-deinterlace: Fix error print during probe

v4l2_err() can not be used for printing error for missing interleaved
support in DMA as this point the pcdev->v4l2_dev is not valid.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] redrat3: fix sparse warning
Hans Verkuil [Tue, 23 Aug 2016 06:48:37 +0000 (03:48 -0300)]
[media] redrat3: fix sparse warning

Fix this sparse warning:

drivers/media/rc/redrat3.c:490:18: warning: incorrect type in assignment (different base types)
drivers/media/rc/redrat3.c:495:9: warning: cast to restricted __be32

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] drivers: hackrf: fixed a coding style issue
Jannik Becher [Sun, 21 Aug 2016 18:44:20 +0000 (15:44 -0300)]
[media] drivers: hackrf: fixed a coding style issue

changed 'unsigned' to 'unsigned int' to obtain the coding style.

Signed-off-by: Jannik Becher <Becher.Jannik@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodocs-rst: kernel-doc: better output struct members
Mauro Carvalho Chehab [Tue, 23 Aug 2016 01:02:57 +0000 (22:02 -0300)]
docs-rst: kernel-doc: better output struct members

Right now, for a struct, kernel-doc produces the following output:

.. c:type:: struct v4l2_prio_state

   stores the priority states

**Definition**

::

  struct v4l2_prio_state {
    atomic_t prios[4];
  };

**Members**

``atomic_t prios[4]``
  array with elements to store the array priorities

Putting a member name in verbatim and adding a continuation line
causes the LaTeX output to generate something like:
item[atomic_t prios\[4\]] array with elements to store the array priorities

Everything inside "item" is non-breakable, with may produce
lines bigger than the column width.

Also, for function members, like:

        int (* rx_read) (struct v4l2_subdev *sd, u8 *buf, size_t count,ssize_t *num);

It puts the name of the member at the end, like:

        int (*) (struct v4l2_subdev *sd, u8 *buf, size_t count,ssize_t *num) read

With is very confusing.

The best is to highlight what really matters: the member name.
is a secondary information.

So, change kernel-doc, for it to produce the output on a different way:

**Members**

``prios[4]``

  array with elements to store the array priorities

Also, as the type is not part of LaTeX "item[]", LaTeX will split it into
multiple lines, if needed.

So, both LaTeX/PDF and HTML outputs will look good.

It should be noticed, however, that the way Sphinx LaTeX output handles
things like:

Foo
   bar

is different than the HTML output. On HTML, it will produce something
like:

**Foo**
   bar

While, on LaTeX, it puts both foo and bar at the same line, like:

**Foo** bar

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
8 years ago[media] dvb_frontend: Use memdup_user() rather than duplicating its implementation
Markus Elfring [Fri, 19 Aug 2016 08:04:54 +0000 (05:04 -0300)]
[media] dvb_frontend: Use memdup_user() rather than duplicating its implementation

* Reuse existing functionality from memdup_user() instead of keeping
  duplicate source code.

  This issue was detected by using the Coccinelle software.

* Return directly if this copy operation failed.

* Replace the specification of data structures by pointer dereferences
  to make the corresponding size determination a bit safer according to
  the Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] vb2: Fix vb2_core_dqbuf() kernel-doc
Javier Martinez Canillas [Wed, 17 Aug 2016 17:26:28 +0000 (14:26 -0300)]
[media] vb2: Fix vb2_core_dqbuf() kernel-doc

The kernel-doc has the wrong function name and also the pindex
parameter is missing in the documentation.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: v4l2-ctrls: append missing h264 profile string
Stanimir Varbanov [Tue, 16 Aug 2016 09:09:42 +0000 (06:09 -0300)]
[media] media: v4l2-ctrls: append missing h264 profile string

This appends missing "Stereo High" h264 profile string. Without
it the v4l2 compliance would crash kernel with NULL pointer
dereference at:

[   26.882278] [<ffff000008685cbc>] std_validate+0x378/0x42c
[   26.886967] [<ffff000008687424>] set_ctrl+0x8c/0x134
[   26.892521] [<ffff00000868755c>] v4l2_s_ctrl+0x90/0xf4
[   26.897555] [<ffff00000867f3b0>] v4l_s_ctrl+0x4c/0x110
[   26.902503] [<ffff00000867db04>] __video_do_ioctl+0x240/0x2b4
[   26.907625] [<ffff00000867d778>] video_usercopy+0x33c/0x46c
[   26.913441] [<ffff00000867d8bc>] video_ioctl2+0x14/0x1c
[   26.918822] [<ffff000008678878>] v4l2_ioctl+0xe0/0x110
[   26.924032] [<ffff0000081da898>] do_vfs_ioctl+0xb4/0x764
[   26.929238] [<ffff0000081dafcc>] SyS_ioctl+0x84/0x98
[   26.934707] [<ffff000008082f4c>] __sys_trace_return+0x0/0x4

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media-types.rst: fix typo
Hans Verkuil [Mon, 15 Aug 2016 08:10:15 +0000 (05:10 -0300)]
[media] media-types.rst: fix typo

Fix copy-and-paste error: the radio devices are /dev/radio, not /dev/vbi.

Signed-off-by: Hans Verkuil <<hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] helene: fix memory leak when heleno_x_pon fails
Colin Ian King [Sat, 13 Aug 2016 18:16:54 +0000 (15:16 -0300)]
[media] helene: fix memory leak when heleno_x_pon fails

The error return path of failed calls to heleno_x_pon leak
memory because priv is not kfree'd.  Fix this by kfree'ing
priv before returning.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] staging: media: lirc: lirc_sasem: don't print error when allocating urb fails
Wolfram Sang [Thu, 11 Aug 2016 21:23:40 +0000 (18:23 -0300)]
[media] staging: media: lirc: lirc_sasem: don't print error when allocating urb fails

kmalloc will print enough information in case of failure.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] staging: media: lirc: lirc_imon: don't print error when allocating urb fails
Wolfram Sang [Thu, 11 Aug 2016 21:23:39 +0000 (18:23 -0300)]
[media] staging: media: lirc: lirc_imon: don't print error when allocating urb fails

kmalloc will print enough information in case of failure.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] v4l2-async: remove unneeded .registered_async callback
Javier Martinez Canillas [Thu, 11 Aug 2016 16:28:16 +0000 (13:28 -0300)]
[media] v4l2-async: remove unneeded .registered_async callback

The v4l2_subdev_core_ops .registered_async callback was added to notify
a subdev when its entity has been registered with the media device, to
allow for example to modify the media graph (i.e: adding entities/links).

But that's not needed since there is already a .registered callback in
struct v4l2_subdev_internal_ops that's called after the entity has been
registered with the media device in v4l2_device_register_subdev().

Suggested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] tvp5150: use sd internal ops .registered instead .registered_async
Javier Martinez Canillas [Thu, 11 Aug 2016 16:28:15 +0000 (13:28 -0300)]
[media] tvp5150: use sd internal ops .registered instead .registered_async

The driver is using the struct v4l2_subdev_core_ops .registered_async
callback to register the connector entities and create the pad links
after the subdev entity has been registered with the media device.

But the .registered_async callback isn't needed since the v4l2 core
already calls the struct v4l2_subdev_internal_ops .registered callback
in v4l2_device_register_subdev(), after media_device_register_entity().

So, use the .registered() callback instead of the .registered_async()
that is going to be removed in a following patch since isn't needed.

Suggested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] v4l: Do not allow re-registering sub-devices
Sakari Ailus [Thu, 11 Aug 2016 10:18:37 +0000 (07:18 -0300)]
[media] v4l: Do not allow re-registering sub-devices

Albeit not prohibited explicitly, re-registering sub-devices generated a
big, loud warning which quite likely soon was followed by a crash. What
followed was re-initialising a media entity, driver's registered() callback
being called and re-adding a list entry to a list.

Prevent this by returning an error if a sub-device is already registered.

[mchehab@s-opensource.com: reorder logic to check if !sd before dereferencing it]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media-entity.h: remove redundant macro definition for gobj_to_pad()
Liu Ying [Thu, 11 Aug 2016 05:10:11 +0000 (02:10 -0300)]
[media] media-entity.h: remove redundant macro definition for gobj_to_pad()

The macro gobj_to_pad() is defined twice in media-entity.h.
Let's remove one.

Signed-off-by: Liu Ying <gnuiyl@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media-entity.h: Correct KernelDoc of media_entity_enum_empty()
Liu Ying [Thu, 11 Aug 2016 05:10:09 +0000 (02:10 -0300)]
[media] media-entity.h: Correct KernelDoc of media_entity_enum_empty()

The function media_entity_enum_empty() returns true when the bitmap
of the input parameter media entity enumeration is empty instead of marked.
This patch corrects the return value description of the function.

Signed-off-by: Liu Ying <gnuiyl@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media-entity.h: remove redundant macro definition for gobj_to_link()
Liu Ying [Thu, 11 Aug 2016 05:10:10 +0000 (02:10 -0300)]
[media] media-entity.h: remove redundant macro definition for gobj_to_link()

The macro gobj_to_link() is defined twice in media-entity.h.
Let's remove one.

Signed-off-by: Liu Ying <gnuiyl@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] drxd_hard: Add missing error code assignment before test
Christophe JAILLET [Wed, 10 Aug 2016 05:54:41 +0000 (02:54 -0300)]
[media] drxd_hard: Add missing error code assignment before test

It is likely that checking the result of the 2nd 'read16' is expected here.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] cx23885: Add support for Hauppauge WinTV quadHD ATSC version
Stephen Backway [Tue, 9 Aug 2016 22:43:40 +0000 (19:43 -0300)]
[media] cx23885: Add support for Hauppauge WinTV quadHD ATSC version

Add support for the Hauppauge WinTV quadHD ATSC version.
IR support has not been provided, all 4 tuners, demodulators etc are working.
Further documentation can be found on Linux TV wiki.

Signed-off-by: Stephen Backway <stev391@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] rcar-fcp: Make sure rcar_fcp_enable() returns 0 on success
Geert Uytterhoeven [Tue, 9 Aug 2016 15:36:41 +0000 (12:36 -0300)]
[media] rcar-fcp: Make sure rcar_fcp_enable() returns 0 on success

When resuming from suspend-to-RAM on r8a7795/salvator-x:

    dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1
    PM: Device fe940000.fdp1 failed to resume noirq: error 1
    dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1
    PM: Device fe944000.fdp1 failed to resume noirq: error 1
    dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1
    PM: Device fe948000.fdp1 failed to resume noirq: error 1

According to its documentation, rcar_fcp_enable() returns 0 on success
or a negative error code if an error occurs.  Hence
fdp1_pm_runtime_resume() and vsp1_pm_runtime_resume() forward its return
value to their callers.

However, rcar_fcp_enable() forwards the return value of
pm_runtime_get_sync(), which can actually be 1 on success, leading to
the resume failure above.

To fix this, consider only negative values returned by
pm_runtime_get_sync() to be failures.

Fixes: 7b49235e83b2347c ("[media] v4l: Add Renesas R-Car FCP driver")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: pci: pt3: don't print error when adding adapter fails
Wolfram Sang [Tue, 9 Aug 2016 11:35:14 +0000 (08:35 -0300)]
[media] media: pci: pt3: don't print error when adding adapter fails

The core will do this for us now.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: usb: dvb-usb-v2: dvb_usb_core: don't print error when adding adapter...
Wolfram Sang [Tue, 9 Aug 2016 11:35:16 +0000 (08:35 -0300)]
[media] media: usb: dvb-usb-v2: dvb_usb_core: don't print error when adding adapter fails

The core will do this for us now.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: pci: netup_unidvb: don't print error when adding adapter fails
Wolfram Sang [Tue, 9 Aug 2016 11:35:13 +0000 (08:35 -0300)]
[media] media: pci: netup_unidvb: don't print error when adding adapter fails

The core will do this for us now.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
Acked-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] adv7511: fix error return code in adv7511_probe()
Wei Yongjun [Thu, 4 Aug 2016 08:31:22 +0000 (05:31 -0300)]
[media] adv7511: fix error return code in adv7511_probe()

Fix to return error code -ENOMEM from the i2c client register error
handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] VIDEO_MEDIATEK_VPU should depend on HAS_DMA
Geert Uytterhoeven [Wed, 3 Aug 2016 18:10:09 +0000 (15:10 -0300)]
[media] VIDEO_MEDIATEK_VPU should depend on HAS_DMA

If NO_DMA=y:

    ERROR: "bad_dma_ops" [drivers/media/platform/mtk-vpu/mtk-vpu.ko] undefined!

Add a dependency on HAS_DMA to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] exynos4-is: fimc-is-i2c: don't print error when adding adapter fails
Wolfram Sang [Tue, 9 Aug 2016 11:35:15 +0000 (08:35 -0300)]
[media] exynos4-is: fimc-is-i2c: don't print error when adding adapter fails

The core will do this for us now.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] s5p-mfc: Remove deprecated create_singlethread_workqueue
Bhaktipriya Shridhar [Sat, 16 Jul 2016 08:30:25 +0000 (05:30 -0300)]
[media] s5p-mfc: Remove deprecated create_singlethread_workqueue

alloc_workqueue replaces deprecated create_singlethread_workqueue().

The MFC device driver is a v4l2 driver which can encode/decode video
raw/elementary streams and has support for all popular video codecs.

The driver's watchdog_workqueue has been replaced with system_wq since
it queues a single work item, &dev->watchdog_work, which calls for no
ordering requirement. The work item is involved in running the watchdog
timer and is not being used on a memory reclaim path.

Work item has been flushed in s5p_mfc_remove() to ensure
that there are no pending tasks while disconnecting the driver.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: s5p-jpeg add missing blank lines after declarations
Shuah Khan [Thu, 14 Jul 2016 20:01:56 +0000 (17:01 -0300)]
[media] media: s5p-jpeg add missing blank lines after declarations

Missing blank lines after declarations are making it hard to read the
code. Fix them and also fix other checkpatch warnings at the same time.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: s5p-mfc remove unnecessary error messages
Shuah Khan [Thu, 14 Jul 2016 14:40:22 +0000 (11:40 -0300)]
[media] media: s5p-mfc remove unnecessary error messages

Removed unnecessary error message as appropriate error code is returned.
Changed error message into a debug.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: s5p-mfc Fix misspelled error message and checkpatch errors
Shuah Khan [Tue, 12 Jul 2016 17:28:30 +0000 (14:28 -0300)]
[media] media: s5p-mfc Fix misspelled error message and checkpatch errors

Fix misspelled error message and existing checkpatch errors in the
error message conditional.

WARNING: suspect code indent for conditional statements (8, 24)
        if (ctx->state != MFCINST_HEAD_PARSED &&
[...]
        mfc_err("Can not get crop information\n");

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] s5p-mfc: remove redundant return value check of platform_get_resource()
Wei Yongjun [Tue, 12 Jul 2016 11:27:59 +0000 (08:27 -0300)]
[media] s5p-mfc: remove redundant return value check of platform_get_resource()

Remove unneeded error handling on the result of a call
to platform_get_resource() when the value is passed to
devm_ioremap_resource().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: s5p-mfc remove void function return statement
Shuah Khan [Tue, 12 Jul 2016 00:29:43 +0000 (21:29 -0300)]
[media] media: s5p-mfc remove void function return statement

Remove void function return statement

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] media: s5p-mfc fix invalid memory access from s5p_mfc_release()
Shuah Khan [Fri, 8 Jul 2016 22:29:25 +0000 (19:29 -0300)]
[media] media: s5p-mfc fix invalid memory access from s5p_mfc_release()

If s5p_mfc_release() runs after s5p_mfc_remove(), the former will access
invalid s5p_mfc_dev pointer saved in the s5p_mfc_ctx and runs into kernel
paging request errors.

Clear ctx dev pointer in s5p_mfc_remove() and change s5p_mfc_release() to
avoid work that requires ctx->dev.

odroid kernel: Unable to handle kernel paging request at virtual address
    f17c1104
odroid kernel: pgd = ebca4000
odroid kernel: [f17c1104] *pgd=6e23d811, *pte=00000000, *ppte=00000000
odroid kernel: Internal error: Oops: 807 [#1] PREEMPT SMP ARM
odroid kernel: Modules linked in: cpufreq_userspace cpufreq_powersave
    cpufreq_conservative s5p_mfc s5p_jpeg v4l2_mem2mem
    videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_core
    v4l2_common videodev media
odroid kernel: Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
odroid kernel: task: c2241400 ti: e7018000 task.ti: e7018000
odroid kernel: PC is at s5p_mfc_reset+0x40/0x28c [s5p_mfc]
odroid kernel: LR is at s5p_mfc_reset+0x34/0x28c [s5p_mfc]
odroid kernel: pc : [<bf15bfbc>]    lr : [<bf15bfb0>] psr: 60010013
odroid kernel: [<bf15bfbc>] (s5p_mfc_reset [s5p_mfc]) from [<bf15c62c>]
    (s5p_mfc_deinit_hw+0x14/0x3c [s5p_mfc])
odroid kernel: [<bf15c62c>] (s5p_mfc_deinit_hw [s5p_mfc]) from [<bf155958>]
    (s5p_mfc_release+0xac/0x1c4 [s5p_mfc])
odroid kernel: [<bf155958>] (s5p_mfc_release [s5p_mfc]) from [<bf021344>]
    (v4l2_release+0x38/0x74 [videodev])
odroid kernel: [<bf021344>] (v4l2_release [videodev]) from [<c01e4274>]
    (__fput+0x80/0x1c8)
odroid kernel: [<c01e4274>] (__fput) from [<c0135c58>]
    (task_work_run+0x94/0xc8)
odroid kernel: [<c0135c58>] (task_work_run) from [<c010a9d4>]
    (do_work_pending+0x7c/0xa4)
odroid kernel: [<c010a9d4>] (do_work_pending) from [<c0107794>]
    (slow_work_pending+0xc/0x20)
odroid kernel: Code: eb3edacc e5953078 e3a06000 e2833c11 (e5836004)

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Tested-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>