[no subject]

2017-09-03 Thread clownscrytoo


13379.doc
Description: MS-Word document


Re: [PATCH 1/1] docs-rst: media: Don't use \small for V4L2_PIX_FMT_SRGGB10 documentation

2017-09-03 Thread Mauro Carvalho Chehab
Em Sun,  3 Sep 2017 23:12:33 +0300
Sakari Ailus  escreveu:

> There appears to be an issue in using \small in certain cases on Sphinx
> 1.4 and 1.5. Other format documents don't use \small either, remove it
> from here as well.
> 
> Signed-off-by: Sakari Ailus 
> ---
> Hi Mauro,
> 
> What would you think of this as an alternative approach? No hacks needed.
> Just a recognition \small could have issues. For what it's worth, I
> couldn't reproduce the issue on Sphinx 1.4.9.

Btw, there are other places where \small runs smoothly. It is *just*
on this table that it has issues.


> 
> Regards,
> Sakari
> 
>  Documentation/media/uapi/v4l/pixfmt-srggb10p.rst | 11 ---
>  1 file changed, 11 deletions(-)
> 
> diff --git a/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst 
> b/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst
> index 86cd07e5bfa3..368ee61ab209 100644
> --- a/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst
> +++ b/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst
> @@ -33,13 +33,6 @@ of a small V4L2_PIX_FMT_SBGGR10P image:
>  **Byte Order.**
>  Each cell is one byte.
>  
> -
> -.. raw:: latex
> -
> -\small

Interesting... yeah, that could be possible.

> -
> -.. tabularcolumns:: |p{2.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{10.0cm}|

Nah... Without tabularcolumns, LaTeX usually got sizes wrong and don't
always place things at the right positions I'm actually considering 
adding it to all media tables, in order to be less dependent on
LaTex automatic cells resizing - with doesn't seem to work too well.

So, better to keep it, even if it works without
\small. Btw, tried your patch here (without tabularcolumns) on
Sphinx 1.6 (tomorrow, I'll do tests with other version). There, the
last "(bits x-y)" ends by being wrapped to the next line.

Yet, I guess the enclosed diff (or something like that) would be
good enough (applied after my own patch, just to quickly test it). 

I'll play more with it tomorrow.

Thanks,
Mauro

diff --git a/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst 
b/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst
index aa3dbf163b97..10350f3e4350 100644
--- a/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst
+++ b/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst
@@ -33,24 +33,7 @@ of a small V4L2_PIX_FMT_SBGGR10P image:
 **Byte Order.**
 Each cell is one byte.
 
-.. raw:: latex
-
-\small
-
-.. HACK:
-
-   On Sphinx 1.4 and 1.5, the usage of \small just before the table
-   causes it to continue at the same column where the above text ended.
-
-   A possible solution would be to add a \newline on latex raw.
-   Unfortunately, that causes a breakage on Sphinx 1.6.
-
-   So, we're placing the \small before this note, with should be producing
-   the same result on all versions
-
-.
-
-.. tabularcolumns:: |p{2.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{10.0cm}|
+.. tabularcolumns:: |p{2.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{6.0cm}|
 
 .. flat-table::
 :header-rows:  0
@@ -63,6 +46,7 @@ Each cell is one byte.
   - B\ :sub:`02high`
   - G\ :sub:`03high`
   - G\ :sub:`03low`\ (bits 7--6) B\ :sub:`02low`\ (bits 5--4)
+
G\ :sub:`01low`\ (bits 3--2) B\ :sub:`00low`\ (bits 1--0)
 * - start + 5:
   - G\ :sub:`10high`
@@ -70,6 +54,7 @@ Each cell is one byte.
   - G\ :sub:`12high`
   - R\ :sub:`13high`
   - R\ :sub:`13low`\ (bits 7--6) G\ :sub:`12low`\ (bits 5--4)
+
R\ :sub:`11low`\ (bits 3--2) G\ :sub:`10low`\ (bits 1--0)
 * - start + 10:
   - B\ :sub:`20high`
@@ -77,6 +62,7 @@ Each cell is one byte.
   - B\ :sub:`22high`
   - G\ :sub:`23high`
   - G\ :sub:`23low`\ (bits 7--6) B\ :sub:`22low`\ (bits 5--4)
+
G\ :sub:`21low`\ (bits 3--2) B\ :sub:`20low`\ (bits 1--0)
 * - start + 15:
   - G\ :sub:`30high`
@@ -84,8 +70,5 @@ Each cell is one byte.
   - G\ :sub:`32high`
   - R\ :sub:`33high`
   - R\ :sub:`33low`\ (bits 7--6) G\ :sub:`32low`\ (bits 5--4)
-   R\ :sub:`31low`\ (bits 3--2) G\ :sub:`30low`\ (bits 1--0)
-
-.. raw:: latex
 
-\normalsize
+   R\ :sub:`31low`\ (bits 3--2) G\ :sub:`30low`\ (bits 1--0)

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 00/26] Improve DVB documentation and reduce its gap

2017-09-03 Thread Mauro Carvalho Chehab
Em Sun, 3 Sep 2017 22:05:23 +0200
Honza Petrouš  escreveu:

> > There is still a gap at the CA API, as there are three ioctls that are used
> > only by a few drivers and whose structs are not properly documented:
> > CA_GET_MSG, CA_SEND_MSG and CA_SET_DESCR.
> >
> > The first two ones seem to be related to a way that a few drivers
> > provide to send/receive messages.  
> 
> I never seen usage of such R/W ioctls, all drivers I have access to
> are using read()/write() variant of communication.

Yeah, the normal usage is to use R/W syscalls.

> BTW, I just remembered dvblast app, part of videolan.org:
> 
> http://www.videolan.org/projects/dvblast.html
> 
> which is using CA_GET_MSG/CA_SEND_MSG:
> 
> https://code.videolan.org/videolan/dvblast/blob/master/en50221.c

>From the ca_msg struct:

/* a message to/from a CI-CAM */
struct ca_msg {
unsigned int index;
unsigned int type;
unsigned int length;
unsigned char msg[256];
};

It only uses length and msg fields. Describing those seem
quite obvious. However, what "index" and "type" means?

Within the Kernel, only two drivers implement it:

$ git grep -l ca_msg drivers/
drivers/media/firewire/firedtv-ci.c
drivers/media/pci/bt8xx/dst_ca.c

At the dst_ca driver, checking for those fields don't give any
useful result:
$ grep index drivers/media/pci/bt8xx/dst_ca.c
(nothing)
$ grep type drivers/media/pci/bt8xx/dst_ca.c
// Copy application_type, application_manufacturer and manufacturer_code
p_ca_caps->slot_type = 1;
p_ca_caps->descr_type = 1;
p_ca_slot_info->type = CA_CI;
p_ca_slot_info->type = CA_CI;

(btw, using "1" for slot_type and descr_type there seems a very bad
thing)

The code at ca_get_message(), handle_dst_tag(), ca_set_pmt(), etc also
doesn't seem to be using neither one of those fields.

The same happens at firedtv-ci: it also doesn't seem to be using
none of those fields.

It should be noticed that, the dst_ca seems to allow more than one
descrambler:

p_ca_caps->descr_num = slot_cap[7];

Yet, the index is not used. So, it doesn't seem to be related to
the descrambler index (or there's an implementation bug there - and
at dvblast - as none uses it).

What *I* suspect is that this were meant to be used for either
CA index/type or DESCR index/type, but, when this got implemented,
people discovered that this would be useless and never actually
used those fields. Yet, I may be completely wrong and those were
added to mean something else.

If so, then we could just change the struct to:

struct ca_msg {
unsigned int reserved[2];
unsigned int length;
unsigned char msg[256];
};

And document just length and msg.

Thanks,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 00/15] Improve DVB documentation and reduce its gap

2017-09-03 Thread Soeren Moch
Hi Mauro,

On 01.09.2017 11:32, Mauro Carvalho Chehab wrote:
> Em Fri, 1 Sep 2017 10:40:28 +0200
> Honza Petrouš  escreveu:
>
>> 2017-09-01 1:46 GMT+02:00 Mauro Carvalho Chehab :
>>> The DVB documentation was negligected for a long time, with
>>> resulted on several gaps between the API description and its
>>> documentation.
>>>
>>> I'm doing a new reading at the documentation. As result of it,
>>> this series:
>>>
>>> - improves the introductory chapter, making it more generic;
>>> - Do some adjustments at the frontend API, using kernel-doc
>>>   when possible.
>>> - Remove unused APIs at DVB demux. I suspect that the drivers
>>>   implementing such APIs were either never merged upstream,
>>>   or the API itself  were never used or was deprecated a long
>>>   time ago. In any case, it doesn't make any sense to carry
>>>   on APIs that aren't properly documented, nor are used on the
>>>   upstream Kernel.
>>>
>>> With this patch series, the gap between documentation and
>>> code is solved for 3 DVB APIs:
>>>
>>>   - Frontend API;
>>>   - Demux API;
>>>   - Net API.
>>>
>>> There is still a gap at the CA API that I'll try to address when I
>>> have some time[1].
>>>
>>> [1] There's a gap also on the legacy audio, video and OSD APIs,
>>> but, as those are used only by a single very old deprecated
>>> hardware (av7110), it is probably not worth the efforts.
>>>  
av7110 cards may be old, but there are still users of these cards. For
instance I'm watching TV received and decoded with such card in this moment.
So what do you mean with "deprecated hardware"?
>> I agree that av7110 is very very old piece of hw (but it is already
>> in my hall of fame because of its Skystar 1 incarnation as
>> first implementation of DVB in Linux) and it is sad that we still
>> don't have at least one driver for any SoC with embedded DVB
>> devices.
> Yeah, av7110 made history. Please notice that this series doesn't
> remove any API that it is used by it. All it removes are the APIs
> that there's no Kernel driver using.
>
> Carry on APIs without client is usually a very bad idea, as nobody
> could be certain about how to use it. It is even worse when such
> APIs are not properly documented (with is the case here).
>
>> I understand that the main issue is that no any DVB-enabled
>> SoC vendor is interested in upstreaming theirs code, but I still hope
>> it will change in near future(*)
> We have one driver for a SoC DVB hardware at:
>   drivers/media/platform/sti/c8sectpfe/
>
> I guess it still doesn't cover the entire SoC, but this is a WiP. If I
> remember well, at the midia part of the SoC, they started by submitting
> the Remote Controller code.
>
>> Without having full-featured DVB device in vanilla, we surely don't
>> get some parts of DVB API covered. I can imagine that  when
>> somebody comes with such full-featured device he wants to reinvent
>> just removed bits.
> Re-adding the removed bits is easy. However, the API defined for
> av7110 is old and it is showing its age: it assumes a limited number
> of possible inputs/outputs. Modern SoC has a lot more ways link the
> audio/video IP blocks than what the API provides. On a modern SoC,
> not only DVB is supported, but also analog inputs (to support things
> like composite input), cameras, HDMI inputs and even analog TV.
> All of them interconnected to a media ISP. The current FF API can't
> represent such hardware.
>
> The best API to represent those pipelines that exist on SoC for
> multimedia is the media controller, where all IP blocks and their
> links (whatever they are) can be represented, if needed.
>
> The audio and video DVB API is also too limited: it hasn't
> evolved since when it was added. For audio, the ALSA API
> allows a way more control of the hardware; for video, the
> V4L2 API nowadays has all the bits to control video decoding
> and encoding. Both APIs provide support for audio and video
> inputs commonly found on those devices.
The real advantage of the DVB audio/video/osd API is the possibility
of frame synchronous audio/video/overlay output for high-quality
audio/video playback, maybe with picture-in-picture functionality.

Especially audio synchronization is not easy when the audio format
changes from compressed audio (e.g. AC-3) to PCM (stereo), e.g. on
HDMI output. While HDMI output hardware usually takes video frames and
audio packets (and AVI info frames for audio/video format signalization)
synchronously, V4L2 and ALSA rip these data blocks apart and push these
through different pipelines with different buffering properties. This
makes it very difficult for userspace applications. With the DVB API
the hardware takes care of the synchronisation.
> Also, nowadays, video decoding usually happens at the GPU on SoC. So, 
> in practice, a SoC FF would likely use the DRM subsystem to control the
> video codecs.
I think this is a common misunderstanding. Video is decoded on separate
hardware 

Re: [PATCH v2 00/26] Improve DVB documentation and reduce its gap

2017-09-03 Thread Mauro Carvalho Chehab
Em Sun, 3 Sep 2017 22:05:23 +0200
Honza Petrouš  escreveu:

> 1) #define CA_SET_DESCR  _IOW('o', 134, ca_descr_t)
> 
> 
> CA_SET_DESCR is used for feeding descrambler device
> with correct keys (called here "control words") what
> allows to get services unscrambled.
> 
> The best docu is:
> 
> "Digital Video Broadcasting (DVB);
> Support for use of the DVB Scrambling Algorithm version 3
> within digital broadcasting systems"
> 
> Defined as DVB Document A125 and publicly
> available here:
> 
> https://www.dvb.org/resources/public/standards/a125_dvb-csa3.pdf
> 
> 
> typedef struct ca_descr {
> unsigned int index;
> unsigned int parity;/* 0 == even, 1 == odd */
> unsigned char cw[8];
> } ca_descr_t;
> 
> The 'index' is adress of the descrambler instance, as there exist
> limited number of them (retieved by CA_GET_DESCR_INFO).

Thanks for the info. If I understood well, the enclosed patch should
be documenting it. 


Thanks,
Mauro

[PATCH] media: ca docs: document CA_SET_DESCR ioctl and structs

The av7110 driver uses CA_SET_DESCR to store the descrambler
control words at the CA descrambler slots.

Document it.

Thanks-to: Honza Petrouš 
Signed-off-by: Mauro Carvalho Chehab 

diff --git a/Documentation/media/uapi/dvb/ca-set-descr.rst 
b/Documentation/media/uapi/dvb/ca-set-descr.rst
index 9c484317d55c..a6c47205ffd8 100644
--- a/Documentation/media/uapi/dvb/ca-set-descr.rst
+++ b/Documentation/media/uapi/dvb/ca-set-descr.rst
@@ -28,22 +28,11 @@ Arguments
 ``msg``
   Pointer to struct :c:type:`ca_descr`.
 
-.. c:type:: ca_descr
-
-.. code-block:: c
-
-struct ca_descr {
-   unsigned int index;
-   unsigned int parity;
-   unsigned char cw[8];
-};
-
-
 Description
 ---
 
-.. note:: This ioctl is undocumented. Documentation is welcome.
-
+CA_SET_DESCR is used for feeding descrambler CA slots with descrambling
+keys (refered as control words).
 
 Return Value
 
diff --git a/include/uapi/linux/dvb/ca.h b/include/uapi/linux/dvb/ca.h
index f66ed53f4dc7..a62ddf0cebcd 100644
--- a/include/uapi/linux/dvb/ca.h
+++ b/include/uapi/linux/dvb/ca.h
@@ -109,9 +109,16 @@ struct ca_msg {
unsigned char msg[256];
 };
 
+/**
+ * struct ca_descr - CA descrambler control words info
+ *
+ * @index: CA Descrambler slot
+ * @parity: control words parity, where 0 means even and 1 means odd
+ * @cw: CA Descrambler control words
+ */
 struct ca_descr {
unsigned int index;
-   unsigned int parity;/* 0 == even, 1 == odd */
+   unsigned int parity;
unsigned char cw[8];
 };
 

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 00/26] Improve DVB documentation and reduce its gap

2017-09-03 Thread Honza Petrouš
> There is still a gap at the CA API, as there are three ioctls that are used
> only by a few drivers and whose structs are not properly documented:
> CA_GET_MSG, CA_SEND_MSG and CA_SET_DESCR.
>
> The first two ones seem to be related to a way that a few drivers
> provide to send/receive messages. Yet, I was unable to get what
> "index" and "type" means on those ioctls. The CA_SET_DESCR is
> only supported by av7110 driver, and has an even weirder
> undocumented struct. I was unable to discover at the Kernel, VDR
> or Kaffeine how those structs are filled. I suspect that there's
> something wrong there, but I won't risk trying to fix without
> knowing more about them. So, let's just document that those
> are needing documentation :-)
>

BTW, I just remembered dvblast app, part of videolan.org:

http://www.videolan.org/projects/dvblast.html

which is using CA_GET_MSG/CA_SEND_MSG:

https://code.videolan.org/videolan/dvblast/blob/master/en50221.c

/Honza
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/1] docs-rst: media: Don't use \small for V4L2_PIX_FMT_SRGGB10 documentation

2017-09-03 Thread Sakari Ailus
There appears to be an issue in using \small in certain cases on Sphinx
1.4 and 1.5. Other format documents don't use \small either, remove it
from here as well.

Signed-off-by: Sakari Ailus 
---
Hi Mauro,

What would you think of this as an alternative approach? No hacks needed.
Just a recognition \small could have issues. For what it's worth, I
couldn't reproduce the issue on Sphinx 1.4.9.

Regards,
Sakari

 Documentation/media/uapi/v4l/pixfmt-srggb10p.rst | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst 
b/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst
index 86cd07e5bfa3..368ee61ab209 100644
--- a/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst
+++ b/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst
@@ -33,13 +33,6 @@ of a small V4L2_PIX_FMT_SBGGR10P image:
 **Byte Order.**
 Each cell is one byte.
 
-
-.. raw:: latex
-
-\small
-
-.. tabularcolumns:: |p{2.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{10.0cm}|
-
 .. flat-table::
 :header-rows:  0
 :stub-columns: 0
@@ -73,7 +66,3 @@ Each cell is one byte.
   - R\ :sub:`33high`
   - R\ :sub:`33low`\ (bits 7--6) G\ :sub:`32low`\ (bits 5--4)
R\ :sub:`31low`\ (bits 3--2) G\ :sub:`30low`\ (bits 1--0)
-
-.. raw:: latex
-
-\normalsize
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] docs-rst: conf.py: remove lscape from LaTeX preamble

2017-09-03 Thread Mauro Carvalho Chehab
Only the media book used this extension in the past, but
it is not required anymore.

Cleanup patch only.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/conf.py | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/Documentation/conf.py b/Documentation/conf.py
index f9054ab60cb1..38a606b07285 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -273,9 +273,6 @@ latex_elements = {
 'preamble': '''
 \\usepackage{ifthen}
 
-% Allow generate some pages in landscape
-\\usepackage{lscape}
-
 % Put notes in color and let them be inside a table
\\definecolor{NoteColor}{RGB}{204,255,255}
\\definecolor{WarningColor}{RGB}{255,204,204}
-- 
2.13.5

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] docs-rst: conf.py: only setup notice box colors if Sphinx < 1.6

2017-09-03 Thread Mauro Carvalho Chehab
Sphinx 1.5 added a new way to change backward colors for note
boxes, but kept backward compatibility with 1.4. On Sphinx 1.6,
the old way stopped working, in favor of a new less hackish
way.

Unfortunately, this is currently too buggy to be used, and
the old way doesn't work anymore. So, we have no option but
to stick with boring notice boxes.

One example of such bug is the notice that it is inside
struct v4l2_plane, at the "bytesused" field.

At least, add a notice about how to use, as maybe some day
the bug will vanish.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/conf.py | 62 +++
 1 file changed, 43 insertions(+), 19 deletions(-)

diff --git a/Documentation/conf.py b/Documentation/conf.py
index 38a606b07285..b986eda20a05 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -271,6 +271,31 @@ latex_elements = {
 
 # Additional stuff for the LaTeX preamble.
 'preamble': '''
+   % Use some font with UTF-8 support with XeLaTeX
+\\usepackage{fontspec}
+\\setsansfont{DejaVu Serif}
+\\setromanfont{DejaVu Sans}
+\\setmonofont{DejaVu Sans Mono}
+
+   % To allow adjusting table sizes
+   \\usepackage{adjustbox}
+
+ '''
+}
+
+# Fix reference escape troubles with Sphinx 1.4.x
+if major == 1 and minor > 3:
+latex_elements['preamble']  += '\\renewcommand*{\\DUrole}[2]{ #2 }\n'
+
+if major == 1 and minor <= 4:
+latex_elements['preamble']  += '\\usepackage[margin=0.5in, top=1in, 
bottom=1in]{geometry}'
+elif major == 1 and (minor > 5 or (minor == 5 and patch >= 3)):
+latex_elements['sphinxsetup'] = 'hmargin=0.5in, vmargin=1in'
+latex_elements['preamble']  += '\\fvset{fontsize=auto}\n'
+
+# Customize notice background colors on Sphinx < 1.6:
+if major == 1 and minor < 6:
+   latex_elements['preamble']  += '''
 \\usepackage{ifthen}
 
 % Put notes in color and let them be inside a table
@@ -322,27 +347,26 @@ latex_elements = {
 }
\\makeatother
 
-   % Use some font with UTF-8 support with XeLaTeX
-\\usepackage{fontspec}
-\\setsansfont{DejaVu Serif}
-\\setromanfont{DejaVu Sans}
-\\setmonofont{DejaVu Sans Mono}
-
-   % To allow adjusting table sizes
-   \\usepackage{adjustbox}
-
  '''
-}
 
-# Fix reference escape troubles with Sphinx 1.4.x
-if major == 1 and minor > 3:
-latex_elements['preamble']  += '\\renewcommand*{\\DUrole}[2]{ #2 }\n'
-
-if major == 1 and minor <= 4:
-latex_elements['preamble']  += '\\usepackage[margin=0.5in, top=1in, 
bottom=1in]{geometry}'
-elif major == 1 and (minor > 5 or (minor == 5 and patch >= 3)):
-latex_elements['sphinxsetup'] = 'hmargin=0.5in, vmargin=1in'
-latex_elements['preamble']  += '\\fvset{fontsize=auto}\n'
+# With Sphinx 1.6, it is possible to change the Bg color directly
+# by using:
+#  \definecolor{sphinxnoteBgColor}{RGB}{204,255,255}
+#  \definecolor{sphinxwarningBgColor}{RGB}{255,204,204}
+#  \definecolor{sphinxattentionBgColor}{RGB}{255,255,204}
+#  \definecolor{sphinximportantBgColor}{RGB}{192,255,204}
+#
+# However, it require to use sphinx heavy box with:
+#
+#  \renewenvironment{sphinxlightbox} {%
+#  \\begin{sphinxheavybox}
+#  }
+#  \\end{sphinxheavybox}
+#  }
+#
+# Unfortunately, the implementation is buggy: if a note is inside a
+# table, it isn't displayed well. So, for now, let's use boring
+# black and white notes.
 
 # Grouping the document tree into LaTeX files. List of tuples
 # (source start file, target name, title,
-- 
2.13.5

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/7] Another set of fixes for PDF output

2017-09-03 Thread Mauro Carvalho Chehab
There are other things that are needed for a proper PDF output,
and a fix for yet another Sphinx 1.6 breakage.

After this patch series, PDF output now looks OK on Sphinx 1.4 to 1.6.

There's, however, one step back on Sphinx 1.6: I couldn't find any
way to use a background color for notifications (note, attention,
important, etc).

In thesis, on Sphinx 1.6, this is natively supported. However, in
practice, support for it is broken: if a note is inserted inside a table,
it sometimes put at the wrong cell and with the wrong size.

I was not able to fix it there. Yet, it fails gracefully, as it will just
display those boxes on boring black on white. While, IMHO, it
fails to the idea of giving a highlight to the text, it is readable.

That is a shame, as, except for this, Sphinx 1.6 seems to produce
a better table output than previous versions, when cell span is
used. Also, less hacks at the latex_preamble are now required
on newer versions. Well, maybe some day we may be able to
remove all hacks on newer versions of it...


Mauro Carvalho Chehab (7):
  media: format.rst: use the right markup for important notes
  media: v4l2 uapi book: get rid of driver programming's chapter
  media: vivid.rst: add a blank line to correct ReST format
  media: vidioc-g-fmt.rst: adjust table format
  media: fix build breakage with Sphinx 1.6
  media: pixfmt*.rst: replace a two dots by a comma
  media: index.rst: don't write "Contents:" on PDF output

 Documentation/media/index.rst|  6 +-
 Documentation/media/uapi/v4l/driver.rst  |  9 -
 Documentation/media/uapi/v4l/format.rst  |  2 +-
 Documentation/media/uapi/v4l/pixfmt-m420.rst |  2 +-
 Documentation/media/uapi/v4l/pixfmt-nv12.rst |  2 +-
 Documentation/media/uapi/v4l/pixfmt-nv12m.rst|  2 +-
 Documentation/media/uapi/v4l/pixfmt-nv16.rst |  2 +-
 Documentation/media/uapi/v4l/pixfmt-nv16m.rst|  2 +-
 Documentation/media/uapi/v4l/pixfmt-srggb10p.rst | 16 ++--
 Documentation/media/uapi/v4l/pixfmt-uyvy.rst |  2 +-
 Documentation/media/uapi/v4l/pixfmt-vyuy.rst |  2 +-
 Documentation/media/uapi/v4l/pixfmt-y41p.rst |  2 +-
 Documentation/media/uapi/v4l/pixfmt-yuv410.rst   |  2 +-
 Documentation/media/uapi/v4l/pixfmt-yuv411p.rst  |  2 +-
 Documentation/media/uapi/v4l/pixfmt-yuv420.rst   |  2 +-
 Documentation/media/uapi/v4l/pixfmt-yuv420m.rst  |  2 +-
 Documentation/media/uapi/v4l/pixfmt-yuv422m.rst  |  2 +-
 Documentation/media/uapi/v4l/pixfmt-yuv422p.rst  |  2 +-
 Documentation/media/uapi/v4l/pixfmt-yuv444m.rst  |  2 +-
 Documentation/media/uapi/v4l/pixfmt-yuyv.rst |  2 +-
 Documentation/media/uapi/v4l/pixfmt-yvyu.rst |  2 +-
 Documentation/media/uapi/v4l/v4l2.rst|  1 -
 Documentation/media/uapi/v4l/vidioc-g-fmt.rst|  2 +-
 Documentation/media/v4l-drivers/vivid.rst|  1 +
 24 files changed, 39 insertions(+), 32 deletions(-)
 delete mode 100644 Documentation/media/uapi/v4l/driver.rst

-- 
2.13.5


--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/7] media: vivid.rst: add a blank line to correct ReST format

2017-09-03 Thread Mauro Carvalho Chehab
On all vivid parameters, there's an space after the parameter,
except for "DV Timings Signal Mode". That makes this single one
to be written in bold, and, at PDF output, at the same line as
its description.

Use the same convention as the other parameters, in order to
adjust its output.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/v4l-drivers/vivid.rst | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/media/v4l-drivers/vivid.rst 
b/Documentation/media/v4l-drivers/vivid.rst
index 3e44b2217f2d..089595ce11c5 100644
--- a/Documentation/media/v4l-drivers/vivid.rst
+++ b/Documentation/media/v4l-drivers/vivid.rst
@@ -829,6 +829,7 @@ The following two controls are only valid for video and vbi 
capture.
 The following two controls are only valid for video capture.
 
 - DV Timings Signal Mode:
+
selects the behavior of VIDIOC_QUERY_DV_TIMINGS: what
should it return?
 
-- 
2.13.5

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 7/7] media: index.rst: don't write "Contents:" on PDF output

2017-09-03 Thread Mauro Carvalho Chehab
Right now, Sphinx unconditionally creates a blank page with
just "Contents:" on it, on PDF output. While this makes sense
for html, it doesn't o PDF, as LaTeX does what's required
automatically.

Fix it.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/index.rst | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/media/index.rst b/Documentation/media/index.rst
index 7d2907d4f8d7..1cf5316c8ff8 100644
--- a/Documentation/media/index.rst
+++ b/Documentation/media/index.rst
@@ -1,7 +1,11 @@
 Linux Media Subsystem Documentation
 ===
 
-Contents:
+.. only:: html
+
+   .. class:: toc-title
+
+Table of Contents
 
 .. toctree::
:maxdepth: 2
-- 
2.13.5

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/7] media: format.rst: use the right markup for important notes

2017-09-03 Thread Mauro Carvalho Chehab
There's an important note there, but it is not using the
ReST markup. So, it doesn't get any visual highlight on
the output.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/uapi/v4l/format.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/media/uapi/v4l/format.rst 
b/Documentation/media/uapi/v4l/format.rst
index 452c6d59cad5..3e3efb0e349e 100644
--- a/Documentation/media/uapi/v4l/format.rst
+++ b/Documentation/media/uapi/v4l/format.rst
@@ -78,7 +78,7 @@ output devices is available. [#f1]_
 The :ref:`VIDIOC_ENUM_FMT` ioctl must be supported
 by all drivers exchanging image data with applications.
 
-**Important**
+.. important::
 
 Drivers are not supposed to convert image formats in kernel space.
 They must enumerate only formats directly supported by the hardware.
-- 
2.13.5

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 6/7] media: pixfmt*.rst: replace a two dots by a comma

2017-09-03 Thread Mauro Carvalho Chehab
On several tables, the color sample location table preamble is
written as:
Color Sample Location..
Instead of:
Color Sample Location:

I suspect that the repetition of such pattern was due to some
copy-and-paste (or perhaps some error during DocBook conversion).

Anyway, fix it.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/uapi/v4l/pixfmt-m420.rst| 2 +-
 Documentation/media/uapi/v4l/pixfmt-nv12.rst| 2 +-
 Documentation/media/uapi/v4l/pixfmt-nv12m.rst   | 2 +-
 Documentation/media/uapi/v4l/pixfmt-nv16.rst| 2 +-
 Documentation/media/uapi/v4l/pixfmt-nv16m.rst   | 2 +-
 Documentation/media/uapi/v4l/pixfmt-uyvy.rst| 2 +-
 Documentation/media/uapi/v4l/pixfmt-vyuy.rst| 2 +-
 Documentation/media/uapi/v4l/pixfmt-y41p.rst| 2 +-
 Documentation/media/uapi/v4l/pixfmt-yuv410.rst  | 2 +-
 Documentation/media/uapi/v4l/pixfmt-yuv411p.rst | 2 +-
 Documentation/media/uapi/v4l/pixfmt-yuv420.rst  | 2 +-
 Documentation/media/uapi/v4l/pixfmt-yuv420m.rst | 2 +-
 Documentation/media/uapi/v4l/pixfmt-yuv422m.rst | 2 +-
 Documentation/media/uapi/v4l/pixfmt-yuv422p.rst | 2 +-
 Documentation/media/uapi/v4l/pixfmt-yuv444m.rst | 2 +-
 Documentation/media/uapi/v4l/pixfmt-yuyv.rst| 2 +-
 Documentation/media/uapi/v4l/pixfmt-yvyu.rst| 2 +-
 17 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/Documentation/media/uapi/v4l/pixfmt-m420.rst 
b/Documentation/media/uapi/v4l/pixfmt-m420.rst
index 7dd47c071e2f..6703f4079c3e 100644
--- a/Documentation/media/uapi/v4l/pixfmt-m420.rst
+++ b/Documentation/media/uapi/v4l/pixfmt-m420.rst
@@ -66,7 +66,7 @@ Each cell is one byte.
   - Cr\ :sub:`11`
 
 
-**Color Sample Location..**
+**Color Sample Location:**
 
 
 
diff --git a/Documentation/media/uapi/v4l/pixfmt-nv12.rst 
b/Documentation/media/uapi/v4l/pixfmt-nv12.rst
index 5b45a6d2ac95..2776b41377d5 100644
--- a/Documentation/media/uapi/v4l/pixfmt-nv12.rst
+++ b/Documentation/media/uapi/v4l/pixfmt-nv12.rst
@@ -71,7 +71,7 @@ Each cell is one byte.
   - Cr\ :sub:`11`
 
 
-**Color Sample Location..**
+**Color Sample Location:**
 
 .. flat-table::
 :header-rows:  0
diff --git a/Documentation/media/uapi/v4l/pixfmt-nv12m.rst 
b/Documentation/media/uapi/v4l/pixfmt-nv12m.rst
index de3051fd6b50..c1a2779f604c 100644
--- a/Documentation/media/uapi/v4l/pixfmt-nv12m.rst
+++ b/Documentation/media/uapi/v4l/pixfmt-nv12m.rst
@@ -83,7 +83,7 @@ Each cell is one byte.
   - Cr\ :sub:`11`
 
 
-**Color Sample Location..**
+**Color Sample Location:**
 
 
 
diff --git a/Documentation/media/uapi/v4l/pixfmt-nv16.rst 
b/Documentation/media/uapi/v4l/pixfmt-nv16.rst
index 8ceba79ff636..f0fdad3006cf 100644
--- a/Documentation/media/uapi/v4l/pixfmt-nv16.rst
+++ b/Documentation/media/uapi/v4l/pixfmt-nv16.rst
@@ -79,7 +79,7 @@ Each cell is one byte.
   - Cr\ :sub:`31`
 
 
-**Color Sample Location..**
+**Color Sample Location:**
 
 
 
diff --git a/Documentation/media/uapi/v4l/pixfmt-nv16m.rst 
b/Documentation/media/uapi/v4l/pixfmt-nv16m.rst
index 4d46ab39f9f1..c45f036763e7 100644
--- a/Documentation/media/uapi/v4l/pixfmt-nv16m.rst
+++ b/Documentation/media/uapi/v4l/pixfmt-nv16m.rst
@@ -83,7 +83,7 @@ Each cell is one byte.
   - Cr\ :sub:`32`
 
 
-**Color Sample Location..**
+**Color Sample Location:**
 
 
 
diff --git a/Documentation/media/uapi/v4l/pixfmt-uyvy.rst 
b/Documentation/media/uapi/v4l/pixfmt-uyvy.rst
index 30660e04dd0e..ecdc2d94c209 100644
--- a/Documentation/media/uapi/v4l/pixfmt-uyvy.rst
+++ b/Documentation/media/uapi/v4l/pixfmt-uyvy.rst
@@ -65,7 +65,7 @@ Each cell is one byte.
   - Y'\ :sub:`33`
 
 
-**Color Sample Location..**
+**Color Sample Location:**
 
 
 
diff --git a/Documentation/media/uapi/v4l/pixfmt-vyuy.rst 
b/Documentation/media/uapi/v4l/pixfmt-vyuy.rst
index a3f61f280b94..670c339c1714 100644
--- a/Documentation/media/uapi/v4l/pixfmt-vyuy.rst
+++ b/Documentation/media/uapi/v4l/pixfmt-vyuy.rst
@@ -65,7 +65,7 @@ Each cell is one byte.
   - Y'\ :sub:`33`
 
 
-**Color Sample Location..**
+**Color Sample Location:**
 
 .. flat-table::
 :header-rows:  0
diff --git a/Documentation/media/uapi/v4l/pixfmt-y41p.rst 
b/Documentation/media/uapi/v4l/pixfmt-y41p.rst
index 05d040c46a47..e1fe548807a4 100644
--- a/Documentation/media/uapi/v4l/pixfmt-y41p.rst
+++ b/Documentation/media/uapi/v4l/pixfmt-y41p.rst
@@ -88,7 +88,7 @@ Each cell is one byte.
   - Y'\ :sub:`37`
 
 
-**Color Sample Location..**
+**Color Sample Location:**
 
 .. flat-table::
 :header-rows:  0
diff --git a/Documentation/media/uapi/v4l/pixfmt-yuv410.rst 
b/Documentation/media/uapi/v4l/pixfmt-yuv410.rst
index 0c49915af850..b51a0d1c6108 100644
--- a/Documentation/media/uapi/v4l/pixfmt-yuv410.rst
+++ b/Documentation/media/uapi/v4l/pixfmt-yuv410.rst
@@ -67,7 +67,7 @@ Each cell is one byte.
   - Cb\ :sub:`00`
 
 
-**Color Sample Location..**
+**Color Sample Location:**
 
 
 
diff --git a/Documentation/media/uapi/v4l/pixfmt-yuv411p.rst 

[PATCH 4/7] media: vidioc-g-fmt.rst: adjust table format

2017-09-03 Thread Mauro Carvalho Chehab
While doing a visual inspection with Sphinx 1.5, I noticed that
one of the columns was smaller than the text written there.

As this is the only thing I noticed with Sphinx 1.5, I suspect
that this was also a problem with Sphinx 1.4. Yet, I opted to
touch it in a way that wouldn't cause backward issues.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/uapi/v4l/vidioc-g-fmt.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/media/uapi/v4l/vidioc-g-fmt.rst 
b/Documentation/media/uapi/v4l/vidioc-g-fmt.rst
index f598ea9166e3..3ead350e099f 100644
--- a/Documentation/media/uapi/v4l/vidioc-g-fmt.rst
+++ b/Documentation/media/uapi/v4l/vidioc-g-fmt.rst
@@ -88,7 +88,7 @@ The format as returned by :ref:`VIDIOC_TRY_FMT 
` must be identical
 
 .. c:type:: v4l2_format
 
-.. tabularcolumns::  |p{1.2cm}|p{4.3cm}|p{3.0cm}|p{9.0cm}|
+.. tabularcolumns::  |p{1.2cm}|p{4.6cm}|p{3.0cm}|p{8.6cm}|
 
 .. flat-table:: struct v4l2_format
 :header-rows:  0
-- 
2.13.5

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/7] media: v4l2 uapi book: get rid of driver programming's chapter

2017-09-03 Thread Mauro Carvalho Chehab
It doesn't make any sense having a driver programming's chapter
at the uAPI book, as this is related to kernel API. Also,
we now have such kAPI book where V4L2 driver programming is covered.

So, get rid of this left-over.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/uapi/v4l/driver.rst | 9 -
 Documentation/media/uapi/v4l/v4l2.rst   | 1 -
 2 files changed, 10 deletions(-)
 delete mode 100644 Documentation/media/uapi/v4l/driver.rst

diff --git a/Documentation/media/uapi/v4l/driver.rst 
b/Documentation/media/uapi/v4l/driver.rst
deleted file mode 100644
index 2319b383f0a4..
--- a/Documentation/media/uapi/v4l/driver.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-.. -*- coding: utf-8; mode: rst -*-
-
-.. _driver:
-
-***
-V4L2 Driver Programming
-***
-
-to do
diff --git a/Documentation/media/uapi/v4l/v4l2.rst 
b/Documentation/media/uapi/v4l/v4l2.rst
index 297c293d4c93..2128717299b3 100644
--- a/Documentation/media/uapi/v4l/v4l2.rst
+++ b/Documentation/media/uapi/v4l/v4l2.rst
@@ -25,7 +25,6 @@ This part describes the Video for Linux API version 2 (V4L2 
API) specification.
 pixfmt
 io
 devices
-driver
 libv4l
 compat
 user-func
-- 
2.13.5

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/7] media: fix build breakage with Sphinx 1.6

2017-09-03 Thread Mauro Carvalho Chehab
Not sure why, but, on this particular document, on Sphinx 1.4 and 1.5,
the usage of \small here causes it to write the table at the same
column where the text before it ended, with makes the table to
go out of the page.

A possible solution would be to add a \newline on latex raw,
with was the approach took.

Unfortunately, that causes a breakage on Sphinx 1.6.

So, we're adding a small dot here, in order to avoid polluting
too much the document, while making it compatible with all versions.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/uapi/v4l/pixfmt-srggb10p.rst | 16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst 
b/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst
index 9e52610aa954..aa3dbf163b97 100644
--- a/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst
+++ b/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst
@@ -33,10 +33,22 @@ of a small V4L2_PIX_FMT_SBGGR10P image:
 **Byte Order.**
 Each cell is one byte.
 
-
 .. raw:: latex
 
-\newline\small
+\small
+
+.. HACK:
+
+   On Sphinx 1.4 and 1.5, the usage of \small just before the table
+   causes it to continue at the same column where the above text ended.
+
+   A possible solution would be to add a \newline on latex raw.
+   Unfortunately, that causes a breakage on Sphinx 1.6.
+
+   So, we're placing the \small before this note, with should be producing
+   the same result on all versions
+
+.
 
 .. tabularcolumns:: |p{2.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{10.0cm}|
 
-- 
2.13.5

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2] media: net.h: add kernel-doc and use it at Documentation/

2017-09-03 Thread Mauro Carvalho Chehab
As we did with frontend.h, ca.h and dmx.h, move the struct
definition to net.h.

That should help to keep it updated, as more stuff gets
added there.

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

v2:
  - Version 1 was broken: it was missing net-types.rst file and if_num was
called "ifnum", causing a warning.

 Documentation/media/uapi/dvb/net-add-if.rst | 34 -
 Documentation/media/uapi/dvb/net-types.rst  |  9 
 Documentation/media/uapi/dvb/net.rst|  1 +
 include/uapi/linux/dvb/net.h| 15 +
 4 files changed, 25 insertions(+), 34 deletions(-)
 create mode 100644 Documentation/media/uapi/dvb/net-types.rst

diff --git a/Documentation/media/uapi/dvb/net-add-if.rst 
b/Documentation/media/uapi/dvb/net-add-if.rst
index 1087efb9baa0..6749b70246c5 100644
--- a/Documentation/media/uapi/dvb/net-add-if.rst
+++ b/Documentation/media/uapi/dvb/net-add-if.rst
@@ -41,40 +41,6 @@ created.
 The struct :c:type:`dvb_net_if`::ifnum field will be
 filled with the number of the created interface.
 
-.. c:type:: dvb_net_if
-
-.. flat-table:: struct dvb_net_if
-:header-rows:  1
-:stub-columns: 0
-
-
--  .. row 1
-
-   -  ID
-
-   -  Description
-
--  .. row 2
-
-   -  pid
-
-   -  Packet ID (PID) of the MPEG-TS that contains data
-
--  .. row 3
-
-   -  ifnum
-
-   -  number of the Digital TV interface.
-
--  .. row 4
-
-   -  feedtype
-
-   -  Encapsulation type of the feed. It can be:
- ``DVB_NET_FEEDTYPE_MPE`` for MPE encoding or
- ``DVB_NET_FEEDTYPE_ULE`` for ULE encoding.
-
-
 Return Value
 
 
diff --git a/Documentation/media/uapi/dvb/net-types.rst 
b/Documentation/media/uapi/dvb/net-types.rst
new file mode 100644
index ..e1177bdcd623
--- /dev/null
+++ b/Documentation/media/uapi/dvb/net-types.rst
@@ -0,0 +1,9 @@
+.. -*- coding: utf-8; mode: rst -*-
+
+.. _dmx_types:
+
+**
+Net Data Types
+**
+
+.. kernel-doc:: include/uapi/linux/dvb/net.h
diff --git a/Documentation/media/uapi/dvb/net.rst 
b/Documentation/media/uapi/dvb/net.rst
index fdb5301a4b1f..e0cd4e402627 100644
--- a/Documentation/media/uapi/dvb/net.rst
+++ b/Documentation/media/uapi/dvb/net.rst
@@ -35,6 +35,7 @@ Digital TV net Function Calls
 .. toctree::
 :maxdepth: 1
 
+net-types
 net-add-if
 net-remove-if
 net-get-if
diff --git a/include/uapi/linux/dvb/net.h b/include/uapi/linux/dvb/net.h
index f451e7eb0b0b..89d805f9a5a6 100644
--- a/include/uapi/linux/dvb/net.h
+++ b/include/uapi/linux/dvb/net.h
@@ -26,6 +26,21 @@
 
 #include 
 
+/**
+ * struct dvb_net_if - describes a DVB network interface
+ *
+ * @pid: Packet ID (PID) of the MPEG-TS that contains data
+ * @if_num: number of the Digital TV interface.
+ * @feedtype: Encapsulation type of the feed.
+ *
+ * A MPEG-TS stream may contain packet IDs with IP packages on it.
+ * This struct describes it, and the type of encoding.
+ *
+ * @feedtype can be:
+ *
+ * - %DVB_NET_FEEDTYPE_MPE for MPE encoding
+ * - %DVB_NET_FEEDTYPE_ULE for ULE encoding.
+ */
 struct dvb_net_if {
__u16 pid;
__u16 if_num;
-- 
2.13.5


--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v7 00/19] simplify crypto wait for async op

2017-09-03 Thread Gilad Ben-Yossef
On Thu, Aug 31, 2017 at 3:31 PM, Harsh Jain  wrote:
> HI Gilad,
>
> I think we need an update in ESP also. Now EBUSY return means driver
> has accepted, Packet should not be dropped in
>
> esp_output_tail() function.

Good catch. You are right and the same holds true for ah_output() in ah4.c.

But I do wonder, the code there now treats -EBUSY as a special case
and returns NET_XMIT_DROP
but if an AEAD or AHASH transformation return some other error, like
-ENOMEM or -EINVAL shouldn't
we return NET_XMIT_DROP in that case too?

Any ideas?

Gilad

>
>
> On Thu, Aug 24, 2017 at 7:48 PM, Gilad Ben-Yossef  wrote:
>> Many users of kernel async. crypto services have a pattern of
>> starting an async. crypto op and than using a completion
>> to wait for it to end.
>>
>> This patch set simplifies this common use case in two ways:
>>
>> First, by separating the return codes of the case where a
>> request is queued to a backlog due to the provider being
>> busy (-EBUSY) from the case the request has failed due
>> to the provider being busy and backlogging is not enabled
>> (-EAGAIN).
>>
>> Next, this change is than built on to create a generic API
>> to wait for a async. crypto operation to complete.
>>
>> The end result is a smaller code base and an API that is
>> easier to use and more difficult to get wrong.
>>
>> The patch set was boot tested on x86_64 and arm64 which
>> at the very least tests the crypto users via testmgr and
>> tcrypt but I do note that I do not have access to some
>> of the HW whose drivers are modified nor do I claim I was
>> able to test all of the corner cases.
>>
>> The patch set is based upon linux-next release tagged
>> next-20170824.
>>
>> Changes from v6:
>> - Fix brown paper bag compile error on marvell/cesa
>>   code.
>>
>> Changes from v5:
>> - Remove redundant new line as spotted by Jonathan
>>   Cameron.
>> - Reworded dm-verity change commit message to better
>>   clarify potential issue averted by change as
>>   pointed out by Mikulas Patocka.
>>
>> Changes from v4:
>> - Rebase on top of latest algif changes from Stephan
>>   Mueller.
>> - Fix typo in ccp patch title.
>>
>> Changes from v3:
>> - Instead of changing the return code to indicate
>>   backlog queueing, change the return code to indicate
>>   transient busy state, as suggested by Herbert Xu.
>>
>> Changes from v2:
>> - Patch title changed from "introduce crypto wait for
>>   async op" to better reflect the current state.
>> - Rebase on top of latest linux-next.
>> - Add a new return code of -EIOCBQUEUED for backlog
>>   queueing, as suggested by Herbert Xu.
>> - Transform more users to the new API.
>> - Update the drbg change to account for new init as
>>   indicated by Stephan Muller.
>>
>> Changes from v1:
>> - Address review comments from Eric Biggers.
>> - Separated out bug fixes of existing code and rebase
>>   on top of that patch set.
>> - Rename 'ecr' to 'wait' in fscrypto code.
>> - Split patch introducing the new API from the change
>>   moving over the algif code which it originated from
>>   to the new API.
>> - Inline crypto_wait_req().
>> - Some code indentation fixes.
>>
>> Gilad Ben-Yossef (19):
>>   crypto: change transient busy return code to -EAGAIN
>>   crypto: ccp: use -EAGAIN for transient busy indication
>>   crypto: remove redundant backlog checks on EBUSY
>>   crypto: marvell/cesa: remove redundant backlog checks on EBUSY
>>   crypto: introduce crypto wait for async op
>>   crypto: move algif to generic async completion
>>   crypto: move pub key to generic async completion
>>   crypto: move drbg to generic async completion
>>   crypto: move gcm to generic async completion
>>   crypto: move testmgr to generic async completion
>>   fscrypt: move to generic async completion
>>   dm: move dm-verity to generic async completion
>>   cifs: move to generic async completion
>>   ima: move to generic async completion
>>   crypto: tcrypt: move to generic async completion
>>   crypto: talitos: move to generic async completion
>>   crypto: qce: move to generic async completion
>>   crypto: mediatek: move to generic async completion
>>   crypto: adapt api sample to use async. op wait
>>
>>  Documentation/crypto/api-samples.rst |  52 ++---
>>  crypto/af_alg.c  |  27 -
>>  crypto/ahash.c   |  12 +--
>>  crypto/algapi.c  |   6 +-
>>  crypto/algif_aead.c  |   8 +-
>>  crypto/algif_hash.c  |  50 +
>>  crypto/algif_skcipher.c  |   9 +-
>>  crypto/api.c |  13 +++
>>  crypto/asymmetric_keys/public_key.c  |  28 +
>>  crypto/cryptd.c  |   4 +-
>>  crypto/cts.c |   6 +-
>>  crypto/drbg.c|  36 ++-
>>  crypto/gcm.c |  32 ++
>>  crypto/lrw.c |   8 +-
>>  crypto/rsa-pkcs1pad.c|  16 +--
>>