Re: [PATCH 3/3] drm/udl: Switch to SHMEM

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

 



Hi Thomas,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.4-rc5 next-20191030]
[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-udl-Convert-to-SHMEM/20191030-065855
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 23fdb198ae81f47a574296dab5167c5e136a02ba
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-dirty
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/udl/udl_fb.c:406:27: sparse: sparse: incorrect type in assignment (different address spaces) @@    expected char [noderef] <asn:2> *screen_base @@    got oderef] <asn:2> *screen_base @@
   drivers/gpu/drm/udl/udl_fb.c:406:27: sparse:    expected char [noderef] <asn:2> *screen_base
>> drivers/gpu/drm/udl/udl_fb.c:406:27: sparse:    got void *[assigned] vaddr
--
>> drivers/gpu/drm/udl/udl_gem.c:41:34: sparse: sparse: incorrect type in argument 1 (different base types) @@    expected struct file *filp @@    got struct drmstruct file *filp @@
>> drivers/gpu/drm/udl/udl_gem.c:41:34: sparse:    expected struct file *filp
>> drivers/gpu/drm/udl/udl_gem.c:41:34: sparse:    got struct drm_gem_object *obj
   drivers/gpu/drm/udl/udl_gem.c:61:10: sparse: sparse: unknown field name in initializer

vim +406 drivers/gpu/drm/udl/udl_fb.c

   350	
   351	
   352	static int udlfb_create(struct drm_fb_helper *helper,
   353				struct drm_fb_helper_surface_size *sizes)
   354	{
   355		struct udl_fbdev *ufbdev =
   356			container_of(helper, struct udl_fbdev, helper);
   357		struct drm_device *dev = ufbdev->helper.dev;
   358		struct fb_info *info;
   359		struct drm_framebuffer *fb;
   360		struct drm_mode_fb_cmd2 mode_cmd;
   361		struct drm_gem_shmem_object *shmem;
   362		void *vaddr;
   363		uint32_t size;
   364		int ret = 0;
   365	
   366		if (sizes->surface_bpp == 24)
   367			sizes->surface_bpp = 32;
   368	
   369		mode_cmd.width = sizes->surface_width;
   370		mode_cmd.height = sizes->surface_height;
   371		mode_cmd.pitches[0] = mode_cmd.width * ((sizes->surface_bpp + 7) / 8);
   372	
   373		mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp,
   374								  sizes->surface_depth);
   375	
   376		size = mode_cmd.pitches[0] * mode_cmd.height;
   377		size = ALIGN(size, PAGE_SIZE);
   378	
   379		shmem = drm_gem_shmem_create(dev, size);
   380		if (IS_ERR(shmem)) {
   381			ret = PTR_ERR(shmem);
   382			goto out;
   383		}
   384	
   385		vaddr = drm_gem_shmem_vmap(&shmem->base);
   386		if (IS_ERR(vaddr)) {
   387			ret = PTR_ERR(vaddr);
   388			DRM_ERROR("failed to vmap fb\n");
   389			goto out_gfree;
   390		}
   391	
   392		info = drm_fb_helper_alloc_fbi(helper);
   393		if (IS_ERR(info)) {
   394			ret = PTR_ERR(info);
   395			goto out_gfree;
   396		}
   397	
   398		ret = udl_framebuffer_init(dev, &ufbdev->ufb, &mode_cmd, shmem);
   399		if (ret)
   400			goto out_gfree;
   401	
   402		fb = &ufbdev->ufb.base;
   403	
   404		ufbdev->helper.fb = fb;
   405	
 > 406		info->screen_base = vaddr;
   407		info->fix.smem_len = size;
   408		info->fix.smem_start = (unsigned long)vaddr;
   409	
   410		info->fbops = &udlfb_ops;
   411		drm_fb_helper_fill_info(info, &ufbdev->helper, sizes);
   412	
   413		DRM_DEBUG_KMS("allocated %dx%d vmal %p\n",
   414			      fb->width, fb->height,
   415			      ufbdev->ufb.shmem->vaddr);
   416	
   417		return ret;
   418	out_gfree:
   419		drm_gem_object_put_unlocked(&ufbdev->ufb.shmem->base);
   420	out:
   421		return ret;
   422	}
   423	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[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