Message ID | 1546103258-29025-2-git-send-email-akinobu.mita@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | media: bugfixes for mt9m111 driver | expand |
Hi Akinobu, On 18-12-30 02:07, Akinobu Mita wrote: > Since commit 98480d65c48c ("media: mt9m111: allow to setup pixclk > polarity"), the MT9M111_OUTFMT_INV_PIX_CLOCK bit in the output format > control 2 register has to be changed depending on the pclk-sample property > setting. > > Without this change, the MT9M111_OUTFMT_INV_PIX_CLOCK bit is unchanged. I don't know what you mean, it will get applied depending on the property. 8<------------------------------------------------------------------------ static int mt9m111_set_pixfmt(struct mt9m111 *mt9m111, u32 code) { ... /* receiver samples on falling edge, chip-hw default is rising */ if (mt9m111->pclk_sample == 0) mask_outfmt2 |= MT9M111_OUTFMT_INV_PIX_CLOCK; ... } 8<------------------------------------------------------------------------ Isn't this right? Can you cc me the other patches too, so I can keep track of it easier? Regards, Marco > > Fixes: 98480d65c48c ("media: mt9m111: allow to setup pixclk polarity") > Cc: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> > Cc: Michael Grzeschik <m.grzeschik@pengutronix.de> > Cc: Marco Felsch <m.felsch@pengutronix.de> > Cc: Sakari Ailus <sakari.ailus@linux.intel.com> > Cc: Mauro Carvalho Chehab <mchehab@kernel.org> > Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> > --- > drivers/media/i2c/mt9m111.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/media/i2c/mt9m111.c b/drivers/media/i2c/mt9m111.c > index d639b9b..f0e47fd 100644 > --- a/drivers/media/i2c/mt9m111.c > +++ b/drivers/media/i2c/mt9m111.c > @@ -542,6 +542,7 @@ static int mt9m111_set_pixfmt(struct mt9m111 *mt9m111, > { > struct i2c_client *client = v4l2_get_subdevdata(&mt9m111->subdev); > u16 data_outfmt2, mask_outfmt2 = MT9M111_OUTFMT_PROCESSED_BAYER | > + MT9M111_OUTFMT_INV_PIX_CLOCK | > MT9M111_OUTFMT_BYPASS_IFP | MT9M111_OUTFMT_RGB | > MT9M111_OUTFMT_RGB565 | MT9M111_OUTFMT_RGB555 | > MT9M111_OUTFMT_RGB444x | MT9M111_OUTFMT_RGBx444 | > -- > 2.7.4 > >
2018年12月31日(月) 19:30 Marco Felsch <m.felsch@pengutronix.de>: > > Hi Akinobu, > > On 18-12-30 02:07, Akinobu Mita wrote: > > Since commit 98480d65c48c ("media: mt9m111: allow to setup pixclk > > polarity"), the MT9M111_OUTFMT_INV_PIX_CLOCK bit in the output format > > control 2 register has to be changed depending on the pclk-sample property > > setting. > > > > Without this change, the MT9M111_OUTFMT_INV_PIX_CLOCK bit is unchanged. > > I don't know what you mean, it will get applied depending on the > property. > > 8<------------------------------------------------------------------------ > static int mt9m111_set_pixfmt(struct mt9m111 *mt9m111, > u32 code) > { > > ... > > /* receiver samples on falling edge, chip-hw default is rising */ > if (mt9m111->pclk_sample == 0) > mask_outfmt2 |= MT9M111_OUTFMT_INV_PIX_CLOCK; > > ... > } > > 8<------------------------------------------------------------------------ > > Isn't this right? You are right. I misread and thought the commit sets the MT9M111_OUTFMT_INV_PIX_CLOCK bit in 'data_outfmt2' instead of 'mask_outfmt2'. This patch will be dropped from this series in the next version. > Can you cc me the other patches too, so I can keep track of it easier? OK. I'll do from v2.
diff --git a/drivers/media/i2c/mt9m111.c b/drivers/media/i2c/mt9m111.c index d639b9b..f0e47fd 100644 --- a/drivers/media/i2c/mt9m111.c +++ b/drivers/media/i2c/mt9m111.c @@ -542,6 +542,7 @@ static int mt9m111_set_pixfmt(struct mt9m111 *mt9m111, { struct i2c_client *client = v4l2_get_subdevdata(&mt9m111->subdev); u16 data_outfmt2, mask_outfmt2 = MT9M111_OUTFMT_PROCESSED_BAYER | + MT9M111_OUTFMT_INV_PIX_CLOCK | MT9M111_OUTFMT_BYPASS_IFP | MT9M111_OUTFMT_RGB | MT9M111_OUTFMT_RGB565 | MT9M111_OUTFMT_RGB555 | MT9M111_OUTFMT_RGB444x | MT9M111_OUTFMT_RGBx444 |
Since commit 98480d65c48c ("media: mt9m111: allow to setup pixclk polarity"), the MT9M111_OUTFMT_INV_PIX_CLOCK bit in the output format control 2 register has to be changed depending on the pclk-sample property setting. Without this change, the MT9M111_OUTFMT_INV_PIX_CLOCK bit is unchanged. Fixes: 98480d65c48c ("media: mt9m111: allow to setup pixclk polarity") Cc: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Cc: Michael Grzeschik <m.grzeschik@pengutronix.de> Cc: Marco Felsch <m.felsch@pengutronix.de> Cc: Sakari Ailus <sakari.ailus@linux.intel.com> Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> --- drivers/media/i2c/mt9m111.c | 1 + 1 file changed, 1 insertion(+)