Commit Graph

602101 Commits

Author SHA1 Message Date
Mauro Carvalho Chehab
163f1e93e9 [media] media-devnode: fix namespace mess
Along all media controller code, "mdev" is used to represent
a pointer to struct media_device, and "devnode" for a pointer
to struct media_devnode.

However, inside media-devnode.[ch], "mdev" is used to represent
a pointer to struct media_devnode.

This is very confusing and may lead to development errors.

So, let's change all occurrences at media-devnode.[ch] to
also use "devnode" for such pointers.

This patch doesn't make any functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-06-15 17:56:06 -03:00
Mauro Carvalho Chehab
dc19ed1571
Update my main e-mails at the Kernel tree
For the third time in three years, I'm changing my e-mail at
Samsung. That's bad, as it may stop communications with me for
a while. So, this time, I'll also the mchehab@kernel.org e-mail,
as it remains stable since ever.

Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-06-14 14:55:18 -03:00
Jani Nikula
03d35d9ec4 Documentation/sphinx: add support for specifying extra export files
Let the user specify file patterns where to look for the EXPORT_SYMBOLs
in addition to the file with kernel-doc comments. This is directly based
on the -export-file FILE option added to kernel-doc in "kernel-doc: add
support for specifying extra files for EXPORT_SYMBOLs", but we extend
that with globbing patterns in the Sphinx extension.

The file patterns are added as options to the :export: and :internal:
arguments of the kernel-doc directive. For example, to extract the
documentation of exported functions from include/net/mac80211.h:

.. kernel-doc:: include/net/mac80211.h
   :export: net/mac80211/*.c

Without the file pattern, no exported functions would be found, as the
EXPORT_SYMBOLs are placed in the various source files under
net/mac80211.

The matched files are also added as dependencies on the document in
Sphinx, as they may affect the output. This is one of the reasons to do
the globbing in the Sphinx extension instead of in scripts/kernel-doc.

The file pattern remains optional, and is not needed if the kernel-doc
comments and EXPORT_SYMBOLs are placed in the source file passed in as
the main argument to the kernel-doc directive. This is the most common
case across the kernel source tree.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2016-06-10 16:46:55 +03:00
Colin Ian King
cac1c639bc [media] m88rs2000: initialize status to zero
status is not initialized so it can contain garbage. The
check for status containing the FE_HAS_LOCK bit may randomly pass
or fail if the read of register 0x8c fails to set status after 25
read attempts.  Fix this by initializing status to 0.

Issue found with CoverityScan, CID#986738

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-10 08:41:36 -03:00
Dan Carpenter
e44c153b30 [media] em28xx-i2c: rt_mutex_trylock() returns zero on failure
The code is checking for negative returns but it should be checking for
zero.

Fixes: aab3125c43 ('[media] em28xx: add support for registering multiple i2c buses')

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-10 08:29:40 -03:00
Jani Nikula
057de5c4dd Documentation/sphinx: use a more sensible string split in kernel-doc extension
Using the default str.split doesn't return empty strings like the
current version does.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2016-06-10 11:29:21 +03:00
Jani Nikula
06173fe33a Documentation/sphinx: remove unnecessary temporary variable
Leftover cruft. No functional changes.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2016-06-10 11:29:20 +03:00
Jani Nikula
c9b2cfb3fa kernel-doc: unify all EXPORT_SYMBOL scanning to one place
Scan all input files for EXPORT_SYMBOLs along with the explicitly
specified export files before actually parsing anything.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2016-06-10 11:29:20 +03:00
Jani Nikula
88c2b57da4 kernel-doc: add support for specifying extra files for EXPORT_SYMBOLs
If the kernel-doc comments for functions are not in the same file as the
EXPORT_SYMBOL statements, the -export and -internal output selections do
not work as expected. This is typically the case when the kernel-doc
comments are in header files next to the function declarations and the
EXPORT_SYMBOL statements are next to the function definitions in the
source files.

Let the user specify additional source files in which to look for the
EXPORT_SYMBOLs using the new -export-file FILE option, which may be
given multiple times.

The pathological example for this is include/net/mac80211.h, which has
all the kernel-doc documentation for the exported functions defined in a
plethora of source files net/mac80211/*.c.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2016-06-10 11:29:19 +03:00
Jani Nikula
1ad560e43c kernel-doc: abstract filename mapping
Reduce duplication in follow-up work. No functional changes.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2016-06-10 11:29:19 +03:00
Jani Nikula
da9726ecfb kernel-doc: add missing semi-colons in option parsing
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2016-06-10 11:29:18 +03:00
Jani Nikula
95b6be9d19 kernel-doc: do not warn about duplicate default section names
Since

commit 32217761ee
Author: Jani Nikula <jani.nikula@intel.com>
Date:   Sun May 29 09:40:44 2016 +0300

    kernel-doc: concatenate contents of colliding sections

we started getting (more) errors on duplicate section names, especially
on the default section name "Description":

include/net/mac80211.h:3174: warning: duplicate section name 'Description'

This is usually caused by a slightly unorthodox placement of parameter
descriptions, like in the above case, and kernel-doc resetting back to
the default section more than once within a kernel-doc comment.

Ignore warnings on the duplicate section name automatically assigned by
kernel-doc, and only consider explicitly user assigned duplicate section
names an issue.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2016-06-10 11:29:18 +03:00
Jani Nikula
5668604a6c kernel-doc: remove old debug cruft from dump_section()
No functional changes.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2016-06-10 11:29:05 +03:00
Jonathan Corbet
8569de68e7 docs: kernel-doc: Add "example" and "note" to the magic section types
Lots of kerneldoc entries use "example:" or "note:" as section headers.
Until such a time as we can make them use proper markup, make them work as
intended.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-06-09 13:35:05 -06:00
Kees Cook
c9de4a82c8 docs: self-protection: rename "leak" to "exposure"
The meaning of "leak" can be both "untracked resource allocation" and
"memory content disclosure". This document's use was entirely of the
latter meaning, so avoid the confusion by using the Common Weakness
Enumeration name for this: Information Exposure (CWE-200). Additionally
adds a section on structure randomization.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-06-09 13:23:27 -06:00
Jonathan Corbet
6d5244c72e Merge branch 'sphinx-for-docs-next' into doc/4.8
Jani Nikula says:

Jon, this is v2 of [1] and [2], with a considerable amount of polish and
fixes added. We started dogfooding this within drm-intel, and Daniel has
reviewed the lot and contributed a number of fixes, most notably
accurate file and line number references from Sphinx build
errors/warnings to the kernel-doc comments in source code.

We believe this is now in good shape for merging for v4.8. It's all in
my sphinx-for-docs-next branch that you've already looked at; pull
details below.

When this lands in docs-next and we can backmerge to drm, we'll plunge
ahead and convert gpu.tmpl to rst, and have that ready for v4.8. We
think it's best to contribute that via the drm tree, as it'll involve
splitting up the documentation and likely numerous updates to kernel-doc
comments.

I plan to update Documentation/kernel-doc-nano-HOWTO.txt for Sphinx and
rst, obviously converting it to rst while at it.
2016-06-09 13:17:11 -06:00
Zhaoxiu Zeng
917d11a4e0 [media] mt2063: use lib gcd
This patch removes the local MT2063_gcd function, uses lib gcd instead

Signed-off-by: Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-09 15:58:32 -03:00
Martin Blumenstingl
d10f89cc36 [media] rtl2832: add support for slave ts pid filter
The rtl2832 demod has 2 sets of PID filters. This patch enables
the filter support when using a slave demod.

Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-09 08:48:46 -03:00
Antti Palosaari
2b987ea78b [media] af9035: fix logging
Remove __func__ and KBUILD_MODNAME from logging formatters and pass
USB interface device instead, so logging can be done correctly.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-09 08:47:48 -03:00
Alessandro Radicati
1882f59f93 [media] af9035: fix for MXL5007T devices with I2C read issues
The MXL5007T tuner will lock-up on some devices after an I2C read
transaction.  This patch works around this issue by inhibiting such
operations and emulating a 0x00 response. The workaround is only
applied to USB devices known to exhibit this flaw.

Signed-off-by: Alessandro Radicati <alessandro@radicati.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-09 08:46:00 -03:00
Alessandro Radicati
57f1c05338 [media] af9035: I2C combined write + read transaction fix
This patch will modify the af9035 driver to use the register address
fields of the I2C read command for the combined write/read transaction
case.  Without this change, the firmware issues just a I2C read
transaction without the preceding write transaction to select the
register.

Signed-off-by: Alessandro Radicati <alessandro@radicati.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-09 08:44:54 -03:00
Marek Szyprowski
9f5a802b1d [media] of: reserved_mem: restore old behavior when no region is defined
Change return value back to -ENODEV when no region is defined for given
device. This restores old behavior of this function, as some drivers rely
on such error code.

Fixes: 59ce403972 ("of: reserved_mem: add support for using more than
       one region for given device")

Reported-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Liviu Dudau <Liviu.Dudau@arm.com>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
2016-06-09 06:55:15 -03:00
Max Kellermann
bd3df3c53e [media] drivers/media/dvb-core/en50221: move code to dvb_ca_private_free()
Prepare for postponing the call until all file handles have been
closed.

[mchehab@osg.samsung.com: make checkpatch happy]
Signed-off-by: Max Kellermann <max@duempel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 17:14:43 -03:00
Olli Salonen
212fa08126 [media] ds3000: return error if invalid symbol rate is set
Return -EINVAL if ds3000_set_frontend is called with invalid parameters.

v1 of the patch series got incorrect subject lines.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 17:10:04 -03:00
Fengguang Wu
155af08b15 [media] fix semicolon.cocci warnings
drivers/media/dvb-frontends/helene.c:750:2-3: Unneeded semicolon

 Remove unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

CC: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 16:56:55 -03:00
Martin Blumenstingl
1f846620e7 [media] rtl28xxu: sort the config symbols which are auto-selected
No functional changes.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 15:50:40 -03:00
Martin Blumenstingl
d287a4ef92 [media] rtl28xxu: auto-select more DVB-frontends and tuners
This adds the missing auto-select bits for DVB-frontends and tuners
(if MEDIA_SUBDRV_AUTOSELECT is enabled) which are used by the various
rtl28xxu devices.
The driver itself probes for three more tuners, but it's not actually
using any of them:
- MEDIA_TUNER_MT2063
- MEDIA_TUNER_MT2266
- MEDIA_TUNER_MXL5007T

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 15:49:52 -03:00
Antti Palosaari
94d0eaa419 [media] mn88472: move out of staging to media
Move mn88472 DVB-T/T2/C demod driver out of staging to media.

v2: Fix build error reported by kbuild test robot:
drivers/staging/media/mn88472/Makefile: No such file or directory

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 15:46:47 -03:00
Antti Palosaari
8d1f38fcb7 [media] mn88472: finalize driver
Finalize driver in order to move out of staging.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 15:41:58 -03:00
Julia Lawall
eb7e61b62d [media] mn88472: fix typo
firmare -> firmware

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 15:40:05 -03:00
Antti Palosaari
734fd634a6 [media] rtl28xxu: increase failed I2C msg repeat count to 3
1 and 2 wasn't enough for mn88472 chip on Astrometa device,
so increase it to 3.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 15:39:46 -03:00
Julia Lawall
c5ee19c866 [media] mn88473: fix typo
firmare -> firmware

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 15:39:01 -03:00
Antti Palosaari
37cf9b2d5b [media] mn88473: fix error path on probe()
Latest, 3rd, regmap instance should be freed on error case.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 15:38:44 -03:00
Hans Verkuil
9c2ccd3c64 [media] staging/media: remove deprecated timb driver
Remove this deprecated old driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Richard Röjfors <richard@puffinpack.se>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 15:37:57 -03:00
Hans Verkuil
c021127527 [media] staging/media: remove deprecated omap1 driver
Remove this deprecated old driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 15:37:22 -03:00
Hans Verkuil
c93cc61475 [media] staging/media: remove deprecated mx3 driver
Remove this deprecated old driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 15:37:01 -03:00
Hans Verkuil
6b879edf75 [media] staging/media: remove deprecated mx2 driver
Remove this deprecated old driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 15:36:40 -03:00
ayaka
4cf11a481f [media] s5p-mfc: fix a typo in s5p_mfc_dec
It is a cosmetic commit.

Signed-off-by: ayaka <ayaka@soulik.info>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 13:03:52 -03:00
ayaka
ee0829f475 [media] s5p-mfc: remove unnecessary check in try_fmt
We don't need to request the sizeimage or num_planes
in try_fmt.

Signed-off-by: ayaka <ayaka@soulik.info>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 13:03:35 -03:00
ayaka
bcbf298669 [media] s5p-mfc: Add handling of buffer freeing reqbufs request
The encoder forget the work to call hardware to release its buffers.
This patch came from chromium project. I just change its code
style and make the API match with new kernel.

Signed-off-by: ayaka <ayaka@soulik.info>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 13:02:47 -03:00
Abylay Ospan
fae2080a38 MAINTAINERS: Add Sony Helene TV tuner entry
I'm maintainer for Sony Helene tuner (drivers/media/dvb-frontends/helene.*)

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 12:55:15 -03:00
Mauro Carvalho Chehab
b6095d29a2 [media] helene: fix a warning when printing sizeof()
drivers/media/dvb-frontends/helene.c: In function 'helene_write_regs':
drivers/media/dvb-frontends/helene.c:312:5: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Wformat=]
     "wr reg=%04x: len=%d vs %lu is too big!\n",
     ^

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 12:19:32 -03:00
Abylay Ospan
9ca1736f8d [media] fix typo in SONY demodulator description
correct is CXD2841ER and CXD2854ER
incorrect was CXD2441ER and CXD2454ER

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 12:17:49 -03:00
Abylay Ospan
3f3b48a0c6 [media] Change frontend allocation strategy for NetUP Universal DVB cards
Old behaviour:
frontend0 - DVB-S/S2
frontend1 - DVB-T/T2
frontend2 - DVB-C
frontend3 - ISDB-T

New behaviour (DVBv5 API compliant):
frontend0 - DVB-S/S2
frontend1 - DVB-T/T2/C/ISDB-T

DTV standard should be selected by DTV_DELIVERY_SYSTEM call.

And DVB-C default bandwidth now 8MHz

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 12:16:37 -03:00
Abylay Ospan
6c77161a18 [media] support DVB-T2 for SONY CXD2841/54
bandwidth 1.7,5,6,7,8Mhz support for DVB-T2

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 12:15:12 -03:00
Abylay Ospan
1cdc4f09eb [media] fix DVB-S/S2 tuning
Fixed HELENE tuner frequency calculation

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 12:14:19 -03:00
Mauro Carvalho Chehab
76344a3fc5 [media] ISDB-T retune and offset fix and DVB-C bw fix
now when new tuning parameters specified demod should retune.
Also ISDB-T frequency offset calculation added
(cxd2841er_get_carrier_offset_i).

While here, fix re-tune for DVB-C Annex A, using the desired
bandwidth, instead of using 8MHz.

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 12:13:50 -03:00
Abylay Ospan
4da093ce4e [media] Fix DVB-T frequency offset calculation
Fix offset calculation inside cxd2841er_get_carrier_offset_t
Now DVB-T should be tuned correctly

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 12:12:46 -03:00
Abylay Ospan
30ae3307ad [media] Sanity check when initializing DVB-S/S2 demodulator
Avoid error message:
cxd2841er_read_status_s(): invalid state 1
Always force demod to shutdown state before initializing

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 12:12:25 -03:00
Abylay Ospan
c5ea46dae9 [media] Add carrier offset calculation for DVB-T
Adding cxd2841er_get_carrier_offset_t to calculate DVB-T offset
for Sony demodulators CXD2841ER and CXD2854ER

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 12:11:59 -03:00