Commit graph

26605 commits

Author SHA1 Message Date
Mauro Carvalho Chehab
41d804653e [media] docs-rst: Convert V4L2 uAPI to use C function references
Name all ioctl references and make them match the ioctls that
are documented. That will improve the cross-reference index,
as it will have all ioctls and syscalls there.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 21:23:27 -03:00
Mauro Carvalho Chehab
1b81f010bf [media] docs-next: stop abusing on the cpp domain
Now that we have an override for the c domain that will do
the right thing for the Kernel, stop abusing on the cpp
domain.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 21:23:00 -03:00
Mauro Carvalho Chehab
b7ff94df56 [media] pixfmt-007.rst: use Sphinx math:: expressions
Enrich math formulas by using the Sphinx math. That will allow
using those formulas on pdf documents as well.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 21:20:53 -03:00
Mauro Carvalho Chehab
43c78e11ea Merge remote-tracking branch 'docs-next/docs-next' into devel/docs-next
* docs-next/docs-next: (51 commits)
  docs-rst: add package adjustbox
  docs-rst: Fix an warning when in interactive mode
  docs-rst: Use better colors for note/warning/attention boxes
  docs-rst: conf.py: adjust the size of .. note:: tag
  docs-rst: add support for LaTeX output
  doc-rst: migrate ioctl CEC_DQEVENT to c-domain
  doc-rst: Revert "kernel-doc: fix handling of address_space tags"
  doc-rst: moved *duplicate* warnings to nitpicky mode
  doc-rst:c-domain: ref-name of a function declaration
  doc-rst: add boilerplate to customize c-domain
  docs: Sphinxify gdb-kernel-debugging.txt and move to dev-tools
  docs: sphinxify kmemcheck.txt and move to dev-tools
  docs: sphinxify kmemleak.txt and move it to dev-tools
  docs: sphinxify ubsan.txt and move it to dev-tools
  docs: sphinxify kasan.txt and move to dev-tools
  docs: sphinixfy gcov.txt and move to dev-tools
  docs: sphinxify kcov.txt and move to dev-tools
  docs: sphinxify sparse.txt and move to dev-tools
  docs: sphinxify coccinelle.txt and add it to dev-tools
  docs: create a new dev-tools directory
  ...
2016-08-22 21:20:18 -03:00
Jonathan Corbet
8d8f60c5e0 Merge branch 'doc/4.9' into docs-next 2016-08-22 15:40:38 -06:00
Mauro Carvalho Chehab
ca7bfe2c8d docs-rst: add package adjustbox
We need adjustbox to allow adjusting the size of tables that
are bigger than the line width. There are quite a few of them
at the media books.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22 15:36:15 -06:00
Mauro Carvalho Chehab
ba1377fba7 docs-rst: Fix an warning when in interactive mode
When XeLaTeX is in interactive mode, it complains that
py@noticelength already exists. Rename it and declare it
only once to avoid such messages.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22 15:35:04 -06:00
Mauro Carvalho Chehab
41cff161fe docs-rst: Use better colors for note/warning/attention boxes
Instead of painting the box with gray, let's use a colored
box. IMHO, that makes easier to warn users about some issue
pointed by the Sphinx. It also matches to what we do already
with the HTML output.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22 15:34:48 -06:00
Mauro Carvalho Chehab
aa4e37a3d1 docs-rst: conf.py: adjust the size of .. note:: tag
While the current implementation works well when using as a
paragraph, it doesn't work properly if inside a table. As we
have quite a few such cases, fix the logic to take the column
size into account.

PS.: I took the logic there from the latest version of Sphinx.sty

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22 15:26:57 -06:00
Mauro Carvalho Chehab
d565127d12 docs-rst: add support for LaTeX output
Sphinx supports LaTeX output. Sometimes, it is interesting to
call it directly, instead of also generating a PDF. As it comes
for free, add a target for it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22 15:26:17 -06:00
Markus Heiser
9cd3476c91 doc-rst: migrate ioctl CEC_DQEVENT to c-domain
This is only one example, demonstrating the benefits of the patch
series.  The CEC_DQEVENT ioctl is migrated to the sphinx c-domain and
referred by ":name: CEC_DQEVENT".

With this change the indirection using ":ref:`CEC_DQEVENT` is no longer
needed, we can refer the ioctl directly with ":c:func:`CEC_DQEVENT`". As
addition in the index, there is a entry "CEC_DQEVENT (C function)".

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22 15:20:00 -06:00
Markus Heiser
556aa6d5d9 doc-rst: moved *duplicate* warnings to nitpicky mode
Moved the *duplicate C object description* warnings for function
declarations in the nitpicky mode. In nitpick mode, you can suppress
those warnings (e.g. ioctl) with::

  nitpicky = True
  nitpick_ignore = [
      ("c:func", "ioctl"),
  ]

See Sphinx documentation for the config values for ``nitpick`` and
``nitpick_ignore`` [1].

With this change all the ".. cpp:function:: int ioctl(..)" descriptions
(found in the media book) can be migrated to ".. c:function:: int
ioctl(..)", without getting any warnings. E.g.::

  .. cpp:function:: int ioctl( int fd, int request, struct cec_event *argp )

  .. c:function:: int ioctl( int fd, int request, struct cec_event *argp )

The main effect, is that we get those *CPP-types* back into Sphinx's C-
namespace and we need no longer to distinguish between c/cpp references,
when we refer a function like the ioctl.

[1] http://www.sphinx-doc.org/en/stable/config.html?highlight=nitpick#confval-nitpicky

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22 15:19:38 -06:00
Markus Heiser
2c645cd7c4 doc-rst:c-domain: ref-name of a function declaration
Add option 'name' to the "c:function:" directive.  With option 'name'
the ref-name of a function can be modified. E.g.::

    .. c:function:: int ioctl( int fd, int request )
       :name: VIDIOC_LOG_STATUS

The func-name (e.g. ioctl) remains in the output but the ref-name
changed from ``ioctl`` to ``VIDIOC_LOG_STATUS``. The index entry for
this function is also changed to ``VIDIOC_LOG_STATUS`` and the function
can now referenced by::

    :c:func:`VIDIOC_LOG_STATUS`

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22 15:19:22 -06:00
Markus Heiser
e8f5c617f2 doc-rst: add boilerplate to customize c-domain
Add a sphinx-extension to customize the sphinx c-domain.  No functional
changes right yet, just the boilerplate code.

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
[ jc: coding-style tweak ]
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22 15:19:15 -06:00
Songjun Wu
3f75dc949b [media] atmel-isc: DT binding for Image Sensor Controller driver
DT binding documentation for ISC driver.

Acked-by: Rob Herring <robh@kernel.org>
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>
2016-08-22 13:00:49 -03:00
Mauro Carvalho Chehab
8d4b231af9 [media] docs-rst: fix some .. note:: occurrences
On some places, either an space or the second ':' is missing.

Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:36:57 -03:00
Mauro Carvalho Chehab
8c978c0846 [media] docs-rst: fix some LaTeX errors when in interactive mode
There are several minor issues that are seen when building
PDF on interactive mode.

Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:35:47 -03:00
Mauro Carvalho Chehab
e653062450 [media] docs-rst: v4l2-drivers book: adjust column margins
A few tables are not properly output on LaTeX format.

Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:35:20 -03:00
Mauro Carvalho Chehab
5257d2689c [media] v4l2-dev.rst: adjust table to fit into page
One table here is not being properly displayed on LaTeX
format. Adjust it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:34:58 -03:00
Mauro Carvalho Chehab
b782434133 [media] cec-ioc-receive.rst: one table here should be longtable
The table is too big to fit into a single page on LaTeX format.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:34:40 -03:00
Mauro Carvalho Chehab
a3045153a3 [media] subdev-formats.rst: adjust tables size for LaTeX output
There are two big tables here that are very hard to adjust its
size.

The first one would fit into one page, but the latex.py logic
at Sphinx auto-switches to longtable when there are more than 30
rows. There's no way to override without coding.

The second one is really big, and won't fit on a single page.
So, it has to use tiny font to fit.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:34:23 -03:00
Mauro Carvalho Chehab
0c04622162 [media] extended-controls.rst: avoid going past page with LaTeX
It is painful to put code/verbatim code in bold. It seems that
the only way is to arrange it like:
	``foo``
	    bar

At least on LaTeX output, when this happens, the "foo" string
is not hidentable/breakable. The entire string should fit into
a single line.

Add a workaround for this ReST limitation by splitting the
foo string into two strings, on separate lines. The output
is not the best, but it works.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:34:02 -03:00
Mauro Carvalho Chehab
43e4138be3 [media] Fix a few additional tables at uAPI for LaTeX output
There are still a few tables with wrong columns at the uAPI
docs. Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:32:16 -03:00
Mauro Carvalho Chehab
fa92b04d98 [media] docs-rst: fix warnings introduced by LaTeX patchset
Sphinx is really pedantic with respect to the order where
table tags and references are created. Putting things at
the wrong order causes troubles.

The order that seems to work is:

	.. raw:: latex

	.. tabularcolumns::

	.. _foo_name:

	.. cssclass: longtable

	.. flat-table::

Reorder the tags to the above order, to avoid troubles, and
fix remaining warnings introduced by media recent patches.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:31:51 -03:00
Mauro Carvalho Chehab
42858b5552 [media] gen-errors.rst fix error table column limits
Fix the generic errors table to avoid column overflows on
LaTeX output.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:31:14 -03:00
Mauro Carvalho Chehab
0d6821ec2f [media] uapi/cec: adjust tables on LaTeX output
Fix tables to avoid text to overflow the cell limits.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:30:54 -03:00
Mauro Carvalho Chehab
9486f2ba95 [media] cec-core: Convert it to ReST format
There are some things there that aren't ok for ReST format.

Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:27:03 -03:00
Mauro Carvalho Chehab
4e5c054edc [media] docs-rst: move cec kAPI documentation to the media book
The CEC kAPI documentation should also be part of the media book.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:26:17 -03:00
Mauro Carvalho Chehab
d53c4261c6 [media] media-types.rst: adjust tables to fit on LaTeX output
A few tables at the media uAPI documentation have columns
not well dimentioned. Adjust them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:25:00 -03:00
Mauro Carvalho Chehab
16dac3541d [media] adjust remaining tables at DVB uAPI documentation
There are a few broken tables on LaTeX output at the DVB
uAPI documentation. Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:24:37 -03:00
Mauro Carvalho Chehab
e9012dc3d6 [media] fe_property_parameters.rst: Adjust column sizes
Add position hints for some tables, in order for them to be
shown properly on LaTeX output.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:24:12 -03:00
Mauro Carvalho Chehab
ed5d28d0b5 [media] fix v4l2-selection-*.rst tables for LaTeX output
Adjust the tables there to fit inside the page margins.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:23:53 -03:00
Mauro Carvalho Chehab
11d7512bfe [media] vidioc-g-tuner.rst: Fix tables to fit at LaTeX output
Several tables are missing column definitions and/or are too big
to fit into the page. Adjust them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:23:30 -03:00
Mauro Carvalho Chehab
e19c1779fb [media] vidioc-g-tuner.rst: improve documentation for tuner type
The tuner type table misses descriptions for each type. While
most of stuff are obvious, the two SDR definitions aren't.

So, add descriptions to all of them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:23:03 -03:00
Mauro Carvalho Chehab
ef76c0685f [media] adjust some vidioc-*rst tables with wrong columns
Adjust simple cases where the columns on some vidioc files
are overriding their neighbours.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:22:46 -03:00
Mauro Carvalho Chehab
e7eaeb37f6 [media] vidioc-g-sliced-vbi-cap.rst: make tables fit on LaTeX output
The tables don't fit at the page on this file. As noticed
before, Sphinx (or LaTeX?) does a crap job on tables with
cell span, and some work has to be done to make it fit.

Move the see also reference to a footnote, break one paragraph
into two and adjust the table columns to make it visible.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:22:21 -03:00
Mauro Carvalho Chehab
2bff552536 [media] vidioc-enumstd.rst: adjust video standards table
This table is too big for LaTeX output, and lacks columns
specs for LaTeX format.

Also, it has a hidden column, as there are some cell spans
with the wrong values.

Fix it, so it can be displayed properly on LaTeX/PDF.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:21:59 -03:00
Mauro Carvalho Chehab
64f6838a2b [media] vidioc-dv-timings-cap.rst: Adjust LaTeX columns
Some tables are not properly displayed on LaTeX. Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:21:39 -03:00
Mauro Carvalho Chehab
0e9411ac56 [media] vidioc-dqevent.rst: adjust two table columns for LaTeX output
There are two tables with mangled columns. Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:21:18 -03:00
Mauro Carvalho Chehab
201784b5be [media] vidioc-decoder-cmd.rst: better adjust column widths
Better adjust the columns for LaTeX output

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:21:01 -03:00
Mauro Carvalho Chehab
3532d9d6c5 [media] diff-v4l.rst: Make capabilities table fit in LaTeX
This table has several troubles:
	- a duplicated "struct" on its name;
	- a reference to a V4L version 1 struct that will never
	  point to something (as we got rid of V4L1 API a long
	  time ago);
	- misses hints for LaTeX output (column size and longtable
	  style).

Fix them.

It should be noticed that the first column of this table is
not aligned with the rest. I suspect that this is a bug at
the flat-table extension.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:20:42 -03:00
Mauro Carvalho Chehab
2ec708745f [media] subdev-formats.rst: adjust most of the tables to fill in page
Fix mosto fo the tables there in order to make them fit at the
page size.

There are, however, two exceptions: RGB and YUV big tables,
where adding the raw latex adjustbox caused the tables to not
be properly formatted. I suspect that the problem is because
those are long tables, but not really sure.

The thing is that Sphinx lacks an "adjustbox" tag that would
avoid the raw latex hacks.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:20:21 -03:00
Mauro Carvalho Chehab
3772b56a05 [media] dev-subdev.rst: make table fully visible on LaTeX
The table there is too big and doesn't have format hints for
LaTeX output.

Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:19:58 -03:00
Mauro Carvalho Chehab
352ca7e7f8 [media] dev-rds.rst: adjust table dimentions for LaTeX
One of the tables has wrong column dimentions. Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:19:36 -03:00
Mauro Carvalho Chehab
0101036c7b [media] dev-sliced-vbi.rst: Adjust tables on LaTeX output
Better format the tables in a way that will fit inside the
page.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:19:17 -03:00
Mauro Carvalho Chehab
23c751f036 [media] dev-sliced-vbi.rst: use a footnote for VBI images
Just like on dvb-raw-vbi.rst, the LaTeX output doesn't work
well with cell spans. Also, this is actually a note, so, move
it to a footnote.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:18:51 -03:00
Mauro Carvalho Chehab
605c606536 [media] docs-rst: re-generate vbi_525.pdf and vbi_625.pdf
Originally, each image were one page big, causing them to be
displayed on separate pages at the PDF output. Re-generate
them from the gif files.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:18:16 -03:00
Mauro Carvalho Chehab
6138e30321 [media] dev-raw-vbi.rst: adjust table columns for LaTeX output
Add the needed tags to fix LaTeX output of the tables there.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:17:40 -03:00
Mauro Carvalho Chehab
0522322ce2 [media] dev-raw-vbi.rst: add a footnote for the count limits
There's a bug with LaTeX output on flat-tables with Sphinx 1.4.5
that prevents references at a cell span to be broken. As the
text is indeed too long, it makes sense to place the reference
to the pictures showing the VBI limits as a footnote.

That makes the text easier to read and also solves the issue
with LaTeX output.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:17:19 -03:00
Mauro Carvalho Chehab
0fb29313f3 [media] dev-overlay.rst: don't ident a note
There's one note there that it is indented for no good reason.
Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:16:59 -03:00