Re: [PATCH v5] media: imx208: Add imx208 camera sensor driver

2018-10-01 Thread Helmut Grohne
Hi Laurent, On Fri, Sep 28, 2018 at 03:49:38PM +0200, Laurent Pinchart wrote: > I don't think we'll reach an agreement here if we don't start talking about > real use cases. Would you have some to share ? Fair enough, but at that point, we very much disconnect from the imx208 in the subject. I'

Re: [PATCH 2/5] v4l: controls: Add support for exponential bases, prefixes and units

2018-10-01 Thread Helmut Grohne
On Fri, Sep 28, 2018 at 04:00:17PM +0200, Hans Verkuil wrote: > On 09/25/2018 12:14 PM, Sakari Ailus wrote: > > +/* V4L2 control unit prefixes */ > > +#define V4L2_CTRL_PREFIX_NANO -9 > > +#define V4L2_CTRL_PREFIX_MICRO -6 > > +#define V4L2_CTRL_PREFIX_MILLI -3

Re: [PATCH 0/5] Add units to controls

2018-09-26 Thread Helmut Grohne
On Tue, Sep 25, 2018 at 02:30:31PM +0200, Sakari Ailus wrote: > On Tue, Sep 25, 2018 at 01:48:02PM +0200, Helmut Grohne wrote: > > 1. There are a number of controls whose value is not easily described as > >either linear or exponential. I'm faced with at least two controls

Re: [PATCH 0/5] Add units to controls

2018-09-25 Thread Helmut Grohne
On Tue, Sep 25, 2018 at 12:14:29PM +0200, Sakari Ailus wrote: > This set adds a few things to the current control framework in terms of > what kind of information the user space may have on controls. It adds > support for units and prefixes, exponential base as well as information on > whether a co

Re: [PATCH 3/5] Documentation: media: Document control exponential bases, units, prefixes

2018-09-25 Thread Helmut Grohne
On Tue, Sep 25, 2018 at 12:14:32PM +0200, Sakari Ailus wrote: > +* - ``V4L2_CTRL_UNIT_PIXEL`` > + - 5 > + - A pixel in sensor's pixel matrix. This is a unit of time commonly > used > +by camera sensors in e.g. exposure control, i.e. the time it takes > for > + a sensor t

Re: [PATCH 1/1] v4l: Remove support for crop default target in subdev drivers

2018-09-24 Thread Helmut Grohne
On Mon, Sep 24, 2018 at 04:42:27PM +0200, Sakari Ailus wrote: > --- a/drivers/media/i2c/mt9t112.c > +++ b/drivers/media/i2c/mt9t112.c > @@ -888,12 +888,6 @@ static int mt9t112_get_selection(struct v4l2_subdev *sd, > sel->r.width = MAX_WIDTH; > sel->r.height = MAX_HEIGHT;

Use of V4L2_SEL_TGT_CROP_DEFAULT in i2c subdev drivers

2018-09-24 Thread Helmut Grohne
Hi, Documentation/media/uapi/v4l/v4l2-selection-targets.rst says that V4L2_SEL_TGT_CROP_DEFAULT is not valid for subdev drivers. Looking into drivers/media/i2c (which contains only subdev drivers except for video-i2c.c), the following drivers implement V4L2_SEL_TGT_CROP_DEFAULT: ak881x.c mt9m111.

Re: [PATCH v5] media: imx208: Add imx208 camera sensor driver

2018-09-21 Thread Helmut Grohne
On Thu, Sep 20, 2018 at 11:00:26PM +0200, Laurent Pinchart wrote: > On Thursday, 20 September 2018 23:16:47 EEST Sylwester Nawrocki wrote: > > On 09/20/2018 06:49 PM, Grant Grundler wrote: > > > On Thu, Sep 20, 2018 at 1:52 AM Tomasz Figa wrote: > > >> We have a problem here. The sensor supports on

Re: [PATCH] media: aptina-pll: allow approximating the requested pix_clock

2018-08-27 Thread Helmut Grohne
On Sat, Aug 25, 2018 at 01:32:47PM +0200, Sakari Ailus wrote: > On Fri, Aug 24, 2018 at 02:05:17PM +0200, Helmut Grohne wrote: > > Take for instance MT9M024. The data sheet > > (http://www.mouser.com/ds/2/308/MT9M024-D-606228.pdf) allows deducing > > the following limits: >

Re: V4L2 analogue gain contol

2018-08-27 Thread Helmut Grohne
Hi, On Sun, Aug 26, 2018 at 08:52:09AM +0200, Pavel Machek wrote: > > Can we give more structure to the analogue gain as exposed by V4L2? > > Ideally, I'd like to query a driver for the possible gain values if > > there are few (say < 256) and their factors (which are often given in > > data sheet

Re: [PATCH] media: aptina-pll: allow approximating the requested pix_clock

2018-08-24 Thread Helmut Grohne
Hi Laurent, Thank you for taking the time to reply to my patch and to my earlier questions. On Thu, Aug 23, 2018 at 01:12:15PM +0200, Laurent Pinchart wrote: > Could you please share numbers, ideally when run in kernel space ? Can you explain the benefits of profiling this inside the kernel rath

Re: [PATCH] media: aptina-pll: allow approximating the requested pix_clock

2018-08-24 Thread Helmut Grohne
Hi Sakari, Thank you for taking the time to look into the issue. On Thu, Aug 23, 2018 at 01:30:12PM +0200, Sakari Ailus wrote: > Knowing the formula, the limits as well as the external clock frequency, it > should be relatively straightforward to come up with a functional pixel > clock value. Was

[PATCH] media: aptina-pll: allow approximating the requested pix_clock

2018-08-23 Thread Helmut Grohne
executing a binary for all practical inputs. Signed-off-by: Helmut Grohne --- drivers/media/i2c/aptina-pll.c | 263 - drivers/media/i2c/mt9m032.c| 15 ++- 2 files changed, 165 insertions(+), 113 deletions(-) I tried using aptina_pll_calculate in a driver

V4L2 analogue gain contol

2018-08-22 Thread Helmut Grohne
Hi, I've been looking at various image sensor drivers to see how they expose gains, in particular analogue ones. What I found in 4.18 looks like a mess to me. In particular, my interest is about separation of analogue vs digital gain and an understanding of what effect a change in gain has on the

Re: why does aptina_pll_calculate insist on exact division?

2018-08-14 Thread Helmut Grohne
Hi, Thank you for the quick and helpful answer. On Tue, Aug 14, 2018 at 09:30:14AM +0200, Laurent Pinchart wrote: > How do you mean ? The only place where pix_clock_max is used is in the > following code: > > if (pll->pix_clock == 0 || pll->pix_clock > limits->pix_clock_max) { >

why does aptina_pll_calculate insist on exact division?

2018-08-13 Thread Helmut Grohne
Hi, I tried using the aptina_pll_calculate for a "new" imager and ran into problems. After filling out aptina_pll_limits from the data sheet, I was having a hard time finding a valid pix_clock. Most of the ones I tried are rejected by aptina_pll_calculate for various reasons. In particular, no pix

V4L2_CID_USER_MAX217X_BASE == V4L2_CID_USER_IMX_BASE

2018-06-22 Thread Helmut Grohne
Hi, I found it strange that the macros V4L2_CID_USER_MAX217X_BASE and V4L2_CID_USER_IMX_BASE have equal value even though each of them state that they reserved a range. Those reservations look conflicting to me. The macro V4L2_CID_USER_MAX217X_BASE came first, and V4L2_CID_USER_IMX_BASE was intro