diff mbox

[MEDIA] i.MX6 CSI: Fix MIPI camera operation in RAW/Bayer mode

Message ID m3fuail25k.fsf@t19.piap.pl (mailing list archive)
State New, archived
Headers show

Commit Message

Krzysztof Hałasa Oct. 17, 2017, 6:27 a.m. UTC
Without this fix, in 8-bit Y/Bayer mode, every other 8-byte group
of pixels is lost.
Not sure about possible side effects, though.

Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>

Comments

Fabio Estevam Oct. 17, 2017, 11:33 a.m. UTC | #1
Hi Krzysztof,

On Tue, Oct 17, 2017 at 4:27 AM, Krzysztof Hałasa <khalasa@piap.pl> wrote:
> Without this fix, in 8-bit Y/Bayer mode, every other 8-byte group
> of pixels is lost.
> Not sure about possible side effects, though.
>
> Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
>
> --- a/drivers/staging/media/imx/imx-media-csi.c
> +++ b/drivers/staging/media/imx/imx-media-csi.c
> @@ -340,7 +340,7 @@ static int csi_idmac_setup_channel(struct csi_priv *priv)
>         case V4L2_PIX_FMT_SGBRG8:
>         case V4L2_PIX_FMT_SGRBG8:
>         case V4L2_PIX_FMT_SRGGB8:
> -               burst_size = 8;
> +               burst_size = 16;
>                 passthrough = true;
>                 passthrough_bits = 8;
>                 break;

Russell has sent the same fix and Philipp made a comment about the
possibility of using 32-byte or 64-byte bursts:
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2017-October/111960.html
Krzysztof Hałasa Oct. 17, 2017, 1:26 p.m. UTC | #2
Fabio Estevam <festevam@gmail.com> writes:

>> --- a/drivers/staging/media/imx/imx-media-csi.c
>> +++ b/drivers/staging/media/imx/imx-media-csi.c
>> @@ -340,7 +340,7 @@ static int csi_idmac_setup_channel(struct csi_priv *priv)
>>         case V4L2_PIX_FMT_SGBRG8:
>>         case V4L2_PIX_FMT_SGRBG8:
>>         case V4L2_PIX_FMT_SRGGB8:
>> -               burst_size = 8;
>> +               burst_size = 16;
>>                 passthrough = true;
>>                 passthrough_bits = 8;
>>                 break;
>
> Russell has sent the same fix and Philipp made a comment about the
> possibility of using 32-byte or 64-byte bursts:
> http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2017-October/111960.html

Great.

Sometimes I wonder how many people are working on exactly the same
stuff.
Russell King (Oracle) Oct. 17, 2017, 1:53 p.m. UTC | #3
On Tue, Oct 17, 2017 at 03:26:19PM +0200, Krzysztof Hałasa wrote:
> Fabio Estevam <festevam@gmail.com> writes:
> 
> >> --- a/drivers/staging/media/imx/imx-media-csi.c
> >> +++ b/drivers/staging/media/imx/imx-media-csi.c
> >> @@ -340,7 +340,7 @@ static int csi_idmac_setup_channel(struct csi_priv *priv)
> >>         case V4L2_PIX_FMT_SGBRG8:
> >>         case V4L2_PIX_FMT_SGRBG8:
> >>         case V4L2_PIX_FMT_SRGGB8:
> >> -               burst_size = 8;
> >> +               burst_size = 16;
> >>                 passthrough = true;
> >>                 passthrough_bits = 8;
> >>                 break;
> >
> > Russell has sent the same fix and Philipp made a comment about the
> > possibility of using 32-byte or 64-byte bursts:
> > http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2017-October/111960.html
> 
> Great.
> 
> Sometimes I wonder how many people are working on exactly the same
> stuff.

I do wish the patch was merged (which fixes a real problem) rather than
hanging around for optimisation questions.  We can always increase it
in the future if it's deemed that a larger burst size is beneficial.
Fabio Estevam Oct. 17, 2017, 2:27 p.m. UTC | #4
On Tue, Oct 17, 2017 at 11:53 AM, Russell King - ARM Linux
<linux@armlinux.org.uk> wrote:

> I do wish the patch was merged (which fixes a real problem) rather than
> hanging around for optimisation questions.  We can always increase it
> in the future if it's deemed that a larger burst size is beneficial.

Agreed.
Philipp Zabel Oct. 17, 2017, 3:24 p.m. UTC | #5
On Tue, 2017-10-17 at 14:53 +0100, Russell King - ARM Linux wrote:
> On Tue, Oct 17, 2017 at 03:26:19PM +0200, Krzysztof Hałasa wrote:
> > Fabio Estevam <festevam@gmail.com> writes:
> > 
> > > > --- a/drivers/staging/media/imx/imx-media-csi.c
> > > > +++ b/drivers/staging/media/imx/imx-media-csi.c
> > > > @@ -340,7 +340,7 @@ static int csi_idmac_setup_channel(struct csi_priv *priv)
> > > >         case V4L2_PIX_FMT_SGBRG8:
> > > >         case V4L2_PIX_FMT_SGRBG8:
> > > >         case V4L2_PIX_FMT_SRGGB8:
> > > > -               burst_size = 8;
> > > > +               burst_size = 16;
> > > >                 passthrough = true;
> > > >                 passthrough_bits = 8;
> > > >                 break;
> > > 
> > > Russell has sent the same fix and Philipp made a comment about the
> > > possibility of using 32-byte or 64-byte bursts:
> > > http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2017-October/111960.html
> > 
> > Great.
> > 
> > Sometimes I wonder how many people are working on exactly the same
> > stuff.
> 
> I do wish the patch was merged (which fixes a real problem) rather than
> hanging around for optimisation questions.  We can always increase it
> in the future if it's deemed that a larger burst size is beneficial.

I am sorry, that patch should have been part of last week's pull
request. I'll send another one for -rc6.

regards
Philipp
diff mbox

Patch

--- a/drivers/staging/media/imx/imx-media-csi.c
+++ b/drivers/staging/media/imx/imx-media-csi.c
@@ -340,7 +340,7 @@  static int csi_idmac_setup_channel(struct csi_priv *priv)
 	case V4L2_PIX_FMT_SGBRG8:
 	case V4L2_PIX_FMT_SGRBG8:
 	case V4L2_PIX_FMT_SRGGB8:
-		burst_size = 8;
+		burst_size = 16;
 		passthrough = true;
 		passthrough_bits = 8;
 		break;