linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>,
	Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [PATCH v7 1/7] media: add glossary.rst with a glossary of terms used at V4L2 spec
Date: Tue, 10 Oct 2017 09:49:38 -0300	[thread overview]
Message-ID: <20171010094938.044fb335@vento.lan> (raw)
In-Reply-To: <20171010115435.eer5yaybxdni2ck7@valkosipuli.retiisi.org.uk>

Em Tue, 10 Oct 2017 14:54:35 +0300
Sakari Ailus <sakari.ailus@iki.fi> escreveu:

> On Tue, Oct 10, 2017 at 06:15:03AM -0300, Mauro Carvalho Chehab wrote:
> > Em Fri, 6 Oct 2017 14:51:06 +0300
> > Sakari Ailus <sakari.ailus@iki.fi> escreveu:
> >   
> > > Hi Mauro,
> > > 
> > > On Fri, Oct 06, 2017 at 01:22:29PM +0300, Sakari Ailus wrote:  
> > > > > +    V4L2 device node
> > > > > +	A device node that is associated to a V4L2 main driver,
> > > > > +	as specified in :ref:`v4l2_device_naming`.    
> > > 
> > > I think we need to name the interface, not so much their instances.
> > > 
> > > How about adding:
> > > 
> > >     V4L2
> > > 	Video4Linux 2 interface. The interface implemented by **V4L2 device
> > > 	nodes**.
> > > 
> > > and:
> > > 
> > >     V4L2 device node
> > > 	A device node implementing the **V4L2** interface.  
> > 
> > Not sure if I answered it already. subdev API is part of V4L2.
> > So, a change like that would cause more harm than good ;-)  
> 
> Hmm. There seems to be a gap here. It'd be much easier to maintain
> consistency in naming and definitions if V4L2 sub-device nodes were also
> documented to be V4L2 device nodes, just as any other device nodes exposed
> by drivers through the V4L2 framework.
> 
> > 
> > The definition should let it clear that only the devnodes 
> > implemented by the V4L2 main driver are considered as
> > V4L2 device nodes.  
> 
> Why? I don't think we should make assumptions on which driver exposes a
> device node; this is not visible to the user space after all.

Because the V4L2 spec documents, with the exception of the subdev.rst
(and where otherwise noticed), assumes that a V4L2 device node doesn't
include subdevs.

So, if you loo, for example, at the chapter 1 name:
	"common API elements"

it implies that every single V4L2 device node supports what's there.
But that's not the case, for example, for what's described at
Documentation/media/uapi/v4l/querycap.rst (with is part of
chapter 1).

There are a couple of possible alternatives:

1) define V4L2 device nodes excluding /dev/subdev, with is the
   current approach;

2) rewrite the entire V4L2 uAPI spec to explicitly talk, on each
   section, if it applies or not to sub-devices;

3) "promote" subdev API to a separate part of the media spec,
   just like what it was done for media controller, e. g. adding
   a /Documentation/media/uapi/subdev directory and add there
   descriptions for all syscalls that apply to subdevs
   (open, close, ioctl). That would be weird from kAPI point of
   view, as splitting it from V4L2 won't make sense there. So,
   we'll likely need to add some notes at both kAPI and uAPI to
   explain that the subdev API userspace API is just a different
   way to expose V4L2 hardware control, but, internally, both
   are implemented by the same V4L2 core.

This patchset assumes (1). I'm ok if someone wants to do either
(2) or (3), but I won't have the required time to do such
changes.


Thanks,
Mauro

  reply	other threads:[~2017-10-10 12:49 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-27 22:23 [PATCH v7 0/7] document types of hardware control for V4L2 Mauro Carvalho Chehab
2017-09-27 22:23 ` [PATCH v7 1/7] media: add glossary.rst with a glossary of terms used at V4L2 spec Mauro Carvalho Chehab
2017-10-06 10:22   ` Sakari Ailus
2017-10-06 11:51     ` Sakari Ailus
2017-10-10  9:15       ` Mauro Carvalho Chehab
2017-10-10 11:54         ` Sakari Ailus
2017-10-10 12:49           ` Mauro Carvalho Chehab [this message]
2017-10-10 22:18             ` Sakari Ailus
2017-10-11 10:15               ` Mauro Carvalho Chehab
2017-10-10  8:30     ` Mauro Carvalho Chehab
2017-10-10  8:56       ` Sakari Ailus
2017-10-10  8:51     ` Mauro Carvalho Chehab
2017-10-10  8:54       ` [PATCH] " Mauro Carvalho Chehab
2017-10-10  7:47   ` [PATCH v7 1/7] " Hans Verkuil
2017-10-10  8:20     ` Mauro Carvalho Chehab
2017-10-10  8:27       ` Hans Verkuil
2017-10-10  8:36         ` Mauro Carvalho Chehab
2017-09-27 22:23 ` [PATCH v7 2/7] media: open.rst: better document device node naming Mauro Carvalho Chehab
2017-09-27 22:23 ` [PATCH v7 3/7] media: open.rst: remove the minor number range Mauro Carvalho Chehab
2017-09-27 22:23 ` [PATCH v7 4/7] media: open.rst: document devnode-centric and mc-centric types Mauro Carvalho Chehab
2017-09-27 22:32   ` Randy Dunlap
2017-09-28  1:09     ` Mauro Carvalho Chehab
2017-10-06 12:24   ` Sakari Ailus
2017-10-10 11:24     ` Mauro Carvalho Chehab
2017-09-27 22:23 ` [PATCH v7 5/7] media: open.rst: Adjust some terms to match the glossary Mauro Carvalho Chehab
2017-10-06 12:48   ` Sakari Ailus
2017-10-10 11:37     ` Mauro Carvalho Chehab
2017-10-10 22:41       ` Sakari Ailus
2017-10-11  9:05         ` Mauro Carvalho Chehab
2017-09-27 22:23 ` [PATCH v7 6/7] media: videodev2: add a flag for MC-centric devices Mauro Carvalho Chehab
2017-09-29  6:27   ` Sakari Ailus
2017-10-10  7:58   ` Hans Verkuil
2017-09-27 22:23 ` [PATCH v7 7/7] media: open.rst: add a notice about subdev-API on vdev-centric Mauro Carvalho Chehab
2017-09-29  6:26   ` Sakari Ailus
2017-10-10  8:02   ` Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171010094938.044fb335@vento.lan \
    --to=mchehab@s-opensource.com \
    --cc=corbet@lwn.net \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=ricardo.ribalda@gmail.com \
    --cc=sakari.ailus@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).