linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@iki.fi>
To: Benoit Parrot <bparrot@ti.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Steve Longerbeam <slongerbeam@gmail.com>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	robh+dt@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org,
	kernel@pengutronix.de, fabio.estevam@nxp.com,
	linux@armlinux.org.uk, mchehab@kernel.org, nick@shmanahar.org,
	markus.heiser@darmarit.de,
	laurent.pinchart+renesas@ideasonboard.com, geert@linux-m68k.org,
	arnd@arndb.de, sudipm.mukherjee@gmail.com,
	minghsiu.tsai@mediatek.com, tiffany.lin@mediatek.com,
	jean-christophe.trotin@st.com, horms+renesas@verge.net.au,
	niklas.soderlund+renesas@ragnatech.se, robert.jarzmik@free.fr,
	songjun.wu@microchip.com, andrew-ct.chen@mediatek.com,
	gregkh@linuxfoundation.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-media@vger.kernel.org, devel@driverdev.osuosl.org,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Steve Longerbeam <steve_longerbeam@mentor.com>,
	sakari.ailus@linux.intel.com
Subject: Re: [PATCH v3 13/24] platform: add video-multiplexer subdevice driver
Date: Tue, 7 Feb 2017 22:50:05 +0200	[thread overview]
Message-ID: <20170207205005.GE13854@valkosipuli.retiisi.org.uk> (raw)
In-Reply-To: <20170207133648.GA27065@ti.com>

Hi Benoit,

On Tue, Feb 07, 2017 at 07:36:48AM -0600, Benoit Parrot wrote:
> Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote on Tue [2017-Feb-07 12:26:32 +0200]:
> > Hi Steve,
> > 
> > On Monday 06 Feb 2017 15:10:46 Steve Longerbeam wrote:
> > > On 02/06/2017 02:33 PM, Laurent Pinchart wrote:
> > > > On Monday 06 Feb 2017 10:50:22 Hans Verkuil wrote:
> > > >> On 02/05/2017 04:48 PM, Laurent Pinchart wrote:
> > > >>> On Tuesday 24 Jan 2017 18:07:55 Steve Longerbeam wrote:
> > > >>>> On 01/24/2017 04:02 AM, Philipp Zabel wrote:
> > > >>>>> On Fri, 2017-01-20 at 15:03 +0100, Hans Verkuil wrote:
> > > >>>>>>> +
> > > >>>>>>> +int vidsw_g_mbus_config(struct v4l2_subdev *sd, struct
> > > >>>>>>> v4l2_mbus_config *cfg)
> > 
> > [snip]
> > 
> > > >>>>>> I am not certain this op is needed at all. In the current kernel this
> > > >>>>>> op is only used by soc_camera, pxa_camera and omap3isp (somewhat
> > > >>>>>> dubious). Normally this information should come from the device tree
> > > >>>>>> and there should be no need for this op.
> > > >>>>>> 
> > > >>>>>> My (tentative) long-term plan was to get rid of this op.
> > > >>>>>> 
> > > >>>>>> If you don't need it, then I recommend it is removed.
> > > >>>> 
> > > >>>> Hi Hans, the imx-media driver was only calling g_mbus_config to the
> > > >>>> camera sensor, and it was doing that to determine the sensor's bus
> > > >>>> type. This info was already available from parsing a v4l2_of_endpoint
> > > >>>> from the sensor node. So it was simple to remove the g_mbus_config
> > > >>>> calls, and instead rely on the parsed sensor v4l2_of_endpoint.
> > > >>> 
> > > >>> That's not a good point.
> > > > 
> > > > (mea culpa, s/point/idea/)
> > > > 
> > > >>> The imx-media driver must not parse the sensor DT node as it is not
> > > >>> aware of what bindings the sensor is compatible with.
> > > 
> > > Hi Laurent,
> > > 
> > > I don't really understand this argument. The sensor node has been found
> > > by parsing the OF graph, so it is known to be a camera sensor node at
> > > that point.
> > 
> > All you know in the i.MX6 driver is that the remote node is a video source. 
> > You can rely on the fact that it implements the OF graph bindings to locate 
> > other ports in that DT node, but that's more or less it.
> > 
> > DT properties are defined by DT bindings and thus qualified by a compatible 
> > string. Unless you match on sensor compat strings in the i.MX6 driver (which 
> > you shouldn't do, to keep the driver generic) you can't know for certain how 
> > to parse the sensor node DT properties. For all you know, the video source 
> > could be a bridge such as an HDMI to CSI-2 converter for instance, so you 
> > can't even rely on the fact that it's a sensor.
> > 
> > > >>> Information must instead be queried from the sensor subdev at runtime,
> > > >>> through the g_mbus_config() operation.
> > > >>> 
> > > >>> Of course, if you can get the information from the imx-media DT node,
> > > >>> that's certainly an option. It's only information provided by the sensor
> > > >>> driver that you have no choice but query using a subdev operation.
> > > >> 
> > > >> Shouldn't this come from the imx-media DT node? BTW, why is omap3isp
> > > >> using this?
> > > > 
> > > > It all depends on what type of information needs to be retrieved, and
> > > > whether it can change at runtime or is fixed. Adding properties to the
> > > > imx-media DT node is certainly fine as long as those properties describe
> > > > the i.MX side.
> > >
> > > In this case the info needed is the media bus type. That info is most easily
> > > available by calling v4l2_of_parse_endpoint() on the sensor's endpoint
> > > node.
> > 
> > I haven't had time to check the code in details yet, so I can't really comment 
> > on what you need and how it should be implemented exactly.
> > 
> > > The media bus type is not something that can be added to the
> > > imx-media node since it contains no endpoint nodes.
> > 
> > Agreed. You have endpoints in the CSI nodes though.
> > 
> > > > In the omap3isp case, we use the operation to query whether parallel data
> > > > contains embedded sync (BT.656) or uses separate h/v sync signals.
> > > > 
> > > >> The reason I am suspicious about this op is that it came from soc-camera
> > > >> and predates the DT. The contents of v4l2_mbus_config seems very much
> > > >> like a HW description to me, i.e. something that belongs in the DT.
> > > > 
> > > > Part of it is possibly outdated, but for buses that support multiple modes
> > > > of operation (such as the parallel bus case described above) we need to
> > > > make that information discoverable at runtime. Maybe this should be
> > > > considered as related to Sakari's efforts to support VC/DT for CSI-2, and
> > > > supported through the API he is working on.
> > > 
> > > That sounds interesting, can you point me to some info on this effort?
> > 
> > Sure.
> > 
> > http://git.retiisi.org.uk/?p=~sailus/linux.git;a=shortlog;h=refs/heads/vc
> > 
> > > I've been thinking the DT should contain virtual channel info for CSI-2
> > > buses.
> > 
> > I don't think it should. CSI-2 virtual channels and data types should be 
> > handled as a software concept, and thus supported through driver code without 
> > involving DT.
> 
> Laurent,
> 
> So when you have a CSI2 port aggregator for instance where traffic from up
> to 4 CSI2 sources where each source is now assigned its own VC by the
> aggregator and interleaved into a single CSI2 Receiver. I was hoping that
> in this case the VC would be DT discoverable as a specicic source identifier.
> So the CSI-RX side could associate a specific source and create its own
> video device. I am guessing that no such thing exist today?

This should be configurable in software: the sensors connected to the
aggregator may also output multiple streams. The number of streams may also
depend on the user specified configuration over the MC / V4L2 sub-device
interfaces. Thus, this needs to be configurable in software.

We do need additional patches on top of the current mediatree.git master
branch though, some of which are not yet written...

-- 
Kind regards,

Sakari Ailus
e-mail: sakari.ailus@iki.fi	XMPP: sailus@retiisi.org.uk

  reply	other threads:[~2017-02-07 20:59 UTC|newest]

Thread overview: 185+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-07  2:11 [PATCH v3 00/24] i.MX Media Driver Steve Longerbeam
2017-01-07  2:11 ` [PATCH v3 01/24] [media] dt-bindings: Add bindings for i.MX media driver Steve Longerbeam
2017-01-13 11:55   ` Philipp Zabel
2017-01-13 19:03     ` Steve Longerbeam
2017-01-16 12:09       ` Philipp Zabel
2017-01-16 17:13         ` Steve Longerbeam
2017-01-07  2:11 ` [PATCH v3 02/24] ARM: dts: imx6qdl: Add compatible, clocks, irqs to MIPI CSI-2 node Steve Longerbeam
2017-01-13 11:57   ` Philipp Zabel
2017-01-13 22:40     ` Steve Longerbeam
2017-01-07  2:11 ` [PATCH v3 03/24] ARM: dts: imx6qdl: Add mipi_ipu1/2 multiplexers, mipi_csi, and their connections Steve Longerbeam
2017-01-07  2:11 ` [PATCH v3 04/24] ARM: dts: imx6qdl: add media device Steve Longerbeam
2017-01-07  2:11 ` [PATCH v3 05/24] ARM: dts: imx6qdl-sabrelite: remove erratum ERR006687 workaround Steve Longerbeam
2017-01-13 11:59   ` Philipp Zabel
2017-01-07  2:11 ` [PATCH v3 06/24] ARM: dts: imx6-sabrelite: add OV5642 and OV5640 camera sensors Steve Longerbeam
2017-01-13 12:03   ` Philipp Zabel
2017-01-13 23:04     ` Steve Longerbeam
2017-01-16 12:55       ` Philipp Zabel
2017-01-16 17:15         ` Steve Longerbeam
2017-02-05 15:17         ` Laurent Pinchart
2017-01-30 22:28   ` Russell King - ARM Linux
2017-01-30 22:51   ` Russell King - ARM Linux
2017-02-05 15:24     ` Laurent Pinchart
2017-02-05 15:37       ` Russell King - ARM Linux
2017-01-07  2:11 ` [PATCH v3 07/24] ARM: dts: imx6-sabresd: " Steve Longerbeam
2017-01-07  2:11 ` [PATCH v3 08/24] ARM: dts: imx6-sabreauto: create i2cmux for i2c3 Steve Longerbeam
2017-01-07  2:11 ` [PATCH v3 09/24] ARM: dts: imx6-sabreauto: add reset-gpios property for max7310_b Steve Longerbeam
2017-01-07  2:11 ` [PATCH v3 10/24] ARM: dts: imx6-sabreauto: add pinctrl for gpt input capture Steve Longerbeam
2017-01-12 19:37   ` Tim Harvey
2017-01-12 23:40     ` Steve Longerbeam
2017-01-07  2:11 ` [PATCH v3 11/24] ARM: dts: imx6-sabreauto: add the ADV7180 video decoder Steve Longerbeam
2017-01-07  2:11 ` [PATCH v3 12/24] add mux and video interface bridge entity functions Steve Longerbeam
2017-01-20 13:56   ` Hans Verkuil
2017-02-05 15:36   ` Laurent Pinchart
2017-02-06 10:27     ` Philipp Zabel
2017-01-07  2:11 ` [PATCH v3 13/24] platform: add video-multiplexer subdevice driver Steve Longerbeam
2017-01-10  5:35   ` Rob Herring
2017-01-20 14:03   ` Hans Verkuil
2017-01-24 12:02     ` Philipp Zabel
2017-01-25  2:07       ` Steve Longerbeam
2017-02-05 15:48         ` Laurent Pinchart
2017-02-06  9:50           ` Hans Verkuil
2017-02-06 22:33             ` Laurent Pinchart
2017-02-06 23:10               ` Steve Longerbeam
2017-02-07 10:26                 ` Laurent Pinchart
2017-02-07 10:41                   ` Philipp Zabel
2017-02-07 14:11                     ` Laurent Pinchart
2017-02-07 13:36                   ` Benoit Parrot
2017-02-07 20:50                     ` Sakari Ailus [this message]
2017-02-07 23:04                     ` Laurent Pinchart
2017-01-24 12:44   ` Javier Martinez Canillas
2017-01-26  1:22     ` Steve Longerbeam
2017-02-07 20:46   ` Sakari Ailus
2017-02-08  9:47     ` Philipp Zabel
2017-02-08 10:05       ` Laurent Pinchart
2017-01-07  2:11 ` [PATCH v3 14/24] UAPI: Add media UAPI Kbuild file Steve Longerbeam
2017-01-07  2:11 ` [PATCH v3 15/24] media: Add userspace header file for i.MX Steve Longerbeam
2017-01-13 12:05   ` Philipp Zabel
2017-01-13 23:13     ` Steve Longerbeam
2017-02-05 15:50       ` Laurent Pinchart
2017-01-07  2:11 ` [PATCH v3 16/24] media: Add i.MX media core driver Steve Longerbeam
2017-01-13 15:20   ` Philipp Zabel
2017-01-14 22:46     ` Steve Longerbeam
2017-01-16 13:47       ` Philipp Zabel
2017-01-23  2:31         ` Steve Longerbeam
2017-01-23 11:13           ` Philipp Zabel
2017-01-24  1:38             ` Steve Longerbeam
2017-01-24  1:45               ` Steve Longerbeam
2017-01-24 11:37                 ` Philipp Zabel
2017-01-30 15:28             ` Russell King - ARM Linux
     [not found]     ` <2b1d2418-1ad4-6373-cb07-c3aeab48187f@gmail.com>
2017-01-19  1:44       ` Steve Longerbeam
2017-01-24 11:39         ` Philipp Zabel
2017-01-30 22:29   ` Russell King - ARM Linux
2017-02-02 22:44   ` Russell King - ARM Linux
2017-02-02 22:50   ` Russell King - ARM Linux
2017-02-07  1:54     ` Steve Longerbeam
2017-01-07  2:11 ` [PATCH v3 17/24] media: imx: Add CSI subdev driver Steve Longerbeam
2017-01-16 15:03   ` Philipp Zabel
2017-01-16 21:15     ` Steve Longerbeam
2017-01-30 22:29   ` Russell King - ARM Linux
2017-01-31 10:30   ` Russell King - ARM Linux
2017-01-31 11:20   ` Russell King - ARM Linux
2017-02-01  0:31     ` Steve Longerbeam
2017-02-01  0:58       ` Russell King - ARM Linux
2017-01-31 15:51   ` Philipp Zabel
2017-01-31 16:48     ` Philipp Zabel
2017-02-01  1:40       ` Steve Longerbeam
2017-02-07 16:18   ` [PATCH] media: imx: csi: fix crop rectangle reset in sink set_fmt Philipp Zabel
2017-01-07  2:11 ` [PATCH v3 18/24] media: imx: Add SMFC subdev driver Steve Longerbeam
2017-02-01 18:39   ` Russell King - ARM Linux
2017-02-01 18:52     ` Steve Longerbeam
2017-01-07  2:11 ` [PATCH v3 19/24] media: imx: Add IC subdev drivers Steve Longerbeam
2017-01-20 14:29   ` Hans Verkuil
2017-01-25  2:39     ` Steve Longerbeam
2017-01-30 22:29   ` Russell King - ARM Linux
2017-01-07  2:11 ` [PATCH v3 20/24] media: imx: Add Camera Interface subdev driver Steve Longerbeam
2017-01-20 14:38   ` Hans Verkuil
2017-01-24  2:15     ` Steve Longerbeam
2017-01-31 13:42     ` Russell King - ARM Linux
2017-01-31 18:21       ` Steve Longerbeam
2017-01-31 20:33         ` Russell King - ARM Linux
2017-01-31 21:55           ` Ian Arkver
2017-01-31 22:04             ` Russell King - ARM Linux
2017-01-31 22:33               ` Ian Arkver
2017-01-31 22:36               ` Steve Longerbeam
2017-01-31 23:30                 ` Russell King - ARM Linux
2017-01-31 23:41                   ` Steve Longerbeam
2017-02-02 22:35   ` Russell King - ARM Linux
2017-02-07  1:52     ` Steve Longerbeam
2017-01-07  2:11 ` [PATCH v3 21/24] media: imx: Add MIPI CSI-2 Receiver " Steve Longerbeam
2017-01-30 22:30   ` Russell King - ARM Linux
2017-01-31  0:01   ` Russell King - ARM Linux
2017-01-31  9:49     ` Philipp Zabel
2017-02-01  1:02       ` Steve Longerbeam
2017-02-01  1:13         ` Russell King - ARM Linux
2017-01-31  0:31   ` Russell King - ARM Linux
2017-01-31  2:11     ` Steve Longerbeam
2017-02-01 23:44   ` Russell King - ARM Linux
2017-02-02  0:04     ` Steve Longerbeam
2017-02-02 11:50   ` Philipp Zabel
2017-02-08 23:23     ` Steve Longerbeam
2017-02-08 23:42       ` Russell King - ARM Linux
2017-02-09 23:49         ` Steve Longerbeam
2017-02-09 23:51           ` Steve Longerbeam
2017-02-13  9:20             ` Philipp Zabel
2017-02-13 23:20               ` Steve Longerbeam
2017-02-14 16:59                 ` Philipp Zabel
2017-02-09  9:43       ` Philipp Zabel
2017-01-07  2:11 ` [PATCH v3 22/24] media: imx: Add MIPI CSI-2 OV5640 sensor " Steve Longerbeam
2017-01-20 14:48   ` Hans Verkuil
2017-01-25 19:10     ` Steve Longerbeam
2017-01-30 23:29   ` Russell King - ARM Linux
2017-01-31  3:31     ` Steve Longerbeam
2017-02-02 10:36   ` Laurent Pinchart
2017-02-12 22:53     ` Steve Longerbeam
2017-01-07  2:11 ` [PATCH v3 23/24] media: imx: Add Parallel OV5642 " Steve Longerbeam
2017-01-07  2:11 ` [PATCH v3 24/24] ARM: imx_v6_v7_defconfig: Enable staging video4linux drivers Steve Longerbeam
2017-01-11 23:14 ` [PATCH v3 00/24] i.MX Media Driver Tim Harvey
2017-01-12  3:22   ` Steve Longerbeam
2017-01-20 13:52 ` Hans Verkuil
2017-01-20 16:31   ` Philipp Zabel
2017-01-20 18:40     ` Steve Longerbeam
2017-01-20 20:39       ` Hans Verkuil
2017-01-23 11:00         ` Philipp Zabel
2017-01-23 11:08           ` Hans Verkuil
2017-01-24 11:28             ` Philipp Zabel
2017-01-23 23:08           ` Steve Longerbeam
2017-01-24 11:27             ` Philipp Zabel
2017-01-28 19:27               ` Steve Longerbeam
2017-01-30 13:06               ` Russell King - ARM Linux
2017-01-31 10:09                 ` Philipp Zabel
2017-01-31 13:14                   ` Russell King - ARM Linux
2017-01-31 13:35                     ` Philipp Zabel
2017-01-31 14:04                       ` Russell King - ARM Linux
2017-01-31  0:45 ` Russell King - ARM Linux
2017-01-31  1:06   ` Russell King - ARM Linux
2017-01-31  2:06     ` Steve Longerbeam
2017-01-31  1:22   ` Steve Longerbeam
2017-01-31  9:49     ` Philipp Zabel
2017-01-31 10:21     ` Russell King - ARM Linux
2017-01-31 11:00     ` Russell King - ARM Linux
2017-01-31 23:43       ` Steve Longerbeam
2017-02-01  0:23         ` Russell King - ARM Linux
2017-02-01  1:54           ` Steve Longerbeam
2017-02-01  9:20             ` Russell King - ARM Linux
2017-01-31 13:54 ` Philipp Zabel
2017-01-31 14:25   ` Philipp Zabel
2017-01-31 15:03     ` Russell King - ARM Linux
2017-02-01  1:26   ` Steve Longerbeam
2017-02-01  9:30     ` Philipp Zabel
2017-02-01 10:11       ` Russell King - ARM Linux
2017-02-01 10:42         ` Philipp Zabel
2017-02-01 10:53           ` Russell King - ARM Linux
2017-02-02  0:19       ` Steve Longerbeam
2017-02-03 14:41         ` Laurent Pinchart
2017-02-03 17:56           ` Steve Longerbeam
2017-02-15  2:27   ` Steve Longerbeam
2017-02-15  9:33     ` Philipp Zabel
2017-02-02 17:22 ` Russell King - ARM Linux
2017-02-02 17:31   ` Steve Longerbeam
2017-02-02 17:56   ` Russell King - ARM Linux
2017-02-02 18:26     ` Steve Longerbeam
2017-02-02 18:58       ` Russell King - ARM Linux
2017-02-02 19:12         ` Steve Longerbeam
2017-02-02 22:29           ` Russell King - ARM Linux
2017-02-03 18:49             ` Steve Longerbeam

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=20170207205005.GE13854@valkosipuli.retiisi.org.uk \
    --to=sakari.ailus@iki.fi \
    --cc=andrew-ct.chen@mediatek.com \
    --cc=arnd@arndb.de \
    --cc=bparrot@ti.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fabio.estevam@nxp.com \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=horms+renesas@verge.net.au \
    --cc=hverkuil@xs4all.nl \
    --cc=jean-christophe.trotin@st.com \
    --cc=kernel@pengutronix.de \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=markus.heiser@darmarit.de \
    --cc=mchehab@kernel.org \
    --cc=minghsiu.tsai@mediatek.com \
    --cc=nick@shmanahar.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=p.zabel@pengutronix.de \
    --cc=robert.jarzmik@free.fr \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sakari.ailus@linux.intel.com \
    --cc=shawnguo@kernel.org \
    --cc=slongerbeam@gmail.com \
    --cc=songjun.wu@microchip.com \
    --cc=steve_longerbeam@mentor.com \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=tiffany.lin@mediatek.com \
    /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).