All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Chen Li" <chenli@uniontech.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	dri-devel@lists.freedesktop.org
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org
Subject: Re: [PATCH] drm/[amdgpu|radeon]: fix memset on io mem
Date: Wed, 16 Dec 2020 21:00:57 +0800	[thread overview]
Message-ID: <202012162026.S0TmFhky-lkp@intel.com> (raw)
In-Reply-To: <877dpiz4sf.wl-chenli@uniontech.com>

[-- Attachment #1: Type: text/plain, Size: 6117 bytes --]

Hi Chen,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.10 next-20201215]
[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/Chen-Li/drm-amdgpu-radeon-fix-memset-on-io-mem/20201216-165835
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git d01e7f10dae29eba0f9ada82b65d24e035d5b2f9
config: x86_64-randconfig-a002-20201216 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 71601d2ac9954cb59c443cb3ae442cb106df35d4)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/201257d71c519bef0966e555d95bf820512f5a34
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Chen-Li/drm-amdgpu-radeon-fix-memset-on-io-mem/20201216-165835
        git checkout 201257d71c519bef0966e555d95bf820512f5a34
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/radeon/radeon_uvd.c:159:6: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat]
                                    version_major, version_minor, family_id);
                                    ^~~~~~~~~~~~~
   include/drm/drm_print.h:484:29: note: expanded from macro 'DRM_INFO'
           _DRM_PRINTK(, INFO, fmt, ##__VA_ARGS__)
                               ~~~    ^~~~~~~~~~~
   include/drm/drm_print.h:481:53: note: expanded from macro '_DRM_PRINTK'
           printk##once(KERN_##level "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
   drivers/gpu/drm/radeon/radeon_uvd.c:159:21: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat]
                                    version_major, version_minor, family_id);
                                                   ^~~~~~~~~~~~~
   include/drm/drm_print.h:484:29: note: expanded from macro 'DRM_INFO'
           _DRM_PRINTK(, INFO, fmt, ##__VA_ARGS__)
                               ~~~    ^~~~~~~~~~~
   include/drm/drm_print.h:481:53: note: expanded from macro '_DRM_PRINTK'
           printk##once(KERN_##level "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
   drivers/gpu/drm/radeon/radeon_uvd.c:159:36: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat]
                                    version_major, version_minor, family_id);
                                                                  ^~~~~~~~~
   include/drm/drm_print.h:484:29: note: expanded from macro 'DRM_INFO'
           _DRM_PRINTK(, INFO, fmt, ##__VA_ARGS__)
                               ~~~    ^~~~~~~~~~~
   include/drm/drm_print.h:481:53: note: expanded from macro '_DRM_PRINTK'
           printk##once(KERN_##level "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
>> drivers/gpu/drm/radeon/radeon_uvd.c:805:17: warning: variable 'i' is uninitialized when used here [-Wuninitialized]
           memset_io(&msg[i], 0x0, 1013 * sizeof(uint32_t));
                          ^
   drivers/gpu/drm/radeon/radeon_uvd.c:787:10: note: initialize the variable 'i' to silence this warning
           int r, i;
                   ^
                    = 0
   drivers/gpu/drm/radeon/radeon_uvd.c:833:17: warning: variable 'i' is uninitialized when used here [-Wuninitialized]
           memset_io(&msg[i], 0x0, 1020 * sizeof(uint32_t));
                          ^
   drivers/gpu/drm/radeon/radeon_uvd.c:822:10: note: initialize the variable 'i' to silence this warning
           int r, i;
                   ^
                    = 0
   5 warnings generated.


vim +/i +805 drivers/gpu/drm/radeon/radeon_uvd.c

   771	
   772	/*
   773	 * multiple fence commands without any stream commands in between can
   774	 * crash the vcpu so just try to emmit a dummy create/destroy msg to
   775	 * avoid this
   776	 */
   777	int radeon_uvd_get_create_msg(struct radeon_device *rdev, int ring,
   778				      uint32_t handle, struct radeon_fence **fence)
   779	{
   780		/* we use the last page of the vcpu bo for the UVD message */
   781		uint64_t offs = radeon_bo_size(rdev->uvd.vcpu_bo) -
   782			RADEON_GPU_PAGE_SIZE;
   783	
   784		uint32_t *msg = rdev->uvd.cpu_addr + offs;
   785		uint64_t addr = rdev->uvd.gpu_addr + offs;
   786	
   787		int r, i;
   788	
   789		r = radeon_bo_reserve(rdev->uvd.vcpu_bo, true);
   790		if (r)
   791			return r;
   792	
   793		/* stitch together an UVD create msg */
   794		msg[0] = cpu_to_le32(0x00000de4);
   795		msg[1] = cpu_to_le32(0x00000000);
   796		msg[2] = cpu_to_le32(handle);
   797		msg[3] = cpu_to_le32(0x00000000);
   798		msg[4] = cpu_to_le32(0x00000000);
   799		msg[5] = cpu_to_le32(0x00000000);
   800		msg[6] = cpu_to_le32(0x00000000);
   801		msg[7] = cpu_to_le32(0x00000780);
   802		msg[8] = cpu_to_le32(0x00000440);
   803		msg[9] = cpu_to_le32(0x00000000);
   804		msg[10] = cpu_to_le32(0x01b37000);
 > 805		memset_io(&msg[i], 0x0, 1013 * sizeof(uint32_t));
   806	
   807		r = radeon_uvd_send_msg(rdev, ring, addr, fence);
   808		radeon_bo_unreserve(rdev->uvd.vcpu_bo);
   809		return r;
   810	}
   811	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 40358 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
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: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] drm/[amdgpu|radeon]: fix memset on io mem
Date: Wed, 16 Dec 2020 21:00:57 +0800	[thread overview]
Message-ID: <202012162026.S0TmFhky-lkp@intel.com> (raw)
In-Reply-To: <877dpiz4sf.wl-chenli@uniontech.com>

[-- Attachment #1: Type: text/plain, Size: 6241 bytes --]

Hi Chen,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.10 next-20201215]
[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/Chen-Li/drm-amdgpu-radeon-fix-memset-on-io-mem/20201216-165835
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git d01e7f10dae29eba0f9ada82b65d24e035d5b2f9
config: x86_64-randconfig-a002-20201216 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 71601d2ac9954cb59c443cb3ae442cb106df35d4)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/201257d71c519bef0966e555d95bf820512f5a34
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Chen-Li/drm-amdgpu-radeon-fix-memset-on-io-mem/20201216-165835
        git checkout 201257d71c519bef0966e555d95bf820512f5a34
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/radeon/radeon_uvd.c:159:6: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat]
                                    version_major, version_minor, family_id);
                                    ^~~~~~~~~~~~~
   include/drm/drm_print.h:484:29: note: expanded from macro 'DRM_INFO'
           _DRM_PRINTK(, INFO, fmt, ##__VA_ARGS__)
                               ~~~    ^~~~~~~~~~~
   include/drm/drm_print.h:481:53: note: expanded from macro '_DRM_PRINTK'
           printk##once(KERN_##level "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
   drivers/gpu/drm/radeon/radeon_uvd.c:159:21: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat]
                                    version_major, version_minor, family_id);
                                                   ^~~~~~~~~~~~~
   include/drm/drm_print.h:484:29: note: expanded from macro 'DRM_INFO'
           _DRM_PRINTK(, INFO, fmt, ##__VA_ARGS__)
                               ~~~    ^~~~~~~~~~~
   include/drm/drm_print.h:481:53: note: expanded from macro '_DRM_PRINTK'
           printk##once(KERN_##level "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
   drivers/gpu/drm/radeon/radeon_uvd.c:159:36: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat]
                                    version_major, version_minor, family_id);
                                                                  ^~~~~~~~~
   include/drm/drm_print.h:484:29: note: expanded from macro 'DRM_INFO'
           _DRM_PRINTK(, INFO, fmt, ##__VA_ARGS__)
                               ~~~    ^~~~~~~~~~~
   include/drm/drm_print.h:481:53: note: expanded from macro '_DRM_PRINTK'
           printk##once(KERN_##level "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
>> drivers/gpu/drm/radeon/radeon_uvd.c:805:17: warning: variable 'i' is uninitialized when used here [-Wuninitialized]
           memset_io(&msg[i], 0x0, 1013 * sizeof(uint32_t));
                          ^
   drivers/gpu/drm/radeon/radeon_uvd.c:787:10: note: initialize the variable 'i' to silence this warning
           int r, i;
                   ^
                    = 0
   drivers/gpu/drm/radeon/radeon_uvd.c:833:17: warning: variable 'i' is uninitialized when used here [-Wuninitialized]
           memset_io(&msg[i], 0x0, 1020 * sizeof(uint32_t));
                          ^
   drivers/gpu/drm/radeon/radeon_uvd.c:822:10: note: initialize the variable 'i' to silence this warning
           int r, i;
                   ^
                    = 0
   5 warnings generated.


vim +/i +805 drivers/gpu/drm/radeon/radeon_uvd.c

   771	
   772	/*
   773	 * multiple fence commands without any stream commands in between can
   774	 * crash the vcpu so just try to emmit a dummy create/destroy msg to
   775	 * avoid this
   776	 */
   777	int radeon_uvd_get_create_msg(struct radeon_device *rdev, int ring,
   778				      uint32_t handle, struct radeon_fence **fence)
   779	{
   780		/* we use the last page of the vcpu bo for the UVD message */
   781		uint64_t offs = radeon_bo_size(rdev->uvd.vcpu_bo) -
   782			RADEON_GPU_PAGE_SIZE;
   783	
   784		uint32_t *msg = rdev->uvd.cpu_addr + offs;
   785		uint64_t addr = rdev->uvd.gpu_addr + offs;
   786	
   787		int r, i;
   788	
   789		r = radeon_bo_reserve(rdev->uvd.vcpu_bo, true);
   790		if (r)
   791			return r;
   792	
   793		/* stitch together an UVD create msg */
   794		msg[0] = cpu_to_le32(0x00000de4);
   795		msg[1] = cpu_to_le32(0x00000000);
   796		msg[2] = cpu_to_le32(handle);
   797		msg[3] = cpu_to_le32(0x00000000);
   798		msg[4] = cpu_to_le32(0x00000000);
   799		msg[5] = cpu_to_le32(0x00000000);
   800		msg[6] = cpu_to_le32(0x00000000);
   801		msg[7] = cpu_to_le32(0x00000780);
   802		msg[8] = cpu_to_le32(0x00000440);
   803		msg[9] = cpu_to_le32(0x00000000);
   804		msg[10] = cpu_to_le32(0x01b37000);
 > 805		memset_io(&msg[i], 0x0, 1013 * sizeof(uint32_t));
   806	
   807		r = radeon_uvd_send_msg(rdev, ring, addr, fence);
   808		radeon_bo_unreserve(rdev->uvd.vcpu_bo);
   809		return r;
   810	}
   811	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 40358 bytes --]

  parent reply	other threads:[~2020-12-16 13:01 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-16  5:41 [PATCH] drm/[amdgpu|radeon]: fix memset on io mem Chen Li
2020-12-16  7:59 ` Christian König
2020-12-16 13:48   ` Chen Li
2020-12-16 14:19     ` Christian König
2020-12-17  1:07       ` Chen Li
2020-12-17 10:25         ` Christian König
2020-12-17 13:37           ` Chen Li
2020-12-17 14:16             ` Christian König
2020-12-18  3:51               ` Chen Li
2020-12-18  8:10                 ` Christian König
2020-12-18  8:52                   ` Chen Li
2020-12-18 10:41                     ` Christian König
2020-12-17 13:45           ` Robin Murphy
2020-12-17 14:02             ` Christian König
2020-12-17 14:18               ` Lucas Stach
2020-12-18 14:17               ` Robin Murphy
2020-12-18 14:33                 ` Christian König
2020-12-18 15:19                   ` Robin Murphy
2020-12-18  6:14             ` Chen Li
2020-12-18 14:42               ` Robin Murphy
2020-12-16 12:52 ` Dan Carpenter
2020-12-16 12:52   ` [kbuild] " Dan Carpenter
2020-12-16 12:52   ` Dan Carpenter
2020-12-16 13:00 ` kernel test robot [this message]
2020-12-16 13:00   ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-12-16 12:12 kernel test robot

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=202012162026.S0TmFhky-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alexander.deucher@amd.com \
    --cc=chenli@uniontech.com \
    --cc=christian.koenig@amd.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kbuild-all@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.