From: Philipp Zabel <p.zabel@pengutronix.de>
To: Hans Verkuil <hansverk@cisco.com>,
Dave Stevenson <dave.stevenson@raspberrypi.org>
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>,
Mats Randgaard <matrandg@cisco.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hans.verkuil@cisco.com>,
linux-media@vger.kernel.org,
Sakari Ailus <sakari.ailus@linux.intel.com>
Subject: Re: [PATCH 2/3] [media] tc358743: Increase FIFO level to 300.
Date: Wed, 20 Sep 2017 14:36:22 +0200 [thread overview]
Message-ID: <1505910982.7865.10.camel@pengutronix.de> (raw)
In-Reply-To: <f4824a16-13ce-7d49-c7dd-19a11f3c01ec@cisco.com>
On Wed, 2017-09-20 at 13:24 +0200, Hans Verkuil wrote:
> On 09/20/17 13:00, Dave Stevenson wrote:
[...]
> > It is communicated over the subdevice API - tc358743_g_mbus_config
> > reports back the appropriate number of lanes to the receiver
> > subdevice.
> > A suitable v4l2_subdev_has_op(dev->sensor, video, g_mbus_config) call
> > as you're starting streaming therefore gives you the correct
> > information. That's what I've just done for the BCM283x Unicam
> > driver[1], but admittedly I'm not using the media controller API which
> > i.MX6 is.
>
> Shouldn't this information come from the device tree? The g_mbus_config
> op is close to being deprecated or even removed. There are currently only
> two obscure V4L2 bridge drivers that call it. It dates from pre-DT times
> I rather not see it used in a new bridge driver.
>
> The problem is that contains data that belongs to the DT (hardware
> capabilities). Things that can actually change dynamically should be
> communicated via another op. We don't have that, so that should be
> created.
>
> I've CC-ed Sakari, he is the specialist for such things.
The total number of MIPI CSI-2 lanes (as well as their order) and the
list of allowed link frequencies are static and come from the device
tree.
But the possible combinations of link frequency and number of active
lanes out of those for a given resolution and format can vary depending
on both transmitter and receiver capabilities.
For example, if the DT specifies 4 lanes and both 148.5 MHz and 297 MHz
link frequencies, the Toshiba chip could send 720p60 YUYV via 4 lanes at
148.5 MHz, via 2 lanes at 297 MHz, or even via 4 lanes at 297 MHz, with
the longer FIFO delay.
> >
> > [1] http://www.spinics.net/lists/linux-media/msg121813.html, as part
> > of the unicam_start_streaming function.
> >
> > > The i.MX6 MIPI CSI-2 receiver driver can't cope with that, as it always
> > > activates all four lanes that are configured in the device tree. I can
> > > work around that with the following patch:
> >
> > It can't cope running at less than 4 lanes, or it can't cope with a
> > change?
The hardware can cope with both, although I don't know if there are
receivers that can not.
In my case this is just about not knowing how many lanes to activate
(see below) and which link frequency to choose (currently fixed to the
first).
[...]
> > > [...] 300 is giving a fair safety margin.
> > >
> > > It does not work for 720p60 on 4 lanes at 594 Mbit/s, as the spreadsheet
> > > warns, and testing shows.
> >
> > If it doesn't work with 720p60, then I guess it has no hope with many
> > other resolutions.
That would have to be checked on a case by case basis, unfortunately.
I have a usecase that only supports 1080p50/60 and 720p50/60.
> > It sounds like confirming whether g_mbus_config is a potential
> > solution for i.MX6 (sorry I'm not familiar enough with that code to do
> > my own quick search), but otherwise cranking it up to 320 is
> > reasonable, and I'll see what other numbers fall out of the
> > spreadsheet.
It seems we need a replacement for g_mbus_config that only returns the
dynamic parameters.
regards
Philipp
next prev parent reply other threads:[~2017-09-20 12:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-19 13:08 [PATCH 0/3] [media] tc358743: Support for a wider range of inputs Dave Stevenson
2017-09-19 13:08 ` [PATCH 1/3] [media] tc358743: Correct clock mode reported in g_mbus_config Dave Stevenson
2017-09-21 9:21 ` Philipp Zabel
2017-09-19 13:08 ` [PATCH 2/3] [media] tc358743: Increase FIFO level to 300 Dave Stevenson
2017-09-19 15:24 ` Philipp Zabel
2017-09-19 16:49 ` Mauro Carvalho Chehab
2017-09-20 9:14 ` Dave Stevenson
2017-09-20 10:23 ` Philipp Zabel
2017-09-20 11:00 ` Dave Stevenson
2017-09-20 11:24 ` Hans Verkuil
2017-09-20 12:23 ` Dave Stevenson
2017-09-20 12:37 ` Hans Verkuil
2017-09-20 12:36 ` Philipp Zabel [this message]
2017-09-20 12:50 ` Sakari Ailus
2017-09-20 13:12 ` Hans Verkuil
2017-09-21 6:35 ` Sakari Ailus
2017-09-21 9:04 ` Philipp Zabel
2017-09-19 13:08 ` [PATCH 3/3] [media] tc358743: Add support for 972Mbit/s link freq Dave Stevenson
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=1505910982.7865.10.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=dave.stevenson@raspberrypi.org \
--cc=hans.verkuil@cisco.com \
--cc=hansverk@cisco.com \
--cc=linux-media@vger.kernel.org \
--cc=matrandg@cisco.com \
--cc=mchehab@kernel.org \
--cc=mchehab@s-opensource.com \
--cc=sakari.ailus@linux.intel.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).