[media] v4l2-event.rst: add text from v4l2-framework.rst
Move the v4l2 event-specific text from v4l2-framework.rst
to v4l2-event.rst. That helps to keep the text together with
the functions it describes, and makes easier to identify
documentation gaps.
As we merged the videobuf chapter at the kABI section, and it
is a way more complete, just remove the small videobuf chapter
that came from framework.txt.
The kAPI, v4l-drivers and dvb-drivers never used the
GNU FDL license. The addition of such license header were
just due to copy-and-paste. So, let's fix it.
As the media_kapi were part of device-drivers.tmp, it is
under GPL v2+.
The other two books is an agregation of files without any
license explicitly specified. So, they're all bound to the
Kernel's COPYING license. So, they're GPL v2 only.
The uAPI book has 5 parts, but they lost numeration after
conversion to rst. Manually number those parts, and make
the main index with 1 depth, to only show the parts and
the annexes.
At each part, use :maxwidth: 5, in order to show a more
complete index.
While here, fix the cross-references between different
books.
* patchwork: (1492 commits)
[media] cec: always check all_device_types and features
[media] cec: poll should check if there is room in the tx queue
[media] vivid: support monitor all mode
[media] cec: fix test for unconfigured adapter in main message loop
[media] cec: limit the size of the transmit queue
[media] cec: zero unused msg part after msg->len
[media] cec: don't set fh to NULL in CEC_TRANSMIT
[media] cec: clear all status fields before transmit and always fill in sequence
[media] cec: CEC_RECEIVE overwrote the timeout field
[media] cxd2841er: Reading SNR for DVB-C added
[media] cxd2841er: Reading BER and UCB for DVB-C added
[media] cxd2841er: fix switch-case for DVB-C
[media] cxd2841er: fix signal strength scale for ISDB-T
[media] cxd2841er: adjust the dB scale for DVB-C
[media] cxd2841er: provide signal strength for DVB-C
[media] cxd2841er: fix BER report via DVBv5 stats API
[media] mb86a20s: apply mask to val after checking for read failure
[media] airspy: fix error logic during device register
[media] s5p-cec/TODO: add TODO item
[media] cec/TODO: drop comment about sphinx documentation
...
Merge branch 'docs-next' of git://git.lwn.net/linux into topic/docs-next
* 'docs-next' of git://git.lwn.net/linux:
doc-rst: kernel-doc: fix handling of address_space tags
Revert "doc/sphinx: Enable keep_warnings"
doc-rst: kernel-doc directive, fix state machine reporter
docs: deprecate kernel-doc-nano-HOWTO.txt
doc/sphinx: Enable keep_warnings
Documentation: add watermark_scale_factor to the list of vm systcl file
kernel-doc: Fix up warning output
docs: Get rid of some kernel-documentation warnings
doc-rst: kernel-doc: fix handling of address_space tags
The RST cpp:function handler is very pedantic: it doesn't allow any
macros like __user on it:
Documentation/media/kapi/dtv-core.rst:28: WARNING: Error when parsing function declaration.
If the function has no return type:
Error in declarator or parameters and qualifiers
Invalid definition: Expecting "(" in parameters_and_qualifiers. [error at 8]
ssize_t dvb_ringbuffer_pkt_read_user (struct dvb_ringbuffer * rbuf, size_t idx, int offset, u8 __user * buf, size_t len)
--------^
If the function has a return type:
Error in declarator or parameters and qualifiers
If pointer to member declarator:
Invalid definition: Expected '::' in pointer to member (function). [error at 37]
ssize_t dvb_ringbuffer_pkt_read_user (struct dvb_ringbuffer * rbuf, size_t idx, int offset, u8 __user * buf, size_t len)
-------------------------------------^
If declarator-id:
Invalid definition: Expecting "," or ")" in parameters_and_qualifiers, got "*". [error at 102]
ssize_t dvb_ringbuffer_pkt_read_user (struct dvb_ringbuffer * rbuf, size_t idx, int offset, u8 __user * buf, size_t len)
------------------------------------------------------------------------------------------------------^
So, we have to remove it from the function prototype.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Commit f42ddca7bebc (doc-rst: kernel-doc directive, fix state machine
reporter) from Marcus Heiser provides a better fix, so this configuration
change is no longer needed.
Jonathan Corbet [Wed, 20 Jul 2016 22:43:41 +0000 (16:43 -0600)]
docs: deprecate kernel-doc-nano-HOWTO.txt
Now that the new Sphinx world order is taking over, the information in
kernel-doc-nano-HOWTO.txt is outmoded. I hate to remove it altogether,
since it's one of those files that people expect to find. But we can add a
warning and fix all the other pointers to it.
Reminded-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Daniel Vetter [Tue, 19 Jul 2016 11:42:54 +0000 (13:42 +0200)]
doc/sphinx: Enable keep_warnings
Unfortunately warnings generated after parsing in sphinx can end up
with entirely bogus files and line numbers as sources. Strangely for
outright errors this is not a problem. Trying to convert warnings to
errors also doesn't fix it.
The only way to get useful output out of sphinx to be able to root
cause the error seems to be enabling keep_warnings, which inserts
a System Message into the actual output. Not pretty at all, but I
don't really want to fix up core rst/sphinx code, and this gets the job
done meanwhile.
Cc: Markus Heiser <markus.heiser@darmarit.de> Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Hans Verkuil [Mon, 18 Jul 2016 06:44:10 +0000 (03:44 -0300)]
[media] cec: always check all_device_types and features
Even when the adapter is configured for CEC 1.4, we still check and
use the CEC 2.0 parts of struct cec_log_addrs. Although these aren't
used in CEC messages, the information contained in them is still of
use in the CEC framework itself, so keep this information.
Also zero the unused trailing features[] data and unused logical address
data so the contents isn't random data.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Sun, 17 Jul 2016 08:16:40 +0000 (05:16 -0300)]
[media] cec: zero unused msg part after msg->len
Ensure that the unused part of the msg array is zeroed. This is
required by CEC 2.0 when receiving shorter messages than expected.
In that case the remaining bytes are assumed to be 0.
There are no such CEC messages yet, but it is required to be future proof.
And since we're doing it for received messages, do it for transmitted
messages as well. It's unambiguous this way.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Sat, 16 Jul 2016 12:59:18 +0000 (09:59 -0300)]
[media] cec: don't set fh to NULL in CEC_TRANSMIT
The filehandle was set to NULL when in non-blocking mode or when
no reply is needed.
This is wrong: the filehandle is needed in non-blocking mode to ensure
that the result of the transmit can be obtained through CEC_RECEIVE.
And the 'reply' check was also incorrect since it should have checked the
timeout field (the reply can be 0). In any case, when in blocking mode
there is no need to set the fh to NULL either.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
[media] doc-rst: backward compatibility with older Sphinx versions
Sphinx is really evil when an older version finds an extra
attribute for the :toctree: tag: it simply ignores everything
and produce documents without any chapter inside!
As we're now using tags available only on Sphinx 1.4.x, we
need to use some creative ways to add a title before the
table of contents. Do that by using a css class.
I ended by adding twice each media header, because I saw some
missing stuff at the documents. It seems it was my mistake,
as everything seems to be there.
So, remove those extra stuff, to avoid duplicating the
documentation of the functions.
The README.hm12 file describes the proprietary format used
by this driver for raw format, called HM12. Add its description
at the document, after converted to ReST.
Documentation: add watermark_scale_factor to the list of vm systcl file
Commit 795ae7a0de6b ("mm: scale kswapd watermarks in proportion to
memory") properly added the description of the new knob to
Documentation/sysctl/vm.txt, but forgot to add it to the list of files
in /proc/sys/vm. Let's fix that.
Signed-off-by: Jerome Marchand <jmarchan@redhat.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
[media] doc-rst: move bttv documentation to bttv.rst file
There were several files under Documentation/video4linux/bttv.
Instead of simply copying them to the rst folder, I opted to
merge into a single document and adjust the headers to
adjust the section levels and fix the cards tables.
There are two exceptions on the merge:
- The Tuners were renamed as a separate document, as they
describe a separate driver;
- I removed the PROBLEMS section. It describes problems with
the very first generation of 3D boards (Mistique/S3).
It sounds very unlikely that someone would still need to
install a bttv board on such hardware. Also, it is not
very well written, IMHO.
Daniel Vetter [Fri, 15 Jul 2016 08:19:30 +0000 (10:19 +0200)]
kernel-doc: Fix up warning output
While trying to make gpu docs warning free I stumbled over one output
which wasn't following proper compiler error output standards. Fix it
up for more quickfix awesomeness.
Cc: Jonathan Corbet <corbet@lwn.net> Cc: Jani Nikula <jani.nikula@intel.com> Cc: linux-doc@vger.kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This doc is outdated, and contains information that it is not
true anymore. Update it to reflect the changes that this
driver suffered since I started working on it.
Jonathan Corbet [Mon, 18 Jul 2016 01:24:02 +0000 (19:24 -0600)]
docs: Get rid of some kernel-documentation warnings
Sphinx wants to interpret all literal blocks as being in the chosen
language and complains when an attempt to parse a block fails.
kernel-documentation.rst has a few blocks that are not in C; make that
explicit to shut down the associated warnings.
[media] doc-rst: do a poor man's conversion of v4l2-framework
Make Sphinx happy with v4l2-framework.rst by putting all C
code inside code-block.
Please note that this is a poor man ReST conversion, as several
of those blocks should actually be converted to use :cpp:func:,
pointing to the kAPI auto-generated documentation.
The problem is that we currently lack kernel-doc documentation
for most of the stuff described there.
So, let's do a poor man's conversion. We should later address
this.