23 Jul, 2016

16 commits

  • There are one enum and 4 functions undocumented there.
    Document them. That will fix the broken links at the
    v4l2-subdev.rst file.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • The Async API is actually part of the v4l2 subdev.
    Move its declarations to it.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Enrich the subdevice description by linking it to the
    functions and structs from v4l2-subdev.h.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • This header were poorly documented, and weren't using the
    kernel-doc format. Document everything but the macros using
    the right format.

    While here, also fix the other comments to match the
    Linux CodingStyle.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • 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

    Mauro Carvalho Chehab
     
  • 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

    Mauro Carvalho Chehab
     
  • 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

    Mauro Carvalho Chehab
     
  • 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

    Mauro Carvalho Chehab
     
  • 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

    Mauro Carvalho Chehab
     
  • 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

    Mauro Carvalho Chehab
     
  • 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

    Mauro Carvalho Chehab
     
  • 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

    Mauro Carvalho Chehab
     
  • Fix all remaining media warnings with ReST that are fixable
    without changing at the Sphinx code.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • * 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

    Mauro Carvalho Chehab
     
  • * '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

    Mauro Carvalho Chehab
     
  • 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
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

21 Jul, 2016

3 commits

  • This reverts commit 47d6d752b9e20dbe8a2acd22e887be81a6f39de9.

    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
     
  • 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
    Tested-by: Mauro Carvalho Chehab
    Signed-off-by: Jonathan Corbet

    Markus Heiser
     
  • 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
    Signed-off-by: Jonathan Corbet

    Jonathan Corbet
     

20 Jul, 2016

11 commits

  • 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
    Cc: Jonathan Corbet
    Cc: linux-doc@vger.kernel.org
    Signed-off-by: Daniel Vetter
    Signed-off-by: Jonathan Corbet

    Daniel Vetter
     
  • Update and expand the CEC documentation. Especially w.r.t. non-blocking
    mode.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • 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
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • 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
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Just pass the transmitted CEC message to all CEC adapters.
    This implements the Monitor All mode for vivid.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • 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
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • 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
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • 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
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • 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
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • 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
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • When CEC_RECEIVE returns a message the original timeout field
    was overwritten. Restore the timeout field.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     

19 Jul, 2016

10 commits