[PATCH v12 7/7] drm/kmb: Build files for KeemBay Display driver

kernel test robot lkp at intel.com
Wed Nov 4 07:55:26 UTC 2020


Hi Anitha,

I love your patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on drm-intel/for-linux-next drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next drm-tip/drm-tip linus/master v5.10-rc2 next-20201103]
[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/Anitha-Chrisanthus/Add-support-for-KeemBay-DRM-driver/20201104-072844
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-randconfig-r023-20201104 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project a6d15d40701ad38f29e4ff93703b3ffa7b204611)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/0day-ci/linux/commit/060e5099db380b6f351791e410a9d6d89c2ffeab
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Anitha-Chrisanthus/Add-support-for-KeemBay-DRM-driver/20201104-072844
        git checkout 060e5099db380b6f351791e410a9d6d89c2ffeab
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

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/kmb/kmb_drv.c:28:5: warning: no previous prototype for function 'kmb_display_clk_enable' [-Wmissing-prototypes]
   int kmb_display_clk_enable(struct kmb_drm_private *kmb)
       ^
   drivers/gpu/drm/kmb/kmb_drv.c:28:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int kmb_display_clk_enable(struct kmb_drm_private *kmb)
   ^
   static 
>> drivers/gpu/drm/kmb/kmb_drv.c:41:5: warning: no previous prototype for function 'kmb_initialize_clocks' [-Wmissing-prototypes]
   int kmb_initialize_clocks(struct kmb_drm_private *kmb, struct device *dev)
       ^
   drivers/gpu/drm/kmb/kmb_drv.c:41:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int kmb_initialize_clocks(struct kmb_drm_private *kmb, struct device *dev)
   ^
   static 
   2 warnings generated.
--
>> drivers/gpu/drm/kmb/kmb_plane.c:103:14: warning: no previous prototype for function 'get_pixel_format' [-Wmissing-prototypes]
   unsigned int get_pixel_format(u32 format)
                ^
   drivers/gpu/drm/kmb/kmb_plane.c:103:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   unsigned int get_pixel_format(u32 format)
   ^
   static 
>> drivers/gpu/drm/kmb/kmb_plane.c:193:14: warning: no previous prototype for function 'get_bits_per_pixel' [-Wmissing-prototypes]
   unsigned int get_bits_per_pixel(const struct drm_format_info *format)
                ^
   drivers/gpu/drm/kmb/kmb_plane.c:193:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   unsigned int get_bits_per_pixel(const struct drm_format_info *format)
   ^
   static 
   2 warnings generated.

vim +/kmb_display_clk_enable +28 drivers/gpu/drm/kmb/kmb_drv.c

ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  27  
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03 @28  int kmb_display_clk_enable(struct kmb_drm_private *kmb)
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  29  {
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  30  	int ret = 0;
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  31  
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  32  	ret = clk_prepare_enable(kmb->kmb_clk.clk_lcd);
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  33  	if (ret) {
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  34  		drm_err(&kmb->drm, "Failed to enable LCD clock: %d\n", ret);
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  35  		return ret;
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  36  	}
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  37  	DRM_INFO("SUCCESS : enabled LCD clocks\n");
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  38  	return 0;
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  39  }
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  40  
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03 @41  int kmb_initialize_clocks(struct kmb_drm_private *kmb, struct device *dev)
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  42  {
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  43  	int ret = 0;
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  44  	struct regmap *msscam;
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  45  
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  46  	kmb->kmb_clk.clk_lcd = devm_clk_get(dev, "clk_lcd");
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  47  	if (IS_ERR(kmb->kmb_clk.clk_lcd)) {
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  48  		drm_err(&kmb->drm, "clk_get() failed clk_lcd\n");
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  49  		return PTR_ERR(kmb->kmb_clk.clk_lcd);
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  50  	}
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  51  
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  52  	kmb->kmb_clk.clk_pll0 = devm_clk_get(dev, "clk_pll0");
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  53  	if (IS_ERR(kmb->kmb_clk.clk_pll0)) {
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  54  		drm_err(&kmb->drm, "clk_get() failed clk_pll0 ");
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  55  		return PTR_ERR(kmb->kmb_clk.clk_pll0);
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  56  	}
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  57  	kmb->sys_clk_mhz = clk_get_rate(kmb->kmb_clk.clk_pll0) / 1000000;
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  58  	drm_info(&kmb->drm, "system clk = %d Mhz", kmb->sys_clk_mhz);
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  59  
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  60  	ret =  kmb_dsi_clk_init(kmb->kmb_dsi);
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  61  
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  62  	/* Set LCD clock to 200 Mhz */
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  63  	clk_set_rate(kmb->kmb_clk.clk_lcd, KMB_LCD_DEFAULT_CLK);
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  64  	if (clk_get_rate(kmb->kmb_clk.clk_lcd) != KMB_LCD_DEFAULT_CLK) {
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  65  		drm_err(&kmb->drm, "failed to set to clk_lcd to %d\n",
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  66  			KMB_LCD_DEFAULT_CLK);
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  67  		return -1;
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  68  	}
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  69  	drm_dbg(&kmb->drm, "clk_lcd = %ld\n", clk_get_rate(kmb->kmb_clk.clk_lcd));
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  70  
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  71  	ret = kmb_display_clk_enable(kmb);
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  72  	if (ret)
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  73  		return ret;
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  74  
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  75  	msscam = syscon_regmap_lookup_by_compatible("intel,keembay-msscam");
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  76  	if (IS_ERR(msscam)) {
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  77  		drm_err(&kmb->drm, "failed to get msscam syscon");
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  78  		return -1;
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  79  	}
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  80  
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  81  	/* Enable MSS_CAM_CLK_CTRL for MIPI TX and LCD */
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  82  	regmap_update_bits(msscam, MSS_CAM_CLK_CTRL, 0x1fff, 0x1fff);
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  83  	regmap_update_bits(msscam, MSS_CAM_RSTN_CTRL, 0xffffffff, 0xffffffff);
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  84  	return 0;
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  85  }
ef228657da9c1a3 Anitha Chrisanthus 2020-11-03  86  

---
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: 27511 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20201104/35b84106/attachment-0001.gz>


More information about the dri-devel mailing list