Message ID | 1604445978-14924-8-git-send-email-anitha.chrisanthus@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add support for KeemBay DRM driver | expand |
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@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
diff --git a/MAINTAINERS b/MAINTAINERS index 71e29dc..c82ea76 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8961,6 +8961,13 @@ M: Deepak Saxena <dsaxena@plexity.net> S: Maintained F: drivers/char/hw_random/ixp4xx-rng.c +INTEL KEEMBAY DRM DRIVER +M: Anitha Chrisanthus <anitha.chrisanthus@intel.com> +M: Edmund Dea <edmund.j.dea@intel.com> +S: Maintained +F: Documentation/devicetree/bindings/display/intel,kmb_display.yaml +F: drivers/gpu/drm/kmb/ + INTEL MANAGEMENT ENGINE (mei) M: Tomas Winkler <tomas.winkler@intel.com> L: linux-kernel@vger.kernel.org diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 64376dd..3dc293c 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -268,6 +268,8 @@ source "drivers/gpu/drm/nouveau/Kconfig" source "drivers/gpu/drm/i915/Kconfig" +source "drivers/gpu/drm/kmb/Kconfig" + config DRM_VGEM tristate "Virtual GEM provider" depends on DRM diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 8156900..fefaff4c 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -71,6 +71,7 @@ obj-$(CONFIG_DRM_AMDGPU)+= amd/amdgpu/ obj-$(CONFIG_DRM_MGA) += mga/ obj-$(CONFIG_DRM_I810) += i810/ obj-$(CONFIG_DRM_I915) += i915/ +obj-$(CONFIG_DRM_KMB_DISPLAY) += kmb/ obj-$(CONFIG_DRM_MGAG200) += mgag200/ obj-$(CONFIG_DRM_V3D) += v3d/ obj-$(CONFIG_DRM_VC4) += vc4/ diff --git a/drivers/gpu/drm/kmb/Kconfig b/drivers/gpu/drm/kmb/Kconfig new file mode 100644 index 0000000..2dd7e68 --- /dev/null +++ b/drivers/gpu/drm/kmb/Kconfig @@ -0,0 +1,12 @@ +config DRM_KMB_DISPLAY + tristate "INTEL KEEMBAY DISPLAY" + depends on DRM && OF && (ARM || ARM64) + depends on COMMON_CLK + select DRM_KMS_HELPER + select DRM_KMS_CMA_HELPER + select DRM_GEM_CMA_HELPER + help + Choose this option if you have Intel's KeemBay SOC which integrates + an ARM Cortex A53 CPU with an Intel Movidius VPU. + + If M is selected the module will be called kmb-drm. diff --git a/drivers/gpu/drm/kmb/Makefile b/drivers/gpu/drm/kmb/Makefile new file mode 100644 index 0000000..527d737 --- /dev/null +++ b/drivers/gpu/drm/kmb/Makefile @@ -0,0 +1,2 @@ +kmb-drm-y := kmb_crtc.o kmb_drv.o kmb_plane.o kmb_dsi.o +obj-$(CONFIG_DRM_KMB_DISPLAY) += kmb-drm.o