Message ID | 20210401112723.189107-10-eugen.hristev@microchip.com |
---|---|
State | Superseded |
Headers | show |
Series | media: atmel: atmel-isc: add support for xisc | expand |
Hi Eugen, I love your patch! Perhaps something to improve: [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v5.12-rc5 next-20210401] [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/Eugen-Hristev/media-atmel-atmel-isc-add-support-for-xisc/20210402-024144 base: git://linuxtv.org/media_tree.git master config: arm64-randconfig-r024-20210401 (attached as .config) compiler: aarch64-linux-gcc (GCC) 9.3.0 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 # https://github.com/0day-ci/linux/commit/0136fa35e972de936a196a353496986799606b7b git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Eugen-Hristev/media-atmel-atmel-isc-add-support-for-xisc/20210402-024144 git checkout 0136fa35e972de936a196a353496986799606b7b # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All warnings (new ones prefixed by >>): drivers/media/platform/atmel/atmel-sama5d2-isc.c:57:6: warning: no previous prototype for 'isc_sama5d2_config_csc' [-Wmissing-prototypes] 57 | void isc_sama5d2_config_csc(struct isc_device *isc) | ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/media/platform/atmel/atmel-sama5d2-isc.c:76:6: warning: no previous prototype for 'isc_sama5d2_config_cbc' [-Wmissing-prototypes] 76 | void isc_sama5d2_config_cbc(struct isc_device *isc) | ^~~~~~~~~~~~~~~~~~~~~~ vim +/isc_sama5d2_config_cbc +76 drivers/media/platform/atmel/atmel-sama5d2-isc.c 56 > 57 void isc_sama5d2_config_csc(struct isc_device *isc) 58 { 59 struct regmap *regmap = isc->regmap; 60 61 /* Convert RGB to YUV */ 62 regmap_write(regmap, ISC_CSC_YR_YG + isc->offsets.csc, 63 0x42 | (0x81 << 16)); 64 regmap_write(regmap, ISC_CSC_YB_OY + isc->offsets.csc, 65 0x19 | (0x10 << 16)); 66 regmap_write(regmap, ISC_CSC_CBR_CBG + isc->offsets.csc, 67 0xFDA | (0xFB6 << 16)); 68 regmap_write(regmap, ISC_CSC_CBB_OCB + isc->offsets.csc, 69 0x70 | (0x80 << 16)); 70 regmap_write(regmap, ISC_CSC_CRR_CRG + isc->offsets.csc, 71 0x70 | (0xFA2 << 16)); 72 regmap_write(regmap, ISC_CSC_CRB_OCR + isc->offsets.csc, 73 0xFEE | (0x80 << 16)); 74 } 75 > 76 void isc_sama5d2_config_cbc(struct isc_device *isc) 77 { 78 struct regmap *regmap = isc->regmap; 79 80 regmap_write(regmap, ISC_CBC_BRIGHT, isc->ctrls.brightness); 81 regmap_write(regmap, ISC_CBC_CONTRAST, isc->ctrls.contrast); 82 } 83 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff --git a/drivers/media/platform/atmel/atmel-isc-base.c b/drivers/media/platform/atmel/atmel-isc-base.c index 019d931d1367..446fe232956b 100644 --- a/drivers/media/platform/atmel/atmel-isc-base.c +++ b/drivers/media/platform/atmel/atmel-isc-base.c @@ -647,9 +647,7 @@ static void isc_set_pipeline(struct isc_device *isc, u32 pipeline) regmap_bulk_write(regmap, ISC_GAM_RENTRY, gamma, GAMMA_ENTRIES); isc->config_csc(isc); - - regmap_write(regmap, ISC_CBC_BRIGHT, ctrls->brightness); - regmap_write(regmap, ISC_CBC_CONTRAST, ctrls->contrast); + isc->config_cbc(isc); } static int isc_update_profile(struct isc_device *isc) diff --git a/drivers/media/platform/atmel/atmel-isc.h b/drivers/media/platform/atmel/atmel-isc.h index ef3a0451192d..cb47932197b1 100644 --- a/drivers/media/platform/atmel/atmel-isc.h +++ b/drivers/media/platform/atmel/atmel-isc.h @@ -203,6 +203,8 @@ struct isc_reg_offsets { * * @config_csc: pointer to a function that initializes product * specific CSC module + * @config_cbc: pointer to a function that initializes product + * specific CBC module * * @offsets: struct holding the product specific register offsets */ @@ -275,6 +277,7 @@ struct isc_device { struct { void (*config_csc)(struct isc_device *isc); + void (*config_cbc)(struct isc_device *isc); }; struct isc_reg_offsets offsets; diff --git a/drivers/media/platform/atmel/atmel-sama5d2-isc.c b/drivers/media/platform/atmel/atmel-sama5d2-isc.c index 3b076b87454e..36bf15a9607d 100644 --- a/drivers/media/platform/atmel/atmel-sama5d2-isc.c +++ b/drivers/media/platform/atmel/atmel-sama5d2-isc.c @@ -73,6 +73,14 @@ void isc_sama5d2_config_csc(struct isc_device *isc) 0xFEE | (0x80 << 16)); } +void isc_sama5d2_config_cbc(struct isc_device *isc) +{ + struct regmap *regmap = isc->regmap; + + regmap_write(regmap, ISC_CBC_BRIGHT, isc->ctrls.brightness); + regmap_write(regmap, ISC_CBC_CONTRAST, isc->ctrls.contrast); +} + /* Gamma table with gamma 1/2.2 */ const u32 isc_sama5d2_gamma_table[][GAMMA_ENTRIES] = { /* 0 --> gamma 1/1.8 */ @@ -218,6 +226,7 @@ static int atmel_isc_probe(struct platform_device *pdev) isc->max_height = ISC_SAMA5D2_MAX_SUPPORT_HEIGHT; isc->config_csc = isc_sama5d2_config_csc; + isc->config_cbc = isc_sama5d2_config_cbc; isc->offsets.csc = ISC_SAMA5D2_CSC_OFFSET;
The CBC submodule should be initialized in the product specific driver as it's product specific. Other products can implement it differently Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> --- drivers/media/platform/atmel/atmel-isc-base.c | 4 +--- drivers/media/platform/atmel/atmel-isc.h | 3 +++ drivers/media/platform/atmel/atmel-sama5d2-isc.c | 9 +++++++++ 3 files changed, 13 insertions(+), 3 deletions(-)