mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Benoit Parrot <bparrot@ti.com>
To: Jacopo Mondi <jacopo@jmondi.org>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	<linux-media@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [Patch v2 3/3] media: ov5640: Make 2592x1944 mode only available at 15 fps
Date: Thu, 3 Oct 2019 07:09:02 -0500	[thread overview]
Message-ID: <20191003120902.wd3w2qmiry5bpa4h@ti.com> (raw)
In-Reply-To: <20191003073155.4sl3jkmobnm53tm2@uno.localdomain>

Jacopo Mondi <jacopo@jmondi.org> wrote on Thu [2019-Oct-03 09:31:55 +0200]:
> Hi Benoit,
> 
> On Wed, Oct 02, 2019 at 08:51:34AM -0500, Benoit Parrot wrote:
> > The sensor data sheet clearly state that 2592x1944 only works at 15 fps
> > make sure we don't try to miss configure the pll out of acceptable
> > range.
> 
> The datasheet clearly indicates that 15 fps is the maximum achievable
> rate with that resolution, so I guess preventing it from being set
> to anything faster than that it's acceptable.
> >
> > Signed-off-by: Benoit Parrot <bparrot@ti.com>
> > ---
> >  drivers/media/i2c/ov5640.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
> > index 103a4e8f88e1..d5b0be2c7a0a 100644
> > --- a/drivers/media/i2c/ov5640.c
> > +++ b/drivers/media/i2c/ov5640.c
> > @@ -1613,6 +1613,11 @@ ov5640_find_mode(struct ov5640_dev *sensor, enum ov5640_frame_rate fr,
> >  	    !(mode->hact == 640 && mode->vact == 480))
> >  		return NULL;
> >
> > +	/* 2592x1944 only works at 15fps */
> > +	if (fr != OV5640_15_FPS &&
> 
> As long as 15 fps is the lower framerate declared in
> ov5640_framerates[] this is ok, but I would make this condition a
> check for "fr  > OV5640_15_FPS" so that it's safe for future
> extensions.
> 
> (And I would check for the resolution first then FPS, so you check
> the most unlikely condition first, but that's really a minor
> optimization).

Ah, very good I'll change that.

Benoit

> 
> With the above small details addressed
> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
> 
> Thanks
>    j
> 
> > +	    (mode->hact == 2592 && mode->vact == 1944))
> > +		return NULL;
> > +
> >  	return mode;
> >  }
> >
> > --
> > 2.17.1
> >



      reply	other threads:[~2019-10-03 12:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02 13:51 [Patch v2 0/3] media: ov5640: updates Benoit Parrot
2019-10-02 13:51 ` [Patch v2 1/3] media: ov5640: add PIXEL_RATE control Benoit Parrot
2019-10-03  7:17   ` Jacopo Mondi
2019-10-03  7:22     ` Sakari Ailus
2019-10-03 12:07       ` Benoit Parrot
2019-10-03 14:32         ` Sakari Ailus
2019-10-03 11:59     ` Benoit Parrot
2019-10-02 13:51 ` [Patch v2 2/3] media: ov5640: Fix 1920x1080 mode to remove extra enable/disable Benoit Parrot
2019-10-03  7:26   ` Jacopo Mondi
2019-10-02 13:51 ` [Patch v2 3/3] media: ov5640: Make 2592x1944 mode only available at 15 fps Benoit Parrot
2019-10-03  7:31   ` Jacopo Mondi
2019-10-03 12:09     ` Benoit Parrot [this message]

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=20191003120902.wd3w2qmiry5bpa4h@ti.com \
    --to=bparrot@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil@xs4all.nl \
    --cc=jacopo@jmondi.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.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

all inboxes | Powered by JetHome®