From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
linux-media@vger.kernel.org
Subject: Re: [PATCH 23/24] V4L2: mt9p031: add struct v4l2_subdev_platform_data to platform data
Date: Mon, 29 Apr 2013 11:55:16 +0200 [thread overview]
Message-ID: <1740663.UDksr2HIPi@avalon> (raw)
In-Reply-To: <20130426091556.GQ32299@pengutronix.de>
Hi Sascha,
On Friday 26 April 2013 11:15:56 Sascha Hauer wrote:
> On Fri, Apr 26, 2013 at 10:43:28AM +0200, Guennadi Liakhovetski wrote:
> > On Fri, 26 Apr 2013, Sascha Hauer wrote:
> > > > > That information should be conveyed by platform/DT data for the
> > > > > host, and be used to convert the 12-bit media bus code into a 8-bit
> > > > > media bus code in the host (a core helper function would probably
> > > > > be helpful).
> > > >
> > > > Yes, and we discussed this before too, I think. I proposed based then
> > > > to implement some compatibility table of "trivial" transformations,
> > > > like a 12-bit Bayer, right-shifted by 4 bits, produces a respective 8-
> > > > bit Bayer etc. Such transformations would fit nicely in soc_mediabus.c
> > > > ;-) This just needs to be implemented...
> > >
> > > These "trivial" transformations may turn out not to be so trivial. In
> > > the devicetree we would then need kind of 'shift-4-bit-left' properties.
> >
> > We already have a "data-shift" property exactly for this purpose.
> >
> > > How about instead describing the sensor node with:
> > > mbus-formats = <0x3010, 0x2013>;
> > >
> > > and the corresponding host interface with:
> > > mbus-formats = <0x3013, 0x2001>;
> >
> > How would this describe _how_ the transformation should be performed?
>
> nth index in the sensor array matches nth index in the csi array. The
> above describes:
>
> V4L2_MBUS_FMT_SGBRG12_1X12 on the sensor matches V4L2_MBUS_FMT_SGBRG8_1X8 on
> the host V4L2_MBUS_FMT_Y12_1X12 on the sensor matches V4L2_MBUS_FMT_Y8_1X8
> on the host
>
> effectively implementing a shift by four bits. But also more complicated
> transformations could be described, like a colour space converter
> implemented in a DSP (not sure if anyone does this, but you get the
> idea)
If there's a component on the board between the sensor and the host it should
be modeled as a proper subdev. I don't think trying to describe anything more
complex than shifting the lanes in the device tree sensor and/or bridge data
is a good idea.
> > And why does the host driver need mbus formats?
>
> Because mbus formats are effectively the input of a host driver. I assumed
> that we translate the mbus formats the sensor can output into the
> corresponding mbus formats that arrive at the host interface. Then
> afterwards the usual translation from mbus to fourcc a host interface can do
> is performed. I think what you aim at instead is a translation directly from
> the sensor to memory which I think is more complicated to build correctly.
The sensor knows what mbus formats it supports at its output, and the host
knows what mbus formats it supports at its inputs. Both information can be
queried from user space and kernel space. With the data lanes shift property
the host can then compute the mbus format it will receive at its input. I
don't think we need to specify that in DT.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2013-04-29 9:55 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-18 21:35 [PATCH 00/24] V4L2: subdevice pad-level API wrapper Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 01/24] V4L2: (cosmetic) remove redundant use of unlikely() Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 02/24] imx074: fix error handling for failed async subdevice registration Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 03/24] mt9t031: fix NULL dereference during probe() Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 04/24] V4L2: fix Oops on rmmod path Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 05/24] V4L2: allow dummy file-handle initialisation by v4l2_fh_init() Guennadi Liakhovetski
2013-04-19 7:22 ` Hans Verkuil
2013-04-22 12:07 ` Laurent Pinchart
2013-04-18 21:35 ` [PATCH 06/24] V4L2: add a common V4L2 subdevice platform data type Guennadi Liakhovetski
2013-04-19 7:33 ` Hans Verkuil
2013-04-19 7:48 ` Guennadi Liakhovetski
2013-04-19 8:26 ` Hans Verkuil
2013-10-17 18:24 ` Guennadi Liakhovetski
2013-11-04 11:24 ` Hans Verkuil
2013-11-06 0:13 ` Laurent Pinchart
2013-04-18 21:35 ` [PATCH 07/24] soc-camera: switch to using the new struct v4l2_subdev_platform_data Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 08/24] ARM: update all soc-camera users to new platform data layout Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 09/24] SH: " Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 10/24] soc-camera: update soc-camera-platform & its users to a " Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 11/24] soc-camera: completely remove struct soc_camera_link Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 12/24] V4L2: soc-camera: retrieve subdevice platform data from struct v4l2_subdev Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 13/24] ARM: pcm037: convert custom GPIO-based power function to a regulator Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 14/24] mx3-camera: clean up the use of platform data, add driver owner Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 15/24] mx3-camera: support asynchronous subdevice registration Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 16/24] V4L2: mt9p031: add support for V4L2 clock and asynchronous probing Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 17/24] V4L2: mt9p031: add support for .g_mbus_config() video operation Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 18/24] V4L2: mt9p031: power down the sensor if no supported device has been detected Guennadi Liakhovetski
2013-04-22 12:19 ` Laurent Pinchart
2013-04-22 12:33 ` Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 19/24] V4L2: add struct v4l2_subdev_try_buf Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 20/24] V4L2: add a subdev pointer to struct v4l2_subdev_fh Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 21/24] V4L2: add a subdevice-driver pad-operation wrapper Guennadi Liakhovetski
2013-04-19 8:20 ` Hans Verkuil
2013-04-19 8:52 ` Guennadi Liakhovetski
2013-04-19 9:40 ` Hans Verkuil
2013-04-18 21:35 ` [PATCH 22/24] V4L2: soc-camera: use the " Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 23/24] V4L2: mt9p031: add struct v4l2_subdev_platform_data to platform data Guennadi Liakhovetski
2013-04-18 21:47 ` Guennadi Liakhovetski
2013-04-22 12:31 ` Laurent Pinchart
2013-04-22 12:39 ` Guennadi Liakhovetski
2013-04-22 12:46 ` Laurent Pinchart
2013-04-26 8:30 ` Sascha Hauer
2013-04-26 8:43 ` Guennadi Liakhovetski
2013-04-26 9:15 ` Sascha Hauer
2013-04-29 9:55 ` Laurent Pinchart [this message]
2013-04-22 12:45 ` Laurent Pinchart
2013-04-18 21:35 ` [PATCH 24/24] ARM: pcm037: support mt9p031 / mt9p006 camera sensors Guennadi Liakhovetski
2013-04-18 21:45 ` Guennadi Liakhovetski
2013-04-19 10:29 ` [PATCH 00/24] V4L2: subdevice pad-level API wrapper 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=1740663.UDksr2HIPi@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=g.liakhovetski@gmx.de \
--cc=linux-media@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
/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