Commit Graph

603936 Commits

Author SHA1 Message Date
Mauro Carvalho Chehab
840b14d983 [media] v4l2-subdev.rst: add documentation from v4l2-framework.rst
There are lots of documentation about V4L2 subdevices at
v4l2-framework.rst. Move them to its specific chapter at
v4l2-subdev.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:03:24 -03:00
Mauro Carvalho Chehab
02ca08b8ae [media] v4l2-device.rst: do cross references with kernel-doc
This document describes the main kAPI interfaces for the
v4l2-device.h header. Add cross references to the documentation
produced via kernel-doc.

While here, also use monotonic font for constants.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:03:24 -03:00
Mauro Carvalho Chehab
5de379a2ff [media] v4l2-device.rst: add contents from v4l2-framework
Part of the contents of v4l2-framework is related to the
kAPI defined by v4l2-device. Move such contents to the
v4l2-device.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:03:24 -03:00
Mauro Carvalho Chehab
5875987400 [media] doc-rst: Split v4l-core into one file per kAPI
Sphinx produce a 1:1 mapping between a rst file and an html file.

So, we need to split the kernel-doc tags on multiple documents.

A side effect is that we're now having a better name for each
section of the kAPI documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:03:24 -03:00
Mauro Carvalho Chehab
575f93084d [media] v4l2-device.h: document functions
The functions at v4l2-device.h are not using the proper
markups. Add it, and include at the v4l2-core.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:03:24 -03:00
Mauro Carvalho Chehab
d888f8d7d8 [media] doc-rst: Fix license for the media books
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.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:03:24 -03:00
Mauro Carvalho Chehab
f58cad2247 [media] media-entry.h: Fix a note markup
The Sphinx note markup for media_remove_intf_links() is wrong:
there's a missing space.

While here, let's auto-numerate the two notes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:03:24 -03:00
Mauro Carvalho Chehab
da83c888bf [media] doc-rst: better organize the media books
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.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:03:24 -03:00
Mauro Carvalho Chehab
5b8700e9f9 [media] doc-rst: Fix some Sphinx warnings
Fix all remaining media warnings with ReST that are fixable
without changing at the Sphinx code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:03:24 -03:00
Mauro Carvalho Chehab
c278256d05 Merge branch 'patchwork' into topic/docs-next
* 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
  ...

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 07:59:19 -03:00
Mauro Carvalho Chehab
7e5b7d1b3a 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
2016-07-23 07:55:59 -03:00
Mauro Carvalho Chehab
a88b1672d4 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>
2016-07-22 15:34:24 -06:00
Jonathan Corbet
29310a5075 Revert "doc/sphinx: Enable keep_warnings"
This reverts commit 47d6d752b9.

Commit f42ddca7be (doc-rst: kernel-doc directive, fix state machine
reporter) from Marcus Heiser provides a better fix, so this configuration
change is no longer needed.
2016-07-20 16:56:21 -06:00
Markus Heiser
f42ddca7be doc-rst: kernel-doc directive, fix state machine reporter
Add a reporter replacement that assigns the correct source name and line
number to a system message, as recorded in a ViewList.

[1] http://mid.gmane.org/CAKMK7uFMQ2wOp99t-8v06Om78mi9OvRZWuQsFJD55QA20BB3iw@mail.gmail.com

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>
2016-07-20 16:51:12 -06:00
Jonathan Corbet
8ed292fe86 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>
2016-07-20 16:45:37 -06:00
Daniel Vetter
47d6d752b9 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>
2016-07-19 16:22:20 -06:00
Hans Verkuil
e5208ed280 [media] doc-rst: cec: update documentation
Update and expand the CEC documentation. Especially w.r.t. non-blocking
mode.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-19 13:33:29 -03:00
Hans Verkuil
009a620848 [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>
2016-07-19 13:27:46 -03:00
Hans Verkuil
b7cbc89253 [media] cec: poll should check if there is room in the tx queue
For POLLOUT poll only checked if the adapter was configured, not
if there was room in the transmit queue. Add that check.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-19 13:27:10 -03:00
Hans Verkuil
83505028d8 [media] vivid: support monitor all mode
Just pass the transmitted CEC message to all CEC adapters.
This implements the Monitor All mode for vivid.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-19 13:26:33 -03:00
Hans Verkuil
58ecc29b5e [media] cec: fix test for unconfigured adapter in main message loop
The main message loop checks if the physical address was valid, and if
not it is assumed that the adapter had been unconfigured.

However, this check is no longer correct, instead it should check
that both adap->is_configured and adap->is_configuring are false.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-19 13:26:06 -03:00
Hans Verkuil
11065f8531 [media] cec: limit the size of the transmit queue
The size of the transmit queue was unlimited, which meant that
in non-blocking mode you could flood the CEC adapter with messages
to be transmitted.

Limit this to 18 messages.

Also print the number of pending transmits and the timeout value
in the status debugfs file.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-19 13:25:32 -03:00
Hans Verkuil
045344c3c1 [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>
2016-07-19 13:24:42 -03:00
Hans Verkuil
4eef404fd9 [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>
2016-07-19 13:24:09 -03:00
Hans Verkuil
40df3a7e58 [media] cec: clear all status fields before transmit and always fill in sequence
Before transmitting a message clear all status fields and always fill
in the sequence number. Make sure the sequence number is never 0.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-19 13:22:17 -03:00
Hans Verkuil
e883b4d026 [media] cec: CEC_RECEIVE overwrote the timeout field
When CEC_RECEIVE returns a message the original timeout field
was overwritten. Restore the timeout field.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-19 13:21:34 -03:00
Mauro Carvalho Chehab
ef88f10eb8 [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.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-19 12:35:08 -03:00
Mauro Carvalho Chehab
e1813eda8e [media] doc-rst: better name the media books
The titles at the media books were misleading, and some books
were not numbered.

Rename the kAPI book to better reflect its contents, be more
consistent on the initial rst file for each book and better
name them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-18 15:01:20 -03:00
Mauro Carvalho Chehab
cf022874b6 [media] doc-rst: fix media kAPI documentation
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.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-18 14:46:07 -03:00
Mauro Carvalho Chehab
43efd1edc6 [media] get rid of Documentation/video4linux/lifeview.txt
Move the contents of this file to bttv.rst and saa7134.rst.

With that, we can finally remove Documentation/video4linux.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-18 14:28:58 -03:00
Mauro Carvalho Chehab
f0d17227d7 [media] cx88.rst: add contents of hauppauge-wintv-cx88-ir.txt
Import the contents of hauppauge-wintv-cx88-ir.txt, after
converted to ReST into cx88.rst file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-18 14:18:10 -03:00
Mauro Carvalho Chehab
2b8de4eabc [media] cx88.rst: add contents from not-in-cx2388x-datasheet.txt
There are some information about missing/wrong documentation at
cx231xx datasheet. Add it to the cx88 chapter.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-18 14:10:40 -03:00
Mauro Carvalho Chehab
d7b3ae79e1 [media] cx2341x.rst: add contents of README.vbi
Finally, adds the content of README.vbi at cx2341x.rst after
its conversion to ReST format.

Now, add information about this chipset and its driver is
inside a single chapter at the media/v4l-drivers book.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-18 14:07:10 -03:00
Mauro Carvalho Chehab
b3b7ea9aa7 [media] cx2341x: add contents of README.hm12
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.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-18 14:01:51 -03:00
Mauro Carvalho Chehab
61116fbf20 [media] cx2341x.rst: add contents of fw-osd-api.txt
Convert it to ReST format and add to cx2341x.rst file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-18 13:56:43 -03:00
Mauro Carvalho Chehab
5e739096c2 [media] cx2341x.rst: add the contents of fw-upload.txt
Add the contents of fw-upload.txt, after converting it to
ReST format.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-18 13:45:27 -03:00
Mauro Carvalho Chehab
290bbbfe87 [media] cx2341x.rst: add contents of fw-memory.txt
Convert the content to ReST and add it at the cx231xx.rst
file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-18 13:42:17 -03:00
Mauro Carvalho Chehab
f8eb496f4c [media] cx2341x.rst: add contents of fw-dma.txt
Add the contents of fw-dma.txt, converted to ReST, and
drop the old file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-18 13:32:53 -03:00
Mauro Carvalho Chehab
d9b8a3f099 [media] cx2341x.rst: add the contents of fw-calling.txt
Convert it to ReST and add its contents at this file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-18 13:26:30 -03:00
Mauro Carvalho Chehab
91e71c2ba8 [media] cx2341x.rst: Add the contents of fw-encoder-api.txt
Convert its contents to ReST and add to cx2341x.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-18 13:21:14 -03:00
Mauro Carvalho Chehab
81ef807e55 [media] cx2341x.rst: add fw-decoder-registers.txt content
Convert the contents of fw-decoder-registers.txt to ReST and
add it to cx2341x.rst file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-18 13:16:31 -03:00
Jerome Marchand
e6507a00fd Documentation: add watermark_scale_factor to the list of vm systcl file
Commit 795ae7a0de ("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>
2016-07-18 08:27:01 -06:00
Mauro Carvalho Chehab
a785ddb868 [media] doc-rst: start adding documentation for cx2341x
move the contents of fw-decoder-api.txt to cx2341x and
convert it to ReST file, adding it to media/v4l-drivers

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-18 11:04:58 -03:00
Mauro Carvalho Chehab
d197a370d8 [media] doc-rst: add documentation for tuners
Convert bttv/Tuners to ReST and add it to the media/v4l-drivers book.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-18 10:38:35 -03:00
Mauro Carvalho Chehab
3f3edfd6d5 [media] doc-rst: add documentation for bttv driver
Convert it to ReST and add it to media/v4l-drivers book.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-18 10:30:59 -03:00
Mauro Carvalho Chehab
2287cb47fb [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.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-18 10:04:48 -03:00
Daniel Vetter
e7ca311e37 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>
2016-07-17 20:38:35 -06:00
Mauro Carvalho Chehab
2e97d6d301 [media] v4l-with-ir.rst: update it to reflect the current status
This document were really old. Update it to reflect the current
status of the IR drivers for TV.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-17 22:51:28 -03:00
Mauro Carvalho Chehab
31cae7ca8d [media] doc-rst: add documentation about IR on V4L boards
This section is outdated, but let's add it, after converting
to ReST, and then fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-17 22:51:28 -03:00
Mauro Carvalho Chehab
cff4c8acf2 [media] doc-rst: add vivid documentation
Convert it to ReST and add to media/v4l-drivers book.

As the sections here (and on other docs) are numbered,
let's also make this book auto-numbered.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-17 22:51:27 -03:00