All of lore.kernel.org
 help / color / mirror / Atom feed
From: Janusz Krzysztofik <jmkrzyszt@gmail.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	Janusz Krzysztofik <jmkrzyszt@gmail.com>
Subject: Re: [RFC PATCH 4/5] media: ov6650: Fix frame scaling not reset on crop
Date: Fri, 31 May 2019 19:56:33 +0200	[thread overview]
Message-ID: <1933971.yMpNBnsSgY@z50> (raw)
In-Reply-To: <20190531114258.6bvsqzlexqnelu5u@valkosipuli.retiisi.org.uk>

Hi Sakari,

On Friday, May 31, 2019 1:42:58 PM CEST Sakari Ailus wrote:
> Hi Janusz,
> 
> On Sun, May 26, 2019 at 10:47:57PM +0200, Janusz Krzysztofik wrote:
> > According to V4L2 subdevice interface specification, frame scaling
> > factors should be reset to default values on modification of input frame
> > format.  Assuming that requirement also applies in case of crop
> > rectangle modification unless V4L2_SEL_FLAG_KEEP_CONFIG is requested,
> > the driver now does not respect it.
> > 
> > The KEEP_CONFIG case is already implemented, fix the other path.
> > 
> > Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
> > ---
> >  drivers/media/i2c/ov6650.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git a/drivers/media/i2c/ov6650.c b/drivers/media/i2c/ov6650.c
> > index 47590cd51190..cc70d8952999 100644
> > --- a/drivers/media/i2c/ov6650.c
> > +++ b/drivers/media/i2c/ov6650.c
> > @@ -472,6 +472,8 @@ static int ov6650_get_selection(struct v4l2_subdev 
*sd,
> >  	}
> >  }
> >  
> > +static int ov6650_s_fmt(struct v4l2_subdev *sd, u32 code, bool 
half_scale);
> > +
> 
> Would it be possible to rearrange the functions in the file so you wouldn't
> need extra prototypes? Preferrably that'd be a new patch.

Sure. I've intentionally done it like that for better readability of the 
patches, but I have a task in my queue for rearrangement of functions order as 
soon as other modifications are in place.

> >  static int ov6650_set_selection(struct v4l2_subdev *sd,
> >  		struct v4l2_subdev_pad_config *cfg,
> >  		struct v4l2_subdev_selection *sel)
> > @@ -515,7 +517,13 @@ static int ov6650_set_selection(struct v4l2_subdev 
*sd,
> >  	}
> >  	if (!ret)
> >  		priv->rect.height = sel->r.height;
> > +	else
> > +		return ret;
> 
> if (ret)
> 	return ret;

OK

Perhaps you will have more comments on other patches so I'll wait a bit and 
then resubmit the series as v2.

Thanks,
Janusz

> ...
> 
> >  
> > +	if (priv->half_scale) {
> > +		/* turn off half scaling, preserve media bus format */
> > +		ret = ov6650_s_fmt(sd, priv->code, false);
> > +	}
> >  	return ret;
> >  }
> >  
> 
> 





  reply	other threads:[~2019-05-31 17:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-26 20:47 [RFC PATCH 0/5] media: ov6650: V4L2 subdev compliance fixes Janusz Krzysztofik
2019-05-26 20:47 ` [RFC PATCH 1/5] media: ov6650: Fix V4L2_SEL_FLAG_KEEP_CONFIG handling Janusz Krzysztofik
2019-05-26 20:47 ` [RFC PATCH 2/5] media: ov6650: Refactor ov6650_s_fmt() helper Janusz Krzysztofik
2019-05-26 20:47 ` [RFC PATCH 3/5] media: ov6650: Fix active crop rectangle affected by .set_fmt() Janusz Krzysztofik
2019-05-26 20:47 ` [RFC PATCH 4/5] media: ov6650: Fix frame scaling not reset on crop Janusz Krzysztofik
2019-05-31 11:42   ` Sakari Ailus
2019-05-31 17:56     ` Janusz Krzysztofik [this message]
2019-06-01 22:37       ` Sakari Ailus
2019-06-02  9:58         ` Janusz Krzysztofik
2019-06-02 20:36           ` Sakari Ailus
2019-05-26 20:47 ` [RFC PATCH 5/5] media: ov6650: Add .init_cfg() pad operation callback Janusz Krzysztofik
2019-06-01 22:29   ` 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=1933971.yMpNBnsSgY@z50 \
    --to=jmkrzyszt@gmail.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@iki.fi \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.