1
0
Fork 0
Commit Graph

29 Commits (82559ac0273a68addb15535899cb1662de50a586)

Author SHA1 Message Date
Mauro Carvalho Chehab 82559ac027 media: add SPDX header to media uAPI files
All those files are under GFDL 1.1 or later, with no invariant sections.
Tag them as such.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-12-05 10:39:18 -05:00
Mauro Carvalho Chehab 18e6830a63 media: remove text encoding from rst files
This is not needed there. Also, the same UTF-8 encoding should
be used on all documents.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-12-05 10:37:18 -05:00
Mauro Carvalho Chehab f989420788 media: cec uapi: Adjust table sizes for PDF output
Several tables at this media book chapter have issues
when PDF is produced. Adjust them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-09-05 06:27:28 -04:00
Hans Verkuil 88afc1cfe5 media: cec-ioc-adap-g-log-addrs.rst: fix wrong quotes
`CEC_LOG_ADDRS_FL_CDC_ONLY` should be ``CEC_LOG_ADDRS_FL_CDC_ONLY``.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-09 09:38:04 -04:00
Hans Verkuil 299708e45e media: cec: clear all cec_log_addrs fields
The CEC version, vendor ID and OSD name were not cleared when clearing the
current set of logical addresses. This was unexpected and somewhat confusing,
so reset all these fields to their default values. Also document this since
the documentation wasn't quite clear either.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-18 12:36:19 -03:00
Hans Verkuil 491314b8d4 [media] cec: document the error codes
Document all the various error codes returned by the CEC ioctls.

These were never documented, instead the documentation relied on a reference
to the generic error codes, but that's not sufficient.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-22 11:12:34 -03:00
Hans Verkuil ed72b81bb7 [media] cec rst: remove "This API is not yet finalized" notice
The API is now finalized, so this notice should be dropped.

Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-30 11:40:46 -02:00
Mauro Carvalho Chehab 71334ae42d [media] cec-ioc-adap-g-log-addrs.rst: describe CEC_LOG_ADDRS_FL_CDC_ONLY
The CEC_LOG_ADDRS_FL_CDC_ONLY flag is missing at the documentation,
causing this warning:
	Documentation/output/cec.h.rst:6: WARNING: undefined label: cec-log-addrs-fl-cdc-only (if the link has no caption the label must precede a section header)

Add a documentation for it, based on the commit that introduced the
flag.

Fixes: a69a168a1b ("[media] cec: add proper support for CDC-Only CEC devices")
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16 16:04:45 -02:00
Hans Verkuil f4062625ed [media] cec: add flag to cec_log_addrs to enable RC passthrough
By default the CEC_MSG_USER_CONTROL_PRESSED/RELEASED messages
are passed on to the follower(s) only. If the new
CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU flag is set in the
flags field of struct cec_log_addrs then these messages are also
passed on to the remote control input subsystem and they will appear
as keystrokes.

This used to be the default behavior, but now you have to explicitly
enable it. This is done to force the caller to think about possible
security issues (e.g. if these messages are used to enter passwords).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16 15:32:07 -02:00
Hans Verkuil 77edf603f2 [media] cec rst: convert tables and drop the 'row' comments
This uses Laurent's python script to convert all tables, dropping
the useless 'row' comments.

See commit c2b66cafdf ("[media] v4l: doc: Remove row numbers from tables")
for the script that was used.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16 15:30:54 -02:00
Mauro Carvalho Chehab 9fce0c2265 Linux 4.8
-----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJX8Zc4AAoJEHm+PkMAQRiGQG8H/2Hd4IwJh75snGY5LAiWt6ra
 kGM/SobvLAMtcoxXCeHqf2bZrxa2Zz9tnEzhuLMGaf9a3l79xHa8YumK5KS1JPGV
 6lZBvuPi8BIyT0cpYH000e5ehHfhP6pSGJKZ2EuLv43HcBeVZEGAf3/8jSAlNA15
 bwFy2ZEkwJGThbnT6au0Y3s9h8LcNjtllu9hjfb+/9oNGvp8r4QhdVodIqIQ4cv6
 SeUfv7Pn2LZDMCSaTP9bh2KaR4dwYZHFsVe75x2wND5Sfq7DVBBfFkAoV/RwJDTM
 gBc3PNnmzb/tix6ohOrSQnSiGsXv1uASxvHH3RD2zG6g7Aj9Eq/+Z7ZdPu2+o+U=
 =U+ef
 -----END PGP SIGNATURE-----

Merge tag 'v4.8' into patchwork

Linux 4.8

* tag 'v4.8': (1761 commits)
  Linux 4.8
  ARM: 8618/1: decompressor: reset ttbcr fields to use TTBR0 on ARMv7
  MIPS: CM: Fix mips_cm_max_vp_width for non-MT kernels on MT systems
  include/linux/property.h: fix typo/compile error
  ocfs2: fix deadlock on mmapped page in ocfs2_write_begin_nolock()
  mm: workingset: fix crash in shadow node shrinker caused by replace_page_cache_page()
  MAINTAINERS: Switch to kernel.org email address for Javi Merino
  x86/entry/64: Fix context tracking state warning when load_gs_index fails
  x86/boot: Initialize FPU and X86_FEATURE_ALWAYS even if we don't have CPUID
  x86/vdso: Fix building on big endian host
  x86/boot: Fix another __read_cr4() case on 486
  sctp: fix the issue sctp_diag uses lock_sock in rcu_read_lock
  sctp: change to check peer prsctp_capable when using prsctp polices
  sctp: remove prsctp_param from sctp_chunk
  sctp: move sent_count to the memory hole in sctp_chunk
  tg3: Avoid NULL pointer dereference in tg3_io_error_detected()
  x86/init: Fix cr4_init_shadow() on CR4-less machines
  MIPS: Fix detection of unsupported highmem with cache aliases
  MIPS: Malta: Fix IOCU disable switch read for MIPS64
  MIPS: Fix BUILD_ROLLBACK_PROLOGUE for microMIPS
  ...
2016-10-05 16:43:53 -03:00
Mauro Carvalho Chehab 2606eee43c [media] docs-rst: fix cec bad cross-references
Fix some CEC cross references that are broken.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:54:21 -03:00
Mauro Carvalho Chehab e8be7e97e6 [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>
2016-09-09 09:34:01 -03:00
Mauro Carvalho Chehab 9954783662 [media] docs-rst: Convert CEC 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.

While here, improve the documentation to make them to look more
like the rest of the document.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 21:23:40 -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
Hans Verkuil dcceb1eaf2 [media] cec: add CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK flag
Currently if none of the requested logical addresses can be claimed, the
framework will fall back to the Unregistered logical address.

Add a flag to enable this explicitly. By default it will just go back to
the unconfigured state.

Usually Unregistered is not something you want since the functionality is
very limited. Unless the application has support for this, it will fail
to work correctly. So require that the application explicitly requests
this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 14:00:51 -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 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 5bd4bb7817 [media] docs-rst: add tabularcolumns to all tables
LaTeX doesn't handle too well auto-width on tables, and ReST
markup requires an special tag to give it the needed hints.

As we're using A4 paper, we have 17cm of useful spaces. As
most media tables have widths, let's use it to generate the
needed via the following perl script:

my ($line_size, $table_header, $has_cols) = (17.5, 0, 0);
my $out;
my $header = "";
my @widths = ();
sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) }
while (<>) {
	if (!$table_header) {
		$has_cols = 1 if (m/..\s+tabularcolumns::/);
		if (m/..\s+flat-table::/) {
			$table_header = 1;
			$header = $_;
			next;
		}
		$out .= $_;
		next;
	}
	$header .= $_;
	@widths = split(/ /, $1) if (m/:widths:\s+(.*)/);
	if (m/^\n$/) {
		if (!$has_cols && @widths) {
			my ($tot, $t, $i) = (0, 0, 0);
			foreach my $v(@widths) { $tot += $v; };
			$out .= ".. tabularcolumns:: |";
			for ($i = 0; $i < scalar @widths - 1; $i++) {
				my $v = $widths[$i];
				my $w = round(10 * ($v * $line_size) / $tot) / 10;
				$out .= sprintf "p{%.1fcm}|", $w;
				$t += $w;
			}
			my $w = $line_size - $t;
			$out .= sprintf "p{%.1fcm}|\n\n", $w;
		}
		$out .= $header;
		$table_header = 0;
		$has_cols = 0;
		$header = "";
		@widths = ();
	}
}
print $out;

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:07:12 -03:00
Mauro Carvalho Chehab b6b6e67824 [media] docs-rst: better use the .. note:: tag
Change multi-line note tags to be more symetric, e. g. not starting
the text together witht the tag.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:02:29 -03: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 1267c60aa9 [media] doc-rst: improve CEC documentation
Lots of fixups relating to references.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13 10:56:26 -03:00
Mauro Carvalho Chehab 8968da9b86 Revert "[media] docs-rst: escape [] characters"
This patch touches on places where it shouldn't: image
files and code examples. Also, it doesn't fix all array
occurrences.

So, let's revert it.

This reverts commit ffbab694ed.
2016-07-13 08:43:30 -03:00
Mauro Carvalho Chehab ffbab694ed [media] docs-rst: escape [] characters
Those characters are used for citations. Better to escape, to
avoid them to be misinterpreted.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12 15:20:11 -03:00
Mauro Carvalho Chehab 706f8a9975 [media] doc-rst: improve display of notes and warnings
There are several notes and warning mesages in the middle of
the media docbook. Use the ReST tags for that, as it makes
them visually better and hightlights them.

While here, modify a few ones to make them clearer.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-10 12:06:28 -03:00
Mauro Carvalho Chehab 96f69e0eef [media] doc-rst: add CEC header file to the documentation
Adding the header file is interesting for several reasons:

1) It makes MC documentation consistend with other parts;
2) The header file can be used as a quick index to all API
   elements;
3) The cross-reference check helps to identify symbols that
   aren't documented.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-09 11:07:10 -03:00
Mauro Carvalho Chehab b2a584367e [media] doc-dst: visually improve the CEC pages
Adjust the widths and show error codes as constants.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08 17:59:27 -03:00
Markus Heiser 21c6269449 [media] doc-rst: linux_tc CEC enhanced markup
leaved content unchanged, only improved markup and references

* more man-like sections (add Name section)
* defined target for each stuct field description
* replace constant with ":ref:" to (field) description

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08 17:39:15 -03:00
Markus Heiser e2460b1d57 [media] doc-rst: linux_tv CEC part, DocBook to reST migration
This is the reST migration of media's CEC part.  The migration is based
on media_tree's cec branch:

 https://git.linuxtv.org/media_tree.git

 c7169ad * cec media_tree/cec [media] DocBook/media: add CEC documentation

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08 17:38:55 -03:00