dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@lists.01.org, Thomas Zimmermann <tzimmermann@suse.de>,
	sam@ravnborg.org, dri-devel@lists.freedesktop.org,
	airlied@redhat.com, sean@poorly.run, emil.velikov@collabora.com
Subject: Re: [PATCH 3/3] drm/udl: Switch to SHMEM
Date: Thu, 31 Oct 2019 20:53:29 +0800	[thread overview]
Message-ID: <201910312018.BZ7Dg4me%lkp@intel.com> (raw)
In-Reply-To: <20191028084549.30243-4-tzimmermann@suse.de>

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@intel.com>


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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: kbuild-all@lists.01.org, Thomas Zimmermann <tzimmermann@suse.de>,
	sam@ravnborg.org, dri-devel@lists.freedesktop.org,
	airlied@redhat.com, sean@poorly.run, emil.velikov@collabora.com
Subject: Re: [PATCH 3/3] drm/udl: Switch to SHMEM
Date: Thu, 31 Oct 2019 20:53:29 +0800	[thread overview]
Message-ID: <201910312018.BZ7Dg4me%lkp@intel.com> (raw)
Message-ID: <20191031125329.Z8MimSnhgbPs1ov013exNCd5BmwcAbu_AnAQPq-vpvg@z> (raw)
In-Reply-To: <20191028084549.30243-4-tzimmermann@suse.de>

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@intel.com>


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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2019-10-31 12:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28  8:45 [PATCH 0/3] drm/udl: Convert to SHMEM Thomas Zimmermann
2019-10-28  8:45 ` [PATCH 1/3] drm/udl: Remove flags field from struct udl_gem_object Thomas Zimmermann
2019-11-05 11:05   ` Gerd Hoffmann
2019-10-28  8:45 ` [PATCH 2/3] drm/udl: Allocate GEM object via struct drm_driver.gem_create_object Thomas Zimmermann
2019-11-05 11:05   ` Gerd Hoffmann
2019-10-28  8:45 ` [PATCH 3/3] drm/udl: Switch to SHMEM Thomas Zimmermann
2019-10-30  0:15   ` kbuild test robot
2019-10-30  0:15     ` kbuild test robot
2019-10-31 12:53   ` kbuild test robot [this message]
2019-10-31 12:53     ` kbuild test robot
2019-11-05 11:05   ` Gerd Hoffmann
2019-11-06  8:22     ` Thomas Zimmermann
2019-10-28  8:48 ` [PATCH 0/3] drm/udl: Convert " Thomas Zimmermann
2019-10-28  8:48   ` Thomas Zimmermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201910312018.BZ7Dg4me%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.velikov@collabora.com \
    --cc=kbuild-all@lists.01.org \
    --cc=sam@ravnborg.org \
    --cc=sean@poorly.run \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox