linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: Enric Balletbo i Serra <eballetbo@gmail.com>
Cc: linux-media@vger.kernel.org, mchehab@infradead.org,
	hans.verkuil@cisco.com, laurent.pinchart@ideasonboard.com,
	sakari.ailus@maxwell.research.nokia.com, s.nawrocki@samsung.com,
	Enric Balletbo i Serra <eballetbo@iseebcn.com>
Subject: Re: [PATCH] [media] v4l: Add mt9v034 sensor driver
Date: Thu, 29 Nov 2012 21:51:52 +0100	[thread overview]
Message-ID: <50B7CAE8.7020104@gmail.com> (raw)
In-Reply-To: <1349433287-28628-1-git-send-email-eballetbo@gmail.com>

Hi Enric,

In general this driver looks good to me. However it seems you're
using it together with the omap3isp driver. Likely Laurent and Sakari
may have some comments on that.

Just one thing I'm unsure about, please see below.

On 10/05/2012 12:34 PM, Enric Balletbo i Serra wrote:
> From: Enric Balletbo i Serra<eballetbo@iseebcn.com>
>
> The MT9V034 is a parallel wide VGA sensor from Aptina (formerly Micron)
> controlled through I2C.
>
> The driver creates a V4L2 subdevice. It currently supports binning and
> cropping, and the gain, auto gain, exposure, auto exposure and test
> pattern controls.
>
> The following patch is based on the MT9V032 driver from Laurent Pinchart
> and was tested on IGEP tech based boards with custom expansion board with
> MT9V034 sensor.
>
> Signed-off-by: Enric Balletbo i Serra<eballetbo@iseebcn.com>
> ---
>   drivers/media/i2c/Kconfig   |   10 +
>   drivers/media/i2c/Makefile  |    1 +
>   drivers/media/i2c/mt9v034.c |  834 +++++++++++++++++++++++++++++++++++++++++++
>   include/media/mt9v034.h     |   15 +
>   4 files changed, 860 insertions(+), 0 deletions(-)
>   create mode 100644 drivers/media/i2c/mt9v034.c
>   create mode 100644 include/media/mt9v034.h
...
> +static int mt9v034_enum_frame_size(struct v4l2_subdev *subdev,
> +				   struct v4l2_subdev_fh *fh,
> +				   struct v4l2_subdev_frame_size_enum *fse)
> +{
> +	if (fse->index>= 8 || fse->code != V4L2_MBUS_FMT_SBGGR10_1X10)
> +		return -EINVAL;
> +
> +	fse->min_width = MT9V034_WINDOW_WIDTH_DEF / fse->index;
> +	fse->max_width = fse->min_width;
> +	fse->min_height = MT9V034_WINDOW_HEIGHT_DEF / fse->index;
> +	fse->max_height = fse->min_height;
> +
> +	return 0;
> +}

Have you actually tested VIDIOC_SUBDEV_ENUM_FRAME_SIZE ioctl with the index
field set to 0 ? Shouldn't (fse->index + 1) be used as a denominator 
instead ?

--

Regards,
Sylwester

  parent reply	other threads:[~2012-11-29 20:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-05 10:34 [PATCH] [media] v4l: Add mt9v034 sensor driver Enric Balletbo i Serra
2012-11-29 17:54 ` Enric Balletbo Serra
2012-11-29 20:51 ` Sylwester Nawrocki [this message]
2012-11-30  5:46 ` Prabhakar Lad
2012-11-30 13:10 ` Alexey Klimov
2012-12-02 21:45 ` Sakari Ailus
2012-12-05 11:43   ` Enric Balletbo Serra

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=50B7CAE8.7020104@gmail.com \
    --to=sylvester.nawrocki@gmail.com \
    --cc=eballetbo@gmail.com \
    --cc=eballetbo@iseebcn.com \
    --cc=hans.verkuil@cisco.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=s.nawrocki@samsung.com \
    --cc=sakari.ailus@maxwell.research.nokia.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).