linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@iki.fi>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH v2] mt9v032: Export horizontal and vertical blanking as V4L2 controls
Date: Tue, 14 Aug 2012 15:46:58 +0300	[thread overview]
Message-ID: <502A48C2.9000400@iki.fi> (raw)
In-Reply-To: <1433360.QycaYFLEyB@avalon>

Laurent Pinchart wrote:
> Hi Sakari,
>
> On Monday 13 August 2012 17:18:20 Sakari Ailus wrote:
>> Laurent Pinchart wrote:
>>> On Saturday 28 July 2012 00:27:23 Sakari Ailus wrote:
>>>> On Fri, Jul 27, 2012 at 01:02:04AM +0200, Laurent Pinchart wrote:
>>>>> On Thursday 26 July 2012 23:54:01 Sakari Ailus wrote:
>>>>>> On Tue, Jul 24, 2012 at 01:10:42AM +0200, Laurent Pinchart wrote:
>>>>>>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>>>>>>> ---
>>>>>>>
>>>>>>>    drivers/media/video/mt9v032.c |   36
>>>>>>>    ++++++++++++++++++++++++++++---
>>>>>>>    1 files changed, 33 insertions(+), 3 deletions(-)
>>>>>>>
>>>>>>> Changes since v1:
>>>>>>>
>>>>>>> - Make sure the total horizontal time will not go below 660 when
>>>>>>>     setting the horizontal blanking control
>>>>>>>
>>>>>>> - Restrict the vertical blanking value to 3000 as documented in the
>>>>>>>     datasheet. Increasing the exposure time actually extends vertical
>>>>>>>     blanking, as long as the user doesn't forget to turn auto-exposure
>>>>>>>     off...
>>>>>>
>>>>>> Does binning either horizontally or vertically affect the blanking
>>>>>> limits? If the process is analogue then the answer is typically "yes".
>>>>>
>>>>> The datasheet doesn't specify whether binning and blanking can influence
>>>>> each other.
>>>>
>>>> Vertical binning is often analogue since digital binning would require as
>>>> much temporary memory as the row holds pixels. This means the hardware
>>>> already does binning before a/d conversion and there's only need to
>>>> actually read half the number of rows, hence the effect on frame length.
>>>
>>> That will affect the frame length, but why would it affect vertical
>>> blanking ?
>>
>> Frame length == image height + vertical blanking.
>>
>> The SMIA++ driver (at least) associates the blanking controls to the
>> pixel array subdev. They might be more naturally placed to the source
>> (either binner or scaler) but the width and height (to calculate the
>> frame and line length) are related to the dimensions of the pixel array
>> crop rectangle.
>>
>> So when the binning configuration changes, that changes the limits for
>> blanking and thus possibly also blanking itself.
>
> Do the blanking controls expose blanking after binning or before binning ? In
> the later case I don't see how binning would influence them.

Some sensors control the blanking in pixel array directly whereas some, 
like the SMIA++, control the frame length in the source (scaler or 
binner) source instead.

So it is up to the sensor hardware --- I think it's still better to keep 
all the controls in a single subdev. Otherwise it'd be quite difficult 
for the user to figure out how to calculate the frame rate.

Kind regards,

-- 
Sakari Ailus
sakari.ailus@iki.fi

  reply	other threads:[~2012-08-14 12:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-23 18:34 [PATCH 0/4] Aptinate sensors patches Laurent Pinchart
2012-07-23 18:34 ` [PATCH 1/4] v4l2-ctrls: Add v4l2_ctrl_[gs]_ctrl_int64() Laurent Pinchart
2012-07-23 18:35 ` [PATCH 2/4] mt9v032: Provide pixel rate control Laurent Pinchart
2012-07-23 18:35 ` [PATCH 3/4] mt9v032: Export horizontal and vertical blanking as V4L2 controls Laurent Pinchart
2012-07-23 23:10   ` [PATCH v2] " Laurent Pinchart
2012-07-26 20:54     ` Sakari Ailus
2012-07-26 23:02       ` Laurent Pinchart
2012-07-27 21:27         ` Sakari Ailus
2012-07-28 19:09           ` Laurent Pinchart
2012-08-13 14:18             ` Sakari Ailus
2012-08-13 23:26               ` Laurent Pinchart
2012-08-14 12:46                 ` Sakari Ailus [this message]
2012-07-23 18:35 ` [PATCH 4/4] mt9p031: Fix horizontal and vertical blanking configuration Laurent Pinchart
2012-07-26 20:58 ` [PATCH 0/4] Aptinate sensors patches 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=502A48C2.9000400@iki.fi \
    --to=sakari.ailus@iki.fi \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    /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).