Re: [PATH 2/4] rcar-du: Add support virtual DRM device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tomohito,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on drm-intel/for-linux-next drm-tip/drm-tip linus/master v5.13-rc7 next-20210618]
[cannot apply to pinchartl-media/drm/du/next]
[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/Tomohito-Esaki/Support-virtual-DRM/20210621-144611
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-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/cc44235a16ab2596f4eae5c4e9011e884ce89691
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Tomohito-Esaki/Support-virtual-DRM/20210621-144611
        git checkout cc44235a16ab2596f4eae5c4e9011e884ce89691
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/rcar-du/rcar_du_vdrm.c:60:6: error: redefinition of 'rcar_du_vdrm_crtc_complete'
      60 | void rcar_du_vdrm_crtc_complete(struct rcar_du_crtc *crtc, unsigned int status)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/rcar-du/rcar_du_vdrm.c:19:
   drivers/gpu/drm/rcar-du/rcar_du_vdrm.h:35:1: note: previous definition of 'rcar_du_vdrm_crtc_complete' was here
      35 | rcar_du_vdrm_crtc_complete(struct rcar_du_crtc *crtc, unsigned int status) { }
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/rcar-du/rcar_du_vdrm.c:71:5: error: redefinition of 'rcar_du_vdrm_count'
      71 | int rcar_du_vdrm_count(struct rcar_du_device *rcdu)
         |     ^~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/rcar-du/rcar_du_vdrm.c:19:
   drivers/gpu/drm/rcar-du/rcar_du_vdrm.h:37:19: note: previous definition of 'rcar_du_vdrm_count' was here
      37 | static inline int rcar_du_vdrm_count(struct rcar_du_device *rcdu)
         |                   ^~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/rcar-du/rcar_du_vdrm.c:83:5: error: redefinition of 'rcar_du_vdrms_init'
      83 | int rcar_du_vdrms_init(struct rcar_du_device *rcdu)
         |     ^~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/rcar-du/rcar_du_vdrm.c:19:
   drivers/gpu/drm/rcar-du/rcar_du_vdrm.h:41:19: note: previous definition of 'rcar_du_vdrms_init' was here
      41 | static inline int rcar_du_vdrms_init(struct rcar_du_device *rcdu)
         |                   ^~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/rcar-du/rcar_du_vdrm.c:130:5: error: redefinition of 'rcar_du_vdrm_plane_init'
     130 | int rcar_du_vdrm_plane_init(struct vdrm_device *vdrm,
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/rcar-du/rcar_du_vdrm.c:19:
   drivers/gpu/drm/rcar-du/rcar_du_vdrm.h:46:1: note: previous definition of 'rcar_du_vdrm_plane_init' was here
      46 | rcar_du_vdrm_plane_init(struct vdrm_device *vdrm,
         | ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/rcar-du/rcar_du_vdrm.c:142:5: error: redefinition of 'rcar_du_vdrm_crtc_init'
     142 | int rcar_du_vdrm_crtc_init(struct rcar_du_crtc *crtc, int index)
         |     ^~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/rcar-du/rcar_du_vdrm.c:19:
   drivers/gpu/drm/rcar-du/rcar_du_vdrm.h:55:19: note: previous definition of 'rcar_du_vdrm_crtc_init' was here
      55 | static inline int rcar_du_vdrm_crtc_init(struct rcar_du_crtc *crtc, int index)
         |                   ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/rcar-du/rcar_du_vdrm.c:165:5: error: redefinition of 'rcar_du_vdrms_register'
     165 | int rcar_du_vdrms_register(struct rcar_du_device *rcdu)
         |     ^~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/rcar-du/rcar_du_vdrm.c:19:
   drivers/gpu/drm/rcar-du/rcar_du_vdrm.h:59:19: note: previous definition of 'rcar_du_vdrms_register' was here
      59 | static inline int rcar_du_vdrms_register(struct rcar_du_device *rcdu)
         |                   ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/rcar-du/rcar_du_vdrm.c:178:6: error: redefinition of 'rcar_du_vdrms_fini'
     178 | void rcar_du_vdrms_fini(struct rcar_du_device *rcdu)
         |      ^~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/rcar-du/rcar_du_vdrm.c:19:
   drivers/gpu/drm/rcar-du/rcar_du_vdrm.h:63:20: note: previous definition of 'rcar_du_vdrms_fini' was here
      63 | static inline void rcar_du_vdrms_fini(struct rcar_du_device *rcdu) { }
         |                    ^~~~~~~~~~~~~~~~~~


vim +/rcar_du_vdrm_crtc_complete +60 drivers/gpu/drm/rcar-du/rcar_du_vdrm.c

    59	
  > 60	void rcar_du_vdrm_crtc_complete(struct rcar_du_crtc *crtc, unsigned int status)
    61	{
    62		struct rcar_du_vdrm_display *disp;
    63	
    64		list_for_each_entry(disp, &crtc->vdrm_displays, head) {
    65			vdrm_drv_handle_vblank(disp->display);
    66			if (status & VSP1_DU_STATUS_COMPLETE)
    67				vdrm_drv_finish_page_flip(disp->display);
    68		}
    69	}
    70	
  > 71	int rcar_du_vdrm_count(struct rcar_du_device *rcdu)
    72	{
    73		const struct device_node *np = rcdu->dev->of_node;
    74		int num;
    75	
    76		num = of_property_count_u32_elems(np, "vdrms");
    77		if (num < 0)
    78			return 0;
    79	
    80		return num;
    81	}
    82	
  > 83	int rcar_du_vdrms_init(struct rcar_du_device *rcdu)
    84	{
    85		struct vdrm_device *vdrm;
    86		int num_vdrms;
    87		int i, ret;
    88	
    89		num_vdrms = rcar_du_vdrm_count(rcdu);
    90		if (num_vdrms == 0)
    91			return 0;
    92	
    93		rcdu->vdrms = kcalloc(num_vdrms, sizeof(vdrm), GFP_KERNEL);
    94		if (!rcdu->vdrms)
    95			return -1;
    96	
    97		DRM_INFO("VDRM: num vdrm = %d\n", num_vdrms);
    98	
    99		for (i = 0; i < num_vdrms; i++) {
   100			struct of_phandle_args args;
   101			const struct device_node *np = rcdu->dev->of_node;
   102	
   103			ret = of_parse_phandle_with_fixed_args(np, "vdrms", 0, i,
   104							       &args);
   105			if (ret < 0) {
   106				DRM_WARN("VDRM: failed get vdrm%d.\n", i);
   107				goto err;
   108			}
   109	
   110			vdrm = vdrm_drv_init(&rcdu->ddev, args.np, 0, NULL,
   111					     &vdrm_funcs);
   112			of_node_put(args.np);
   113			if (IS_ERR(vdrm)) {
   114				ret = PTR_ERR(vdrm);
   115				goto err;
   116			}
   117	
   118			rcdu->vdrms[i] = vdrm;
   119			rcdu->num_vdrms++;
   120		}
   121	
   122		return 0;
   123	
   124	err:
   125		rcar_du_vdrms_fini(rcdu);
   126		rcdu->num_vdrms = 0;
   127		return ret;
   128	}
   129	
 > 130	int rcar_du_vdrm_plane_init(struct vdrm_device *vdrm,
   131				    struct rcar_du_vsp_plane *plane,
   132				    const struct drm_plane_funcs *funcs,
   133				    const struct drm_plane_helper_funcs *helper_funcs,
   134				    const u32 *formats, unsigned int num_formats,
   135				    int max_zpos)
   136	{
   137		return vdrm_drv_plane_init(vdrm, &plane->plane, funcs,
   138					   helper_funcs, formats, num_formats,
   139					   max_zpos);
   140	}
   141	
 > 142	int rcar_du_vdrm_crtc_init(struct rcar_du_crtc *crtc, int index)
   143	{
   144		struct rcar_du_device *rcdu;
   145		int i;
   146	
   147		rcdu = crtc->dev;
   148		for (i = 0; i < rcdu->num_vdrms; i++) {
   149			struct vdrm_display *vdisplay;
   150			int plane_index = crtc->vsp->num_planes + i;
   151			struct drm_plane *plane =
   152				&crtc->vsp->planes[plane_index].plane;
   153	
   154			vdisplay = vdrm_drv_display_init(rcdu->vdrms[i], &crtc->crtc,
   155							 plane);
   156			if (IS_ERR(vdisplay))
   157				return PTR_ERR(vdisplay);
   158	
   159			rcar_du_crtc_add_vdrm_display(crtc, vdisplay);
   160		}
   161	
   162		return 0;
   163	}
   164	
 > 165	int rcar_du_vdrms_register(struct rcar_du_device *rcdu)
   166	{
   167		int i, ret;
   168	
   169		for (i = 0; i < rcdu->num_vdrms; i++) {
   170			ret = vdrm_drv_register(rcdu->vdrms[i]);
   171			if (ret)
   172				return ret;
   173		}
   174	
   175		return 0;
   176	}
   177	
 > 178	void rcar_du_vdrms_fini(struct rcar_du_device *rcdu)

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux