[PATCH 19/22] drm/virtgpu: Use simple encoder

kbuild test robot lkp at intel.com
Sat Mar 7 15:40:01 UTC 2020


Hi Thomas,

I love your patch! Yet something to improve:

[auto build test ERROR on next-20200305]
[cannot apply to rockchip/for-next shawnguo/for-next sunxi/sunxi/for-next tegra/for-next linus/master v5.6-rc4 v5.6-rc3 v5.6-rc2 v5.6-rc4]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Thomas-Zimmermann/drm-Convert-drivers-to-drm_simple_encoder_init/20200306-045931
base:    47466dcf84ee66a973ea7d2fca7e582fe9328932
config: i386-randconfig-h002-20200307 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   drivers/gpu/drm/virtio/virtgpu_display.c: In function 'vgdev_output_init':
>> drivers/gpu/drm/virtio/virtgpu_display.c:276:2: error: implicit declaration of function 'drm_simple_encoder_init'; did you mean 'drm_encoder_init'? [-Werror=implicit-function-declaration]
     drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_VIRTUAL);
     ^~~~~~~~~~~~~~~~~~~~~~~
     drm_encoder_init
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls
   Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u32
   Cyclomatic Complexity 1 include/linux/err.h:ERR_PTR
   Cyclomatic Complexity 1 include/linux/err.h:PTR_ERR
   Cyclomatic Complexity 3 include/linux/slab.h:kmalloc_type
   Cyclomatic Complexity 28 include/linux/slab.h:kmalloc_index
   Cyclomatic Complexity 1 include/linux/slab.h:kmalloc_large
   Cyclomatic Complexity 4 include/linux/slab.h:kmalloc
   Cyclomatic Complexity 1 include/linux/slab.h:kzalloc
   Cyclomatic Complexity 1 include/drm/drm_modeset_helper_vtables.h:drm_crtc_helper_add
   Cyclomatic Complexity 1 include/drm/drm_modeset_helper_vtables.h:drm_encoder_helper_add
   Cyclomatic Complexity 1 include/drm/drm_modeset_helper_vtables.h:drm_connector_helper_add
   Cyclomatic Complexity 1 drivers/gpu/drm/virtio/virtgpu_display.c:virtio_gpu_crtc_atomic_enable
   Cyclomatic Complexity 1 drivers/gpu/drm/virtio/virtgpu_display.c:virtio_gpu_crtc_atomic_check
   Cyclomatic Complexity 1 drivers/gpu/drm/virtio/virtgpu_display.c:virtio_gpu_crtc_atomic_flush
   Cyclomatic Complexity 1 drivers/gpu/drm/virtio/virtgpu_display.c:virtio_gpu_enc_mode_set
   Cyclomatic Complexity 1 drivers/gpu/drm/virtio/virtgpu_display.c:virtio_gpu_enc_enable
   Cyclomatic Complexity 1 drivers/gpu/drm/virtio/virtgpu_display.c:virtio_gpu_enc_disable
   Cyclomatic Complexity 2 drivers/gpu/drm/virtio/virtgpu_display.c:virtio_gpu_conn_detect
   Cyclomatic Complexity 1 drivers/gpu/drm/virtio/virtgpu_display.c:vgdev_atomic_commit_tail
   Cyclomatic Complexity 67 include/asm-generic/getorder.h:get_order
   Cyclomatic Complexity 1 include/linux/err.h:IS_ERR
   Cyclomatic Complexity 2 drivers/gpu/drm/virtio/virtgpu_display.c:virtio_gpu_framebuffer_init
   Cyclomatic Complexity 5 drivers/gpu/drm/virtio/virtgpu_display.c:virtio_gpu_user_framebuffer_create
   Cyclomatic Complexity 5 drivers/gpu/drm/virtio/virtgpu_display.c:vgdev_output_init
   Cyclomatic Complexity 8 drivers/gpu/drm/virtio/virtgpu_display.c:virtio_gpu_conn_mode_valid
   Cyclomatic Complexity 4 drivers/gpu/drm/virtio/virtgpu_display.c:virtio_gpu_conn_get_modes
   Cyclomatic Complexity 1 drivers/gpu/drm/virtio/virtgpu_display.c:virtio_gpu_conn_destroy
   Cyclomatic Complexity 1 drivers/gpu/drm/virtio/virtgpu_display.c:virtio_gpu_crtc_atomic_disable
   Cyclomatic Complexity 1 drivers/gpu/drm/virtio/virtgpu_display.c:virtio_gpu_crtc_mode_set_nofb
   Cyclomatic Complexity 2 drivers/gpu/drm/virtio/virtgpu_display.c:virtio_gpu_modeset_init
   Cyclomatic Complexity 2 drivers/gpu/drm/virtio/virtgpu_display.c:virtio_gpu_modeset_fini
   Cyclomatic Complexity 1 drivers/gpu/drm/virtio/virtgpu_display.c:_GLOBAL__sub_I_00100_0_virtio_gpu_modeset_init
   Cyclomatic Complexity 1 drivers/gpu/drm/virtio/virtgpu_display.c:_GLOBAL__sub_D_00100_1_virtio_gpu_modeset_init
   cc1: some warnings being treated as errors

vim +276 drivers/gpu/drm/virtio/virtgpu_display.c

   243	
   244	static int vgdev_output_init(struct virtio_gpu_device *vgdev, int index)
   245	{
   246		struct drm_device *dev = vgdev->ddev;
   247		struct virtio_gpu_output *output = vgdev->outputs + index;
   248		struct drm_connector *connector = &output->conn;
   249		struct drm_encoder *encoder = &output->enc;
   250		struct drm_crtc *crtc = &output->crtc;
   251		struct drm_plane *primary, *cursor;
   252	
   253		output->index = index;
   254		if (index == 0) {
   255			output->info.enabled = cpu_to_le32(true);
   256			output->info.r.width = cpu_to_le32(XRES_DEF);
   257			output->info.r.height = cpu_to_le32(YRES_DEF);
   258		}
   259	
   260		primary = virtio_gpu_plane_init(vgdev, DRM_PLANE_TYPE_PRIMARY, index);
   261		if (IS_ERR(primary))
   262			return PTR_ERR(primary);
   263		cursor = virtio_gpu_plane_init(vgdev, DRM_PLANE_TYPE_CURSOR, index);
   264		if (IS_ERR(cursor))
   265			return PTR_ERR(cursor);
   266		drm_crtc_init_with_planes(dev, crtc, primary, cursor,
   267					  &virtio_gpu_crtc_funcs, NULL);
   268		drm_crtc_helper_add(crtc, &virtio_gpu_crtc_helper_funcs);
   269	
   270		drm_connector_init(dev, connector, &virtio_gpu_connector_funcs,
   271				   DRM_MODE_CONNECTOR_VIRTUAL);
   272		drm_connector_helper_add(connector, &virtio_gpu_conn_helper_funcs);
   273		if (vgdev->has_edid)
   274			drm_connector_attach_edid_property(connector);
   275	
 > 276		drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_VIRTUAL);
   277		drm_encoder_helper_add(encoder, &virtio_gpu_enc_helper_funcs);
   278		encoder->possible_crtcs = 1 << index;
   279	
   280		drm_connector_attach_encoder(connector, encoder);
   281		drm_connector_register(connector);
   282		return 0;
   283	}
   284	

---
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: 38019 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20200307/0e712006/attachment-0001.gz>


More information about the dri-devel mailing list