[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+V-a8uzznUvzGgZ5A4B8ASEDbmMCrQPSAcEjO7v45zmAkdGDQ@mail.gmail.com>
Date: Thu, 3 Sep 2020 15:53:18 +0100
From: "Lad, Prabhakar" <prabhakar.csengg@...il.com>
To: Niklas <niklas.soderlund@...natech.se>,
Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
Hans Verkuil <hverkuil-cisco@...all.nl>
Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Kieran Bingham <kieran.bingham+renesas@...asonboard.com>,
linux-media <linux-media@...r.kernel.org>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Biju Das <biju.das.jz@...renesas.com>
Subject: Re: [PATCH] media: rcar-vin: Update crop and compose settings for
every s_fmt call
On Wed, Aug 19, 2020 at 3:08 PM Hans Verkuil <hverkuil-cisco@...all.nl> wrote:
>
> On 03/08/2020 21:21, Niklas wrote:
> > Hi Lad, Hans,
> >
> > On 2020-08-03 19:11:32 +0100, Lad, Prabhakar wrote:
> >> Hi Hans,
> >>
> >> On Sat, Aug 1, 2020 at 10:04 AM Niklas <niklas.soderlund@...natech.se> wrote:
> >>>
> >>> Hi Lad,
> >>>
> >>> Thanks for your work.
> >>>
> >>> On 2020-07-31 10:29:05 +0100, Lad Prabhakar wrote:
> >>>> The crop and compose settings for VIN in non mc mode werent updated
> >>>> in s_fmt call this resulted in captured images being clipped.
> >>>>
> >>>> With the below sequence on the third capture where size is set to
> >>>> 640x480 resulted in clipped image of size 320x240.
> >>>>
> >>>> high(640x480) -> low (320x240) -> high (640x480)
> >>>>
> >>>> This patch makes sure the VIN crop and compose settings are updated.
> >>>
> >>> This is clearly an inconsistency in the VIN driver that should be fixed.
> >>> But I think the none-mc mode implements the correct behavior. That is
> >>> that S_FMT should not modify the crop/compose rectangles other then make
> >>> sure they don't go out of bounds. This is an area we tried to clarify in
> >>> the past but I'm still not sure what the correct answer to.
> >>>
> >> What should be the exact behaviour of the bridge driver for s_fmt
> >> call. Should the crop/compose settings be updated for every s_fmt
> >> callback or should they be only updated on s_selection callback.
> >> Currently the non-mc rcar-vin doesnt update the crop/compose setting
> >> in s_fmt callback due to which I see the above issue as mentioned.
> >
> > This is not entirely correct. It does update the crop and compose
> > rectangles on s_fmt, it makes sure they are not out-of-bounds for the
> > new format if it's accepted by s_fmt. See v4l2_rect_map_inside() calls
> > in the snippet bellow.
>
> For non-mc mode s_fmt must update any crop/compose rectangles to ensure that
> they are not out-of-bounds. But for mc mode the validation is done when you
> start streaming, so I think s_fmt won't make any changes in that mode.
>
Thank you Hans.
> Double-check that with Laurent, though...
>
Niklas/Laurent - How do we proceed on this ?
Cheers,
Prabhakar
Powered by blists - more mailing lists