On Tue, Feb 05, 2019 at 09:50:47PM +0800, Chen-Yu Tsai wrote: > On Tue, Feb 5, 2019 at 4:55 PM Sakari Ailus > <sakari.ailus@xxxxxxxxxxxxxxx> wrote: > > > > Hi Chen-Yu, > > > > On Fri, Jan 18, 2019 at 04:52:06PM +0800, Chen-Yu Tsai wrote: > > > The register value lists for all the supported resolution settings all > > > include a register address/value pair for setting the JPEG compression > > > mode. With the exception of 1080p (which sets mode 2), all resolutions > > > use mode 3. > > > > > > The only difference between mode 2 and mode 3 is that mode 2 may have > > > padding data on the last line, while mode 3 does not add padding data. > > > > > > As these register values were from dumps of running systems, and the > > > difference between the modes is quite small, using mode 3 for all > > > configurations should be OK. > > > > > > Signed-off-by: Chen-Yu Tsai <wens@xxxxxxxx> > > > --- > > > drivers/media/i2c/ov5640.c | 34 +++++++++++++++++++++++----------- > > > 1 file changed, 23 insertions(+), 11 deletions(-) > > > > > > diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c > > > index 1c1dc401c678..3d2c5de73283 100644 > > > --- a/drivers/media/i2c/ov5640.c > > > +++ b/drivers/media/i2c/ov5640.c > > > @@ -85,6 +85,7 @@ > > > #define OV5640_REG_FORMAT_CONTROL00 0x4300 > > > #define OV5640_REG_VFIFO_HSIZE 0x4602 > > > #define OV5640_REG_VFIFO_VSIZE 0x4604 > > > +#define OV5640_REG_JPG_MODE_SELECT 0x4713 > > > > How has this been tested? > > > > The register is referred to as "OV5640_REG_JPEG_MODE_SELECT" below. I can > > fix it if it's just a typo, but please confirm. > > It's a typo. The datasheet uses the abbreviated form, JPG_MODE_SELECT, > but all the bitfield names are the full JPEG form. I believe I missed > the other occurrence while fixing up the names to match the datasheet. > I appologize for not doing a final compile test. Thanks, and no problem. -- Sakari Ailus sakari.ailus@xxxxxxxxxxxxxxx