linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
To: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	linux-media@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH 2/4] rcar-vin: Do not reset the crop and compose rectangles in s_fmt
Date: Tue, 16 Jul 2019 15:51:40 +0100	[thread overview]
Message-ID: <632ecb38-4e85-ad10-84c7-028b6419a717@ideasonboard.com> (raw)
In-Reply-To: <20190705045557.25463-3-niklas.soderlund+renesas@ragnatech.se>

Hi Niklas

On 05/07/2019 05:55, Niklas Söderlund wrote:
> The crop and compose rectangles where reset when s_fmt was called

s/where reset/are reset/
s/was called/is called/

> resulting in potentially valid rectangles where lost when updating the

s/where lost/being lost/

> format. Fix this by instead trying to map the rectangles inside the new

I don't think there's any 'trying' here - just doing.

  "Fix this by mapping the rectangles inside ..."

> format.
> 

It could be worth expanding on the consequences of this patch here:

"This may result in the crop and compose windows being modified from the
original setting to ensure that they are valid within the dimensions of
the new format."

But perhaps that's just too much repetition. It's just the point about
making it clear that the existing cropping and compose rectangles may be
different after this call that might be worth expressing somehow.


> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

Does this deserve a fixes tag? Or is this more of a solitary change.

With the wordings fixed, and expanded if you desire:

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

> ---
>  drivers/media/platform/rcar-vin/rcar-v4l2.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c
> index 2d94e700a473572c..d5e860ba6d9a2409 100644
> --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c
> +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c
> @@ -271,8 +271,8 @@ static int rvin_s_fmt_vid_cap(struct file *file, void *priv,
>  		return ret;
>  
>  	vin->format = f->fmt.pix;
> -	vin->crop = crop;
> -	vin->compose = compose;
> +	v4l2_rect_map_inside(&vin->crop, &crop);
> +	v4l2_rect_map_inside(&vin->compose, &compose);
>  	vin->src_rect = crop;
>  
>  	return 0;
> 


  parent reply	other threads:[~2019-07-16 14:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-05  4:55 [PATCH 0/4] rcar-vin: Add support for V4L2_FIELD_ALTERNATE Niklas Söderlund
2019-07-05  4:55 ` [PATCH 1/4] rcar-vin: Rename rectangle holding holding the video source information Niklas Söderlund
2019-07-05  9:11   ` Geert Uytterhoeven
2019-07-16 14:40   ` Kieran Bingham
2019-07-05  4:55 ` [PATCH 2/4] rcar-vin: Do not reset the crop and compose rectangles in s_fmt Niklas Söderlund
2019-07-05  8:36   ` Sergei Shtylyov
2019-07-16 14:51   ` Kieran Bingham [this message]
2019-07-05  4:55 ` [PATCH 3/4] rcar-vin: Add support for V4L2_FIELD_ALTERNATE Niklas Söderlund
2019-07-19 11:13   ` Kieran Bingham
2019-08-08  0:39     ` Niklas Söderlund
2019-07-05  4:55 ` [PATCH 4/4] rcar-vin: Clean up how format is set on subdevice Niklas Söderlund
2019-07-16 14:56   ` Kieran Bingham

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=632ecb38-4e85-ad10-84c7-028b6419a717@ideasonboard.com \
    --to=kieran.bingham+renesas@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --subject='Re: [PATCH 2/4] rcar-vin: Do not reset the crop and compose rectangles in s_fmt' \
    /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

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).