media: ov5640: add support of 160x120 resolution
PATCH 1/1 media: ov5640: add support of 160x120 resolution
Add support of 160x120 resolution.
--- drivers/media/i2c/ov5640.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-)
drivers/media/i2c/ov5640.c +24 -1
@@ -98,7 +98,8 @@#define OV5640_REG_AVG_READOUT 0x56a1enum ov5640_mode_id { -OV5640_MODE_QCIF_176_144 =0 , +OV5640_MODE_QQVGA_160_120 =0 , +OV5640_MODE_QCIF_176_144 ,OV5640_MODE_QVGA_320_240 ,OV5640_MODE_VGA_640_480 ,OV5640_MODE_NTSC_720_480 ,
@@ -416,6 +417,24 @@ static const struct reg_value ov5640_setting_QVGA_320_240[] = { {0x3824, 0x02, 0, 0}, {0x5001, 0xa3, 0, 0}, }; +static const struct reg_value ov5640_setting_QQVGA_160_120[] = { + {0x3c07 ,0x08 ,0 ,0 }, + {0x3c09 ,0x1c ,0 ,0 }, {0x3c0a ,0x9c ,0 ,0 }, {0x3c0b ,0x40 ,0 ,0 }, + {0x3814 ,0x31 ,0 ,0 }, + {0x3815 ,0x31 ,0 ,0 }, {0x3800 ,0x00 ,0 ,0 }, {0x3801 ,0x00 ,0 ,0 }, + {0x3802 ,0x00 ,0 ,0 }, {0x3803 ,0x04 ,0 ,0 }, {0x3804 ,0x0a ,0 ,0 }, + {0x3805 ,0x3f ,0 ,0 }, {0x3806 ,0x07 ,0 ,0 }, {0x3807 ,0x9b ,0 ,0 }, + {0x3810 ,0x00 ,0 ,0 }, + {0x3811 ,0x10 ,0 ,0 }, {0x3812 ,0x00 ,0 ,0 }, {0x3813 ,0x06 ,0 ,0 }, + {0x3618 ,0x00 ,0 ,0 }, {0x3612 ,0x29 ,0 ,0 }, {0x3708 ,0x64 ,0 ,0 }, + {0x3709 ,0x52 ,0 ,0 }, {0x370c ,0x03 ,0 ,0 }, {0x3a02 ,0x03 ,0 ,0 }, + {0x3a03 ,0xd8 ,0 ,0 }, {0x3a08 ,0x01 ,0 ,0 }, {0x3a09 ,0x27 ,0 ,0 }, + {0x3a0a ,0x00 ,0 ,0 }, {0x3a0b ,0xf6 ,0 ,0 }, {0x3a0e ,0x03 ,0 ,0 }, + {0x3a0d ,0x04 ,0 ,0 }, {0x3a14 ,0x03 ,0 ,0 }, {0x3a15 ,0xd8 ,0 ,0 }, + {0x4001 ,0x02 ,0 ,0 }, {0x4004 ,0x02 ,0 ,0 }, + {0x4407 ,0x04 ,0 ,0 }, {0x5001 ,0xa3 ,0 ,0 }, +}; +static const struct reg_value ov5640_setting_QCIF_176_144[] = { {0x3c07 ,0x08 ,0 ,0 }, {0x3c09, 0x1c, 0, 0}, {0x3c0a, 0x9c, 0, 0}, {0x3c0b, 0x40, 0, 0},
@@ -552,6 +571,10 @@ static const struct ov5640_mode_info ov5640_mode_init_data = {static const struct ov5640_mode_info ov5640_mode_data[OV5640_NUM_MODES ] = { + {OV5640_MODE_QQVGA_160_120 ,SUBSAMPLING , +160 ,1896 ,120 ,984 , + ov5640_setting_QCIF_176_144, +ARRAY_SIZE (ov5640_setting_QCIF_176_144)}, {OV5640_MODE_QCIF_176_144 ,SUBSAMPLING ,176 ,1896 ,144 ,984 , ov5640_setting_QCIF_176_144,
Signature · 1 line
2.7.4
kernel test robot
build botI love your patch! Perhaps something to improve:
Hi Hugues,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on v5.9-rc8 next-20201007]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Hugues-Fruchet/media-ov5640-add-support-of-160x120-resolution/20201007-191213 base: git://linuxtv.org/media_tree.git master config: x86_64-randconfig-r032-20201005 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 4d1d8ae7100ec3c7e1709addb7b3ec6f9ad0b44f)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/457f07916fe31745cdcdcc5bfb011559a68c8b87
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Hugues-Fruchet/media-ov5640-add-support-of-160x120-resolution/20201007-191213 git checkout 457f07916fe31745cdcdcc5bfb011559a68c8b87
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
All warnings (new ones prefixed by >>):
>> drivers/media/i2c/ov5640.c:420:31: warning: unused variable 'ov5640_setting_QQVGA_160_120' [-Wunused-const-variable]
static const struct reg_value ov5640_setting_QQVGA_160_120[] = {
^1 warning generated.
vim +/ov5640_setting_QQVGA_160_120 +420 drivers/media/i2c/ov5640.c
419
> 420 static const struct reg_value ov5640_setting_QQVGA_160_120[] = { 421 {0x3c07, 0x08, 0, 0},
422 {0x3c09, 0x1c, 0, 0}, {0x3c0a, 0x9c, 0, 0}, {0x3c0b, 0x40, 0, 0},
423 {0x3814, 0x31, 0, 0},
424 {0x3815, 0x31, 0, 0}, {0x3800, 0x00, 0, 0}, {0x3801, 0x00, 0, 0},
425 {0x3802, 0x00, 0, 0}, {0x3803, 0x04, 0, 0}, {0x3804, 0x0a, 0, 0},
426 {0x3805, 0x3f, 0, 0}, {0x3806, 0x07, 0, 0}, {0x3807, 0x9b, 0, 0},
427 {0x3810, 0x00, 0, 0},
428 {0x3811, 0x10, 0, 0}, {0x3812, 0x00, 0, 0}, {0x3813, 0x06, 0, 0},
429 {0x3618, 0x00, 0, 0}, {0x3612, 0x29, 0, 0}, {0x3708, 0x64, 0, 0},
430 {0x3709, 0x52, 0, 0}, {0x370c, 0x03, 0, 0}, {0x3a02, 0x03, 0, 0},
431 {0x3a03, 0xd8, 0, 0}, {0x3a08, 0x01, 0, 0}, {0x3a09, 0x27, 0, 0},
432 {0x3a0a, 0x00, 0, 0}, {0x3a0b, 0xf6, 0, 0}, {0x3a0e, 0x03, 0, 0},
433 {0x3a0d, 0x04, 0, 0}, {0x3a14, 0x03, 0, 0}, {0x3a15, 0xd8, 0, 0},
434 {0x4001, 0x02, 0, 0}, {0x4004, 0x02, 0, 0},
435 {0x4407, 0x04, 0, 0}, {0x5001, 0xa3, 0, 0},
436 };
437
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org