Linux-Media Archive on lore.kernel.org
 help / color / Atom feed
From: Sakari Ailus <sakari.ailus@iki.fi>
To: Dongchun Zhu <dongchun.zhu@mediatek.com>
Cc: mchehab@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com,
	matthias.bgg@gmail.com, bingbu.cao@intel.com,
	srv_heupstream@mediatek.com, linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, sj.huang@mediatek.com,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	louis.kuo@mediatek.com, menghui.lin@mediatek.com,
	shengnan.wang@mediatek.com, tfiga@google.com
Subject: Re: [PATCH 1/3] media: i2c: ov02a10: Add ov02a10 camera sensor driver
Date: Wed, 26 Jun 2019 12:58:26 +0300
Message-ID: <20190626095826.3w4lj4vmfnfgxv53@valkosipuli.retiisi.org.uk> (raw)
In-Reply-To: <1560262189.9392.42.camel@mhfsdcap03>

Hi Dongchun,

On Tue, Jun 11, 2019 at 10:09:49PM +0800, Dongchun Zhu wrote:
...
> > > +		return -EINVAL;
> > > +
> > > +	fse->code = MEDIA_BUS_FMT_SBGGR10_1X10;
> > 
> > Instead you need check the caller set this. The frame sizes could be
> > different for different media bus formats.
> > 
> 
> For one sensor mode, there should be one Bayer sequence.
> In next version, this para could be changed when mirror/flip enabled.
> 

You should change the check based on the configuration.

...

> > > +#ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
> > > +static int ov02a10_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
> > > +{
> > > +	struct ov02a10 *ov02a10 = to_ov02a10(sd);
> > > +	struct v4l2_mbus_framefmt *try_fmt;
> > > +
> > > +	mutex_lock(&ov02a10->mutex);
> > > +
> > > +	try_fmt = v4l2_subdev_get_try_format(sd, fh->pad, 0);
> > > +	/* Initialize try_fmt */
> > > +	ov02a10_fill_fmt(&supported_modes[0], try_fmt);
> > 
> > If this is all you need, you should implement the init_cfg pad op.
> > 
> 
> It seems that other sensors (for instance, OV8856, OV13858 etc.)
> initialize try_fmt in the same way.

Yes; these drivers should be changed as well.

...

> > > +					  ov02a10_test_pattern_val[ctrl->val]);
> > > +		break;
> > > +	case V4L2_CID_HFLIP:
> > > +		if (ov02a10->streaming)
> > > +			return -EBUSY;
> > 
> > You could instead use v4l2_ctrl_grab() (or the unlocked variant) when
> > streaming starts. Same below.
> > 
> 
> It seems that other sensors (for instance, OV2680 etc.)
> call V4L2_CID_HFLIP/V4L2_CID_VFLIP in the same way.

That's ok.

-- 
Regards,

Sakari Ailus

  reply index

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23 10:22 [PATCH 0/3] media: suppport ov02a10 " dongchun.zhu
2019-05-23 10:22 ` [PATCH 1/3] media: i2c: ov02a10: Add ov02a10 camera " dongchun.zhu
2019-05-26  8:53   ` Nicolas Boichat
2019-06-13  2:44     ` Dongchun Zhu
2019-05-28  6:20   ` Bingbu Cao
2019-06-13  3:22     ` Dongchun Zhu
2019-05-31 17:03   ` Sakari Ailus
2019-06-11 14:09     ` Dongchun Zhu
2019-06-26  9:58       ` Sakari Ailus [this message]
2019-05-23 10:22 ` [PATCH 2/3] media: i2c: ov02a10: Add CONFIG_VIDEO_OV02A10 dongchun.zhu
2019-05-23 10:22 ` [PATCH 3/3] media: dt-bindings: media: i2c: Add bindings for ov02a10 dongchun.zhu
2019-05-31 16:16   ` Sakari Ailus
2019-06-13  3:30     ` Dongchun Zhu
2019-06-14 16:56     ` Rob Herring

Reply instructions:

You may reply publically 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=20190626095826.3w4lj4vmfnfgxv53@valkosipuli.retiisi.org.uk \
    --to=sakari.ailus@iki.fi \
    --cc=bingbu.cao@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dongchun.zhu@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=louis.kuo@mediatek.com \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=menghui.lin@mediatek.com \
    --cc=robh+dt@kernel.org \
    --cc=shengnan.wang@mediatek.com \
    --cc=sj.huang@mediatek.com \
    --cc=srv_heupstream@mediatek.com \
    --cc=tfiga@google.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

Linux-Media Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-media/0 linux-media/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-media linux-media/ https://lore.kernel.org/linux-media \
		linux-media@vger.kernel.org linux-media@archiver.kernel.org
	public-inbox-index linux-media

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-media


AGPL code for this site: git clone https://public-inbox.org/ public-inbox