public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <snjw23@gmail.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: linux-media@vger.kernel.org, mchehab@redhat.com
Subject: Re: [GIT PATCHES FOR 3.1] s5p-fimc and noon010pc30 drivers conversion? to media controller API
Date: Fri, 15 Jul 2011 21:36:50 +0300	[thread overview]
Message-ID: <094eae8d-3a15-496f-aa0b-be6e8cefa20a@email.android.com> (raw)
In-Reply-To: <20110714215142.GI27451@valkosipuli.localdomain>

Hi Sakari,

thanks for your comments.





Sakari Ailus <sakari.ailus@iki.fi> wrote:

T>On Thu, Jul 14, 2011 at 10:07:03PM +0300, Sylwester Nawrocki wrote:
>> Hi Mauro,
>
>Hi Sylwester and Mauro,
T>
>> On Thu, 14 Jul 2011 13:27:17 -0300, Mauro Carvalho Chehab
>> <mchehab@redhat.com> wrote:
T>> >Em 08-07-2011 12:25, Sylwester Nawrocki escreveu:
>...
>> >>       s5p-fimc: Remove sclk_cam clock handling
>> >>       s5p-fimc: Limit number of available inputs to one
>> 
>> 
>> >Camera sensors at FIMC input are no longer selected with S_INPUT
>> ioctl.
>> >They will be attached to required FIMC entity through pipeline
>> >re-configuration at the media device level.
>> 
>> 
>> >Why? The proper way to select an input is via S_INPUT. The driver
>> may also
>> >optionally allow changing it via the media device, but it should
>> not be
>> >a mandatory requirement, as the media device API is optional.
>> 
>> The problem I'm trying to solve here is sharing the sensors and
>> mipi-csi receivers between multiple FIMC H/W instances. Previously
>> the driver supported attaching a sensor to only one selected FIMC at
>> compile time. You could, for instance, specify all sensors as the
>> selected FIMC's platform data and then use S_INPUT to choose between
>> them. The sensor could not be used together with any other FIMC. But
>> this is desired due to different capabilities of the FIMC IP
>> instances. And now, instead of hardcoding a sensor assigment to
>> particular video node, the sensors are bound to the media device.
>> The media device driver takes the list of sensors and attaches them
>> one by one to subsequent FIMC instances when it is initializing.
>> Each sensor has a link to each FIMC but only one of them is active
T>> by default. That said an user application can use selected camera by
>> opening corresponding video node. Which camera is at which node can
>> be queried with G_INPUT.
>> 
Tr>> I could try to implement the previous S_INPUT behaviour, but IMHO
>> this would lead to considerable and unnecessary driver code
>> complication due to supporting overlapping APIs.
>
>This sounds quite familiar and similar to OMAP 3 ISP. There's more to
>configure than an S_INPUT ioctl can do. Selecting sensor using S_INPUT
>involves a number of other decisions as well if I'm not mistaken.

Yes, in particular the number of subdevs in the data path may need to be changed which really belongs to the media device driver.
And sensors arbitration between FIMC instances is best done at the media device layer. Same applies to the 2 external clocks for the sensors which are shared between all FIMC IP instances and the sensors.
Thus switching between sensors with S_INPUT would possibly involve pipeline reconfiguration which doesn't sound like a good design.

>
>Sylwester: could you provide an MC graph of the device with possibly a
>few
>sensors attached? AFAIR media-ctl -p and dotfile.

I would be happy to provide this information but I'm in the middle of vacations and cannot really do that at the moment;)
I recall pasting some links to the graph images to v4l irc channel. Here is the working one that most closely depicts current state: 
http://wstaw.org/m/2011/05/26/fimc_graph__.png
(yellow FIMC.n subdevs should not be there and s5p-mipi-csis.1 subdev should have links to all green FIMC.n subdevs).

-- 
Thanks,
Sylwester

  reply	other threads:[~2011-07-15 18:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-08 15:25 [GIT PATCHES FOR 3.1] s5p-fimc and noon010pc30 drivers conversion to media controller API Sylwester Nawrocki
2011-07-14 16:27 ` Mauro Carvalho Chehab
2011-07-14 19:07   ` Sylwester Nawrocki
2011-07-14 21:51     ` [GIT PATCHES FOR 3.1] s5p-fimc and noon010pc30 drivers conversion? " Sakari Ailus
2011-07-15 18:36       ` Sylwester Nawrocki [this message]
2011-07-18  9:22         ` Sakari Ailus
2011-07-18 20:17           ` Sylwester Nawrocki

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=094eae8d-3a15-496f-aa0b-be6e8cefa20a@email.android.com \
    --to=snjw23@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.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