Hi Kevin, Thank you for the patch! Yet something to improve: [auto build test ERROR on robh/for-next] [also build test ERROR on v5.15-rc7 next-20211025] [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/Kevin-Tang/Add-Unisoc-s-drm-kms-module/20211025-173717 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next config: nios2-allyesconfig (attached as .config) compiler: nios2-linux-gcc (GCC) 11.2.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/99017a6a5c531e08eb995f84c148c9995a064143 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Kevin-Tang/Add-Unisoc-s-drm-kms-module/20211025-173717 git checkout 99017a6a5c531e08eb995f84c148c9995a064143 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/gpu/drm/sprd/sprd_dsi.c: In function 'sprd_dsi_bridge_init': >> drivers/gpu/drm/sprd/sprd_dsi.c:938:29: error: implicit declaration of function 'devm_drm_of_get_bridge'; did you mean 'devm_drm_panel_bridge_add'? [-Werror=implicit-function-declaration] 938 | dsi->panel_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 1, 0); | ^~~~~~~~~~~~~~~~~~~~~~ | devm_drm_panel_bridge_add >> drivers/gpu/drm/sprd/sprd_dsi.c:938:27: error: assignment to 'struct drm_bridge *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion] 938 | dsi->panel_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 1, 0); | ^ At top level: >> drivers/gpu/drm/sprd/sprd_dsi.c:853:39: error: 'sprd_encoder_funcs' defined but not used [-Werror=unused-const-variable=] 853 | static const struct drm_encoder_funcs sprd_encoder_funcs = { | ^~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors vim +938 drivers/gpu/drm/sprd/sprd_dsi.c 852 > 853 static const struct drm_encoder_funcs sprd_encoder_funcs = { 854 .destroy = drm_encoder_cleanup, 855 }; 856 857 static int sprd_dsi_host_attach(struct mipi_dsi_host *host, 858 struct mipi_dsi_device *slave) 859 { 860 struct sprd_dsi *dsi = host_to_dsi(host); 861 struct dsi_context *ctx = &dsi->ctx; 862 863 dsi->slave = slave; 864 865 if (slave->mode_flags & MIPI_DSI_MODE_VIDEO) 866 ctx->work_mode = DSI_MODE_VIDEO; 867 else 868 ctx->work_mode = DSI_MODE_CMD; 869 870 if (slave->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) 871 ctx->burst_mode = VIDEO_BURST_WITH_SYNC_PULSES; 872 else if (slave->mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE) 873 ctx->burst_mode = VIDEO_NON_BURST_WITH_SYNC_PULSES; 874 else 875 ctx->burst_mode = VIDEO_NON_BURST_WITH_SYNC_EVENTS; 876 877 return 0; 878 } 879 880 static int sprd_dsi_host_detach(struct mipi_dsi_host *host, 881 struct mipi_dsi_device *slave) 882 { 883 /* do nothing */ 884 return 0; 885 } 886 887 static ssize_t sprd_dsi_host_transfer(struct mipi_dsi_host *host, 888 const struct mipi_dsi_msg *msg) 889 { 890 struct sprd_dsi *dsi = host_to_dsi(host); 891 const u8 *tx_buf = msg->tx_buf; 892 893 if (msg->rx_buf && msg->rx_len) { 894 u8 lsb = (msg->tx_len > 0) ? tx_buf[0] : 0; 895 u8 msb = (msg->tx_len > 1) ? tx_buf[1] : 0; 896 897 return sprd_dsi_rd_pkt(&dsi->ctx, msg->channel, msg->type, 898 msb, lsb, msg->rx_buf, msg->rx_len); 899 } 900 901 if (msg->tx_buf && msg->tx_len) 902 return sprd_dsi_wr_pkt(&dsi->ctx, msg->channel, msg->type, 903 tx_buf, msg->tx_len); 904 905 return 0; 906 } 907 908 static const struct mipi_dsi_host_ops sprd_dsi_host_ops = { 909 .attach = sprd_dsi_host_attach, 910 .detach = sprd_dsi_host_detach, 911 .transfer = sprd_dsi_host_transfer, 912 }; 913 914 static int sprd_dsi_encoder_init(struct sprd_dsi *dsi, 915 struct device *dev) 916 { 917 u32 crtc_mask; 918 919 crtc_mask = drm_of_find_possible_crtcs(dsi->drm, dev->of_node); 920 if (!crtc_mask) { 921 drm_err(dsi->drm, "failed to find crtc mask\n"); 922 return -EINVAL; 923 } 924 925 drm_dbg(dsi->drm, "find possible crtcs: 0x%08x\n", crtc_mask); 926 927 dsi->encoder.possible_crtcs = crtc_mask; 928 drm_encoder_helper_add(&dsi->encoder, &sprd_encoder_helper_funcs); 929 930 return 0; 931 } 932 933 static int sprd_dsi_bridge_init(struct sprd_dsi *dsi, 934 struct device *dev) 935 { 936 int ret; 937 > 938 dsi->panel_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 1, 0); 939 if (IS_ERR(dsi->panel_bridge)) 940 return PTR_ERR(dsi->panel_bridge); 941 942 ret = drm_bridge_attach(&dsi->encoder, dsi->panel_bridge, NULL, 0); 943 if (ret) 944 return ret; 945 946 return 0; 947 } 948 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org