[PATCH v1, 3/3] drm/mediatek: gamma set with cmdq

kernel test robot lkp at intel.com
Mon Apr 12 11:19:15 UTC 2021


Hi Yongqiang,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on pza/reset/next linus/master v5.12-rc7]
[cannot apply to next-20210409]
[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/Yongqiang-Niu/gamma-set-with-cmdq/20210412-143659
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm64-allyesconfig (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/b562bd6c318f4681373221cc292c78d51cb819e6
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Yongqiang-Niu/gamma-set-with-cmdq/20210412-143659
        git checkout b562bd6c318f4681373221cc292c78d51cb819e6
        # 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 at intel.com>

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/mediatek/mtk_disp_gamma.c: In function 'mtk_gamma_set_common':
>> drivers/gpu/drm/mediatek/mtk_disp_gamma.c:76:60: warning: passing argument 5 of 'mtk_ddp_write' makes integer from pointer without a cast [-Wint-conversion]
      76 |    mtk_ddp_write(cmdq_pkt, word, cmdq_reg, regs, (lut_base + i * 4));
         |                                                  ~~~~~~~~~~^~~~~~~~
         |                                                            |
         |                                                            void *
   In file included from drivers/gpu/drm/mediatek/mtk_drm_crtc.h:10,
                    from drivers/gpu/drm/mediatek/mtk_disp_gamma.c:15:
   drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h:199:19: note: expected 'unsigned int' but argument is of type 'void *'
     199 |      unsigned int offset);
         |      ~~~~~~~~~~~~~^~~~~~


vim +/mtk_ddp_write +76 drivers/gpu/drm/mediatek/mtk_disp_gamma.c

    57	
    58	void mtk_gamma_set_common(void __iomem *regs, struct cmdq_client_reg *cmdq_reg,
    59				  struct drm_crtc_state *state, struct cmdq_pkt *cmdq_pkt)
    60	{
    61		unsigned int i, reg;
    62		struct drm_color_lut *lut;
    63		void __iomem *lut_base;
    64		u32 word;
    65	
    66		if (state->gamma_lut) {
    67			reg = readl(regs + DISP_GAMMA_CFG);
    68			reg = reg | GAMMA_LUT_EN;
    69			mtk_ddp_write(cmdq_pkt, reg, cmdq_reg, regs, DISP_GAMMA_CFG);
    70			lut_base = regs + DISP_GAMMA_LUT;
    71			lut = (struct drm_color_lut *)state->gamma_lut->data;
    72			for (i = 0; i < MTK_LUT_SIZE; i++) {
    73				word = (((lut[i].red >> 6) & LUT_10BIT_MASK) << 20) +
    74					(((lut[i].green >> 6) & LUT_10BIT_MASK) << 10) +
    75					((lut[i].blue >> 6) & LUT_10BIT_MASK);
  > 76				mtk_ddp_write(cmdq_pkt, word, cmdq_reg, regs, (lut_base + i * 4));
    77			}
    78		}
    79	}
    80	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 76927 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20210412/3eb6ae7e/attachment-0001.gz>


More information about the dri-devel mailing list