All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: i2c: imx219: Fix a bug in imx219_enum_frame_size
@ 2020-03-31 18:06 Dafna Hirschfeld
  2020-03-31 19:21 ` Helen Koike
  2020-04-03 10:21 ` Dave Stevenson
  0 siblings, 2 replies; 5+ messages in thread
From: Dafna Hirschfeld @ 2020-03-31 18:06 UTC (permalink / raw)
  To: linux-media, dafna.hirschfeld, helen.koike, ezequiel, hverkuil,
	kernel, dafna3, dave.stevenson, prabhakar.mahadev-lad.rj

When enumerating the frame sizes, the value sent to
imx219_get_format_code should be fse->code
(the code from the ioctl) and not imx219->fmt.code
which is the code set currently in the driver.

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
---
 drivers/media/i2c/imx219.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
index b1f30debe449..df2a6ed7c8ac 100644
--- a/drivers/media/i2c/imx219.c
+++ b/drivers/media/i2c/imx219.c
@@ -781,7 +781,7 @@ static int imx219_enum_frame_size(struct v4l2_subdev *sd,
 	if (fse->index >= ARRAY_SIZE(supported_modes))
 		return -EINVAL;
 
-	if (fse->code != imx219_get_format_code(imx219, imx219->fmt.code))
+	if (fse->code != imx219_get_format_code(imx219, fse->code))
 		return -EINVAL;
 
 	fse->min_width = supported_modes[fse->index].width;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] media: i2c: imx219: Fix a bug in imx219_enum_frame_size
  2020-03-31 18:06 [PATCH] media: i2c: imx219: Fix a bug in imx219_enum_frame_size Dafna Hirschfeld
@ 2020-03-31 19:21 ` Helen Koike
  2020-04-03 10:21 ` Dave Stevenson
  1 sibling, 0 replies; 5+ messages in thread
From: Helen Koike @ 2020-03-31 19:21 UTC (permalink / raw)
  To: Dafna Hirschfeld, linux-media, ezequiel, hverkuil, kernel,
	dafna3, dave.stevenson, prabhakar.mahadev-lad.rj



On 3/31/20 3:06 PM, Dafna Hirschfeld wrote:
> When enumerating the frame sizes, the value sent to
> imx219_get_format_code should be fse->code
> (the code from the ioctl) and not imx219->fmt.code
> which is the code set currently in the driver.
> 
> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>

Reviewed-by: Helen Koike <helen.koike@collabora.com>

> ---
>  drivers/media/i2c/imx219.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
> index b1f30debe449..df2a6ed7c8ac 100644
> --- a/drivers/media/i2c/imx219.c
> +++ b/drivers/media/i2c/imx219.c
> @@ -781,7 +781,7 @@ static int imx219_enum_frame_size(struct v4l2_subdev *sd,
>  	if (fse->index >= ARRAY_SIZE(supported_modes))
>  		return -EINVAL;
>  
> -	if (fse->code != imx219_get_format_code(imx219, imx219->fmt.code))
> +	if (fse->code != imx219_get_format_code(imx219, fse->code))
>  		return -EINVAL;
>  
>  	fse->min_width = supported_modes[fse->index].width;
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] media: i2c: imx219: Fix a bug in imx219_enum_frame_size
  2020-03-31 18:06 [PATCH] media: i2c: imx219: Fix a bug in imx219_enum_frame_size Dafna Hirschfeld
  2020-03-31 19:21 ` Helen Koike
@ 2020-04-03 10:21 ` Dave Stevenson
  2020-04-03 10:28   ` Lad, Prabhakar
  1 sibling, 1 reply; 5+ messages in thread
From: Dave Stevenson @ 2020-04-03 10:21 UTC (permalink / raw)
  To: Dafna Hirschfeld
  Cc: Linux Media Mailing List, helen.koike, Ezequiel Garcia,
	Hans Verkuil, kernel, dafna3, Lad Prabhakar

Hi Dafna

Thanks for the patch.

On Tue, 31 Mar 2020 at 19:06, Dafna Hirschfeld
<dafna.hirschfeld@collabora.com> wrote:
>
> When enumerating the frame sizes, the value sent to
> imx219_get_format_code should be fse->code
> (the code from the ioctl) and not imx219->fmt.code
> which is the code set currently in the driver.
>
> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>

Agreed that v4l2-ctl --list-formats-ext doesn't list the frame sizes
for the mode that isn't selected without this patch. With this patch
you get the full list.

Does it warrant a "Fixes: 22da1d56e ("media: i2c: imx219: Add support
for RAW8 bit bayer format")"? I'd probably say yes.

Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

> ---
>  drivers/media/i2c/imx219.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
> index b1f30debe449..df2a6ed7c8ac 100644
> --- a/drivers/media/i2c/imx219.c
> +++ b/drivers/media/i2c/imx219.c
> @@ -781,7 +781,7 @@ static int imx219_enum_frame_size(struct v4l2_subdev *sd,
>         if (fse->index >= ARRAY_SIZE(supported_modes))
>                 return -EINVAL;
>
> -       if (fse->code != imx219_get_format_code(imx219, imx219->fmt.code))
> +       if (fse->code != imx219_get_format_code(imx219, fse->code))
>                 return -EINVAL;
>
>         fse->min_width = supported_modes[fse->index].width;
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] media: i2c: imx219: Fix a bug in imx219_enum_frame_size
  2020-04-03 10:21 ` Dave Stevenson
@ 2020-04-03 10:28   ` Lad, Prabhakar
  2020-04-30 23:27     ` Sakari Ailus
  0 siblings, 1 reply; 5+ messages in thread
From: Lad, Prabhakar @ 2020-04-03 10:28 UTC (permalink / raw)
  To: Dave Stevenson
  Cc: Dafna Hirschfeld, Linux Media Mailing List, helen.koike,
	Ezequiel Garcia, Hans Verkuil, kernel, dafna3, Lad Prabhakar

On Fri, Apr 3, 2020 at 11:23 AM Dave Stevenson
<dave.stevenson@raspberrypi.com> wrote:
>
> Hi Dafna
>
> Thanks for the patch.
>
> On Tue, 31 Mar 2020 at 19:06, Dafna Hirschfeld
> <dafna.hirschfeld@collabora.com> wrote:
> >
> > When enumerating the frame sizes, the value sent to
> > imx219_get_format_code should be fse->code
> > (the code from the ioctl) and not imx219->fmt.code
> > which is the code set currently in the driver.
> >
> > Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

> Agreed that v4l2-ctl --list-formats-ext doesn't list the frame sizes
> for the mode that isn't selected without this patch. With this patch
> you get the full list.
>
> Does it warrant a "Fixes: 22da1d56e ("media: i2c: imx219: Add support
> for RAW8 bit bayer format")"? I'd probably say yes.
>
+1

Cheers,
--Prabhakar

> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
>
> > ---
> >  drivers/media/i2c/imx219.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
> > index b1f30debe449..df2a6ed7c8ac 100644
> > --- a/drivers/media/i2c/imx219.c
> > +++ b/drivers/media/i2c/imx219.c
> > @@ -781,7 +781,7 @@ static int imx219_enum_frame_size(struct v4l2_subdev *sd,
> >         if (fse->index >= ARRAY_SIZE(supported_modes))
> >                 return -EINVAL;
> >
> > -       if (fse->code != imx219_get_format_code(imx219, imx219->fmt.code))
> > +       if (fse->code != imx219_get_format_code(imx219, fse->code))
> >                 return -EINVAL;
> >
> >         fse->min_width = supported_modes[fse->index].width;
> > --
> > 2.17.1
> >

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] media: i2c: imx219: Fix a bug in imx219_enum_frame_size
  2020-04-03 10:28   ` Lad, Prabhakar
@ 2020-04-30 23:27     ` Sakari Ailus
  0 siblings, 0 replies; 5+ messages in thread
From: Sakari Ailus @ 2020-04-30 23:27 UTC (permalink / raw)
  To: Lad, Prabhakar
  Cc: Dave Stevenson, Dafna Hirschfeld, Linux Media Mailing List,
	helen.koike, Ezequiel Garcia, Hans Verkuil, kernel, dafna3,
	Lad Prabhakar

On Fri, Apr 03, 2020 at 11:28:52AM +0100, Lad, Prabhakar wrote:
> On Fri, Apr 3, 2020 at 11:23 AM Dave Stevenson
> <dave.stevenson@raspberrypi.com> wrote:
> >
> > Hi Dafna
> >
> > Thanks for the patch.
> >
> > On Tue, 31 Mar 2020 at 19:06, Dafna Hirschfeld
> > <dafna.hirschfeld@collabora.com> wrote:
> > >
> > > When enumerating the frame sizes, the value sent to
> > > imx219_get_format_code should be fse->code
> > > (the code from the ioctl) and not imx219->fmt.code
> > > which is the code set currently in the driver.
> > >
> > > Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
> >
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> 
> > Agreed that v4l2-ctl --list-formats-ext doesn't list the frame sizes
> > for the mode that isn't selected without this patch. With this patch
> > you get the full list.
> >
> > Does it warrant a "Fixes: 22da1d56e ("media: i2c: imx219: Add support
> > for RAW8 bit bayer format")"? I'd probably say yes.
> >
> +1

Thanks, all!

I've added:

Fixes: 22da1d56e982 ("media: i2c: imx219: Add support for RAW8 bit bayer format")

-- 
Sakari Ailus

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-30 23:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31 18:06 [PATCH] media: i2c: imx219: Fix a bug in imx219_enum_frame_size Dafna Hirschfeld
2020-03-31 19:21 ` Helen Koike
2020-04-03 10:21 ` Dave Stevenson
2020-04-03 10:28   ` Lad, Prabhakar
2020-04-30 23:27     ` Sakari Ailus

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.