[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fffbd2139aa81c04138d49946686eceefc8a0d4e.camel@pengutronix.de>
Date: Mon, 20 Mar 2023 14:28:15 +0100
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Jacopo Mondi <jacopo.mondi@...asonboard.com>
Cc: Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Francesco Dolcini <francesco@...cini.it>,
Sakari Ailus <sakari.ailus@....fi>,
Marcel Ziswiler <marcel@...wiler.com>,
linux-media@...r.kernel.org, kernel@...gutronix.de,
Francesco Dolcini <francesco.dolcini@...adex.com>,
Aishwarya Kothari <aishwarya.kothari@...adex.com>,
Marcel Ziswiler <marcel.ziswiler@...adex.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Steve Longerbeam <slongerbeam@...il.com>,
linux-kernel@...r.kernel.org,
Marco Felsch <m.felsch@...gutronix.de>
Subject: Re: [PATCH v2] media: i2c: ov5640: Implement get_mbus_config
On Mo, 2023-03-20 at 13:47 +0100, Jacopo Mondi wrote:
> Hi Philipp
>
> On Mon, Mar 20, 2023 at 12:26:26PM +0100, Philipp Zabel wrote:
> > On Mo, 2023-03-20 at 11:55 +0200, Laurent Pinchart wrote:
> > > On Mon, Mar 20, 2023 at 11:37:33AM +0200, Sakari Ailus wrote:
> > > > Hi Laurent,
> > > >
> > > > On Mon, Mar 20, 2023 at 11:26:02AM +0200, Laurent Pinchart wrote:
> > > > > In a (simplified) nutshell,
> > > > >
> > > > > ---------+ +----------+ +---------+ +-----+ +-----+
> > > > > > Camera | --> | CSI-2 RX | --> | CSI2IPU | --> | Mux | --> | IPU |
> > > > > > Sensor | | | | Gasket | | | | |
> > > > > ---------+ +----------+ +---------+ +-----+ +-----+
> > > >
> > > > Thank you, this is helpful.
> > > >
> > > > I suppose the mux here at least won't actively do anything to the data. So
> > > > presumably its endpoint won't contain the active configuration, but its
> > > > superset.
> > > >
> > > > >
> > > > > All those blocks, except for the gasket, have a node in DT.
> > > > >
> > > > > The IPU driver needs to know the number of CSI-2 data lanes, which is
> > > > > encoded in the data-lanes DT property present in both the sensor output
> > > > > endpoint and the CSI-2 RX input endpoint, but not the other endpoints in
> > > > > the pipeline.
> > > >
> > > > This doesn't yet explain why the sensor would need to implement
> > > > get_mbus_config if its bus configuration remains constant.
> > >
> > > If I recall correctly, the IPU driver calls .g_mbus_config() on the
> > > camera sensor to get the number of lanes, as it can't get it from its
> > > own endpoint. That's a hack, and as Jacopo proposed, calling
> > > .g_mbus_config() on the CSI-2 RX would be better, as the CSI-2 RX driver
> > > can then get the value from its own endpoint, without requiring all
> > > sensor drivers to implement .g_mbus_config().
> >
> > The IPU driver doesn't call get_mbus_config, the CSI-2 RX driver does
>
> Am I confusing IPU CSI with CSI-2 ?
> https://elixir.bootlin.com/linux/latest/source/drivers/staging/media/imx/imx-media-csi.c#L211
What the eyesight ... Sorry for the confusion. You are right, it's
right there. Yes, that is IPU CSI calling get_mbus_config.
I had git grepped for get_mbus_config this morning, and was convinced I
only found the call in imx-media-csi2, which is where the number of
lanes is evaluated. The call in imx-media-csi.c is used to determine
whether the sensor is parallel or CSI-2 and whether the CSI has to
operate in bypass mode (for 16-bit parallel bus).
regards
Philipp
Powered by blists - more mailing lists