All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: "linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: [GIT PATCHES FOR 3.1] s5p-fimc and noon010pc30 driver updates
Date: Wed, 27 Jul 2011 23:55:55 -0300	[thread overview]
Message-ID: <4E30CFBB.1050009@redhat.com> (raw)
In-Reply-To: <4E303E5B.9050701@samsung.com>

Hi Sylwester,

Em 27-07-2011 13:35, Sylwester Nawrocki escreveu:
> Hi Mauro,
> 
> The following changes since commit f0a21151140da01c71de636f482f2eddec2840cc:
> 
>   Merge tag 'v3.0' into staging/for_v3.1 (2011-07-22 13:33:14 -0300)
> 
> are available in the git repository at:
> 
>   git://git.infradead.org/users/kmpark/linux-2.6-samsung fimc-for-mauro
> 
> Sylwester Nawrocki (28):
>       s5p-fimc: Add support for runtime PM in the mem-to-mem driver
>       s5p-fimc: Add media entity initialization
>       s5p-fimc: Remove registration of video nodes from probe()
>       s5p-fimc: Remove sclk_cam clock handling
>       s5p-fimc: Limit number of available inputs to one
>       s5p-fimc: Remove sensor management code from FIMC capture driver
>       s5p-fimc: Remove v4l2_device from video capture and m2m driver
>       s5p-fimc: Add the media device driver
>       s5p-fimc: Conversion to use struct v4l2_fh
>       s5p-fimc: Conversion to the control framework
>       s5p-fimc: Add media operations in the capture entity driver
>       s5p-fimc: Add PM helper function for streaming control
>       s5p-fimc: Correct color format enumeration
>       s5p-fimc: Convert to use media pipeline operations
>       s5p-fimc: Add subdev for the FIMC processing block
>       s5p-fimc: Add support for camera capture in JPEG format
>       s5p-fimc: Add v4l2_device notification support for single frame capture
>       s5p-fimc: Use consistent names for the buffer list functions
>       s5p-fimc: Add runtime PM support in the camera capture driver
>       s5p-fimc: Correct crop offset alignment on exynos4
>       s5p-fimc: Remove single-planar capability flags
>       noon010pc30: Do not ignore errors in initial controls setup
>       noon010pc30: Convert to the pad level ops
>       noon010pc30: Clean up the s_power callback
>       noon010pc30: Remove g_chip_ident operation handler
>       s5p-csis: Handle all available power supplies
>       s5p-csis: Rework of the system suspend/resume helpers
>       s5p-csis: Enable v4l subdev device node

>From the last time you've submitted a similar set of patches:

>> 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 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.
> 
> 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

>From this current pull request:

>From c6fb462c38be60a45d16a29a9e56c886ee0aa08c Mon Sep 17 00:00:00 2001
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
Date: Fri, 10 Jun 2011 20:36:51 +0200
Subject: s5p-fimc: Conversion to the control framework
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>

Make the driver inherit sensor controls when video node only API
compatibility mode is enabled. The control framework allows to
properly handle sensor controls through controls inheritance when
pipeline is re-configured at media device level.

...
-       .vidioc_queryctrl               = fimc_vidioc_queryctrl,
-       .vidioc_g_ctrl                  = fimc_vidioc_g_ctrl,
-       .vidioc_s_ctrl                  = fimc_cap_s_ctrl,
...

I'll need to take some time to review this patchset. So, it will likely
miss the bus for 3.1.

While the code inside this patch looked ok, your comments scared me ;)

In summary: The V4L2 API is not a legacy API that needs a "compatibility
mode". Removing controls like VIDIOC_S_INPUT, VIDIOC_*CTRL, etc in
favor of the media controller API is wrong. This specific patch itself seems
ok, but it is easy to loose the big picture on a series of 28 patches
with about 4000 lines changed.

The media controller API is meant to be used only by specific applications
that might add some extra features to the driver. So, it is an optional
API. In all cases where both API's can do the same thing, the proper way 
is to use the V4L2 API only, and not the media controller API.

So, my current plan is to merge the patches into an experimental tree, after
reviewing the changeset, and test against a V4L2 application, in order to
confirm that everything is ok.

I may need a couple weeks for doing that, as it will take some time for me
to have an available window for hacking with it.

Regards,
Mauro

  reply	other threads:[~2011-07-28  2:56 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-27 16:35 [GIT PATCHES FOR 3.1] s5p-fimc and noon010pc30 driver updates Sylwester Nawrocki
2011-07-28  2:55 ` Mauro Carvalho Chehab [this message]
2011-07-28 10:09   ` Sylwester Nawrocki
2011-07-28 13:20     ` Mauro Carvalho Chehab
2011-07-28 22:57       ` Sylwester Nawrocki
2011-07-29  4:02         ` Mauro Carvalho Chehab
2011-07-29  8:36           ` Laurent Pinchart
2011-08-09 20:05             ` Mauro Carvalho Chehab
2011-08-09 23:18               ` Sakari Ailus
2011-08-10  0:22                 ` Mauro Carvalho Chehab
2011-08-10  8:41                   ` Sylwester Nawrocki
2011-08-10 12:52                     ` Mauro Carvalho Chehab
2011-08-15 12:45                   ` Laurent Pinchart
2011-08-16  0:21                     ` Mauro Carvalho Chehab
2011-08-16  8:59                       ` Laurent Pinchart
2011-08-16 15:07                         ` Mauro Carvalho Chehab
2011-08-15 12:30               ` Laurent Pinchart
2011-08-16  0:13                 ` Mauro Carvalho Chehab
2011-08-16  8:57                   ` Laurent Pinchart
2011-08-16 15:30                     ` Mauro Carvalho Chehab
2011-08-16 15:44                       ` Laurent Pinchart
2011-08-16 22:36                         ` Mauro Carvalho Chehab
2011-08-17  7:57                           ` Laurent Pinchart
2011-08-17 12:25                             ` Mauro Carvalho Chehab
2011-08-17 12:37                               ` Ivan T. Ivanov
2011-08-17 13:27                                 ` Mauro Carvalho Chehab
2011-08-17 12:33                           ` Sakari Ailus
2011-08-16 21:47                       ` Sylwester Nawrocki
2011-08-17  6:13                         ` Embedded device and the V4L2 API support - Was: " Mauro Carvalho Chehab
2011-08-20 11:27                           ` Sylwester Nawrocki
2011-08-20 12:12                             ` Mauro Carvalho Chehab
2011-08-24 22:29                               ` Sakari Ailus
2011-08-25 12:43                                 ` Mauro Carvalho Chehab
2011-08-26 13:45                                   ` Laurent Pinchart
2011-08-26 14:16                                     ` Hans Verkuil
2011-08-26 15:09                                       ` Mauro Carvalho Chehab
2011-08-26 15:29                                         ` Hans Verkuil
2011-08-26 17:32                                           ` Mauro Carvalho Chehab
2011-08-29  9:24                                             ` Laurent Pinchart
2011-08-29 14:53                                               ` Mauro Carvalho Chehab
2011-08-29  9:12                                         ` Laurent Pinchart
2011-08-30 20:34                                   ` Sakari Ailus
2011-08-03 14:28           ` Sylwester Nawrocki
2011-07-29  8:17   ` Sakari Ailus

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=4E30CFBB.1050009@redhat.com \
    --to=mchehab@redhat.com \
    --cc=linux-media@vger.kernel.org \
    --cc=s.nawrocki@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.