CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Ben Skeggs <bske...@redhat.com>
CC: Lyude Paul <ly...@redhat.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   729e3d091984487f7aa1ebfabfe594e5b317ed0f
commit: 8b9d5d63a7193156b6b397c4f5078efbc200695f drm/nouveau/bo: split buffer 
move functions into their own source files
date:   7 weeks ago
:::::: branch date: 10 hours ago
:::::: commit date: 7 weeks ago
config: riscv-randconfig-m031-20200911 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <l...@intel.com>
Reported-by: Dan Carpenter <dan.carpen...@oracle.com>

smatch warnings:
drivers/gpu/drm/nouveau/nouveau_bo5039.c:39 nv50_bo_move_m2mf() warn: should 
'new_reg->num_pages << (12)' be a 64 bit type?

# 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8b9d5d63a7193156b6b397c4f5078efbc200695f
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 8b9d5d63a7193156b6b397c4f5078efbc200695f
vim +39 drivers/gpu/drm/nouveau/nouveau_bo5039.c

8b9d5d63a71931 Ben Skeggs 2020-06-22   33  
8b9d5d63a71931 Ben Skeggs 2020-06-22   34  int
8b9d5d63a71931 Ben Skeggs 2020-06-22   35  nv50_bo_move_m2mf(struct 
nouveau_channel *chan, struct ttm_buffer_object *bo,
8b9d5d63a71931 Ben Skeggs 2020-06-22   36                 struct ttm_mem_reg 
*old_reg, struct ttm_mem_reg *new_reg)
8b9d5d63a71931 Ben Skeggs 2020-06-22   37  {
8b9d5d63a71931 Ben Skeggs 2020-06-22   38       struct nouveau_mem *mem = 
nouveau_mem(old_reg);
8b9d5d63a71931 Ben Skeggs 2020-06-22  @39       u64 length = 
(new_reg->num_pages << PAGE_SHIFT);
8b9d5d63a71931 Ben Skeggs 2020-06-22   40       u64 src_offset = 
mem->vma[0].addr;
8b9d5d63a71931 Ben Skeggs 2020-06-22   41       u64 dst_offset = 
mem->vma[1].addr;
8b9d5d63a71931 Ben Skeggs 2020-06-22   42       int src_tiled = !!mem->kind;
8b9d5d63a71931 Ben Skeggs 2020-06-22   43       int dst_tiled = 
!!nouveau_mem(new_reg)->kind;
8b9d5d63a71931 Ben Skeggs 2020-06-22   44       int ret;
8b9d5d63a71931 Ben Skeggs 2020-06-22   45  
8b9d5d63a71931 Ben Skeggs 2020-06-22   46       while (length) {
8b9d5d63a71931 Ben Skeggs 2020-06-22   47               u32 amount, stride, 
height;
8b9d5d63a71931 Ben Skeggs 2020-06-22   48  
8b9d5d63a71931 Ben Skeggs 2020-06-22   49               ret = RING_SPACE(chan, 
18 + 6 * (src_tiled + dst_tiled));
8b9d5d63a71931 Ben Skeggs 2020-06-22   50               if (ret)
8b9d5d63a71931 Ben Skeggs 2020-06-22   51                       return ret;
8b9d5d63a71931 Ben Skeggs 2020-06-22   52  
8b9d5d63a71931 Ben Skeggs 2020-06-22   53               amount  = min(length, 
(u64)(4 * 1024 * 1024));
8b9d5d63a71931 Ben Skeggs 2020-06-22   54               stride  = 16 * 4;
8b9d5d63a71931 Ben Skeggs 2020-06-22   55               height  = amount / 
stride;
8b9d5d63a71931 Ben Skeggs 2020-06-22   56  
8b9d5d63a71931 Ben Skeggs 2020-06-22   57               if (src_tiled) {
8b9d5d63a71931 Ben Skeggs 2020-06-22   58                       
BEGIN_NV04(chan, NvSubCopy, 0x0200, 7);
8b9d5d63a71931 Ben Skeggs 2020-06-22   59                       OUT_RING  
(chan, 0);
8b9d5d63a71931 Ben Skeggs 2020-06-22   60                       OUT_RING  
(chan, 0);
8b9d5d63a71931 Ben Skeggs 2020-06-22   61                       OUT_RING  
(chan, stride);
8b9d5d63a71931 Ben Skeggs 2020-06-22   62                       OUT_RING  
(chan, height);
8b9d5d63a71931 Ben Skeggs 2020-06-22   63                       OUT_RING  
(chan, 1);
8b9d5d63a71931 Ben Skeggs 2020-06-22   64                       OUT_RING  
(chan, 0);
8b9d5d63a71931 Ben Skeggs 2020-06-22   65                       OUT_RING  
(chan, 0);
8b9d5d63a71931 Ben Skeggs 2020-06-22   66               } else {
8b9d5d63a71931 Ben Skeggs 2020-06-22   67                       
BEGIN_NV04(chan, NvSubCopy, 0x0200, 1);
8b9d5d63a71931 Ben Skeggs 2020-06-22   68                       OUT_RING  
(chan, 1);
8b9d5d63a71931 Ben Skeggs 2020-06-22   69               }
8b9d5d63a71931 Ben Skeggs 2020-06-22   70               if (dst_tiled) {
8b9d5d63a71931 Ben Skeggs 2020-06-22   71                       
BEGIN_NV04(chan, NvSubCopy, 0x021c, 7);
8b9d5d63a71931 Ben Skeggs 2020-06-22   72                       OUT_RING  
(chan, 0);
8b9d5d63a71931 Ben Skeggs 2020-06-22   73                       OUT_RING  
(chan, 0);
8b9d5d63a71931 Ben Skeggs 2020-06-22   74                       OUT_RING  
(chan, stride);
8b9d5d63a71931 Ben Skeggs 2020-06-22   75                       OUT_RING  
(chan, height);
8b9d5d63a71931 Ben Skeggs 2020-06-22   76                       OUT_RING  
(chan, 1);
8b9d5d63a71931 Ben Skeggs 2020-06-22   77                       OUT_RING  
(chan, 0);
8b9d5d63a71931 Ben Skeggs 2020-06-22   78                       OUT_RING  
(chan, 0);
8b9d5d63a71931 Ben Skeggs 2020-06-22   79               } else {
8b9d5d63a71931 Ben Skeggs 2020-06-22   80                       
BEGIN_NV04(chan, NvSubCopy, 0x021c, 1);
8b9d5d63a71931 Ben Skeggs 2020-06-22   81                       OUT_RING  
(chan, 1);
8b9d5d63a71931 Ben Skeggs 2020-06-22   82               }
8b9d5d63a71931 Ben Skeggs 2020-06-22   83  
8b9d5d63a71931 Ben Skeggs 2020-06-22   84               BEGIN_NV04(chan, 
NvSubCopy, 0x0238, 2);
8b9d5d63a71931 Ben Skeggs 2020-06-22   85               OUT_RING  (chan, 
upper_32_bits(src_offset));
8b9d5d63a71931 Ben Skeggs 2020-06-22   86               OUT_RING  (chan, 
upper_32_bits(dst_offset));
8b9d5d63a71931 Ben Skeggs 2020-06-22   87               BEGIN_NV04(chan, 
NvSubCopy, 0x030c, 8);
8b9d5d63a71931 Ben Skeggs 2020-06-22   88               OUT_RING  (chan, 
lower_32_bits(src_offset));
8b9d5d63a71931 Ben Skeggs 2020-06-22   89               OUT_RING  (chan, 
lower_32_bits(dst_offset));
8b9d5d63a71931 Ben Skeggs 2020-06-22   90               OUT_RING  (chan, 
stride);
8b9d5d63a71931 Ben Skeggs 2020-06-22   91               OUT_RING  (chan, 
stride);
8b9d5d63a71931 Ben Skeggs 2020-06-22   92               OUT_RING  (chan, 
stride);
8b9d5d63a71931 Ben Skeggs 2020-06-22   93               OUT_RING  (chan, 
height);
8b9d5d63a71931 Ben Skeggs 2020-06-22   94               OUT_RING  (chan, 
0x00000101);
8b9d5d63a71931 Ben Skeggs 2020-06-22   95               OUT_RING  (chan, 
0x00000000);
8b9d5d63a71931 Ben Skeggs 2020-06-22   96               BEGIN_NV04(chan, 
NvSubCopy, NV_MEMORY_TO_MEMORY_FORMAT_NOP, 1);
8b9d5d63a71931 Ben Skeggs 2020-06-22   97               OUT_RING  (chan, 0);
8b9d5d63a71931 Ben Skeggs 2020-06-22   98  
8b9d5d63a71931 Ben Skeggs 2020-06-22   99               length -= amount;
8b9d5d63a71931 Ben Skeggs 2020-06-22  100               src_offset += amount;
8b9d5d63a71931 Ben Skeggs 2020-06-22  101               dst_offset += amount;
8b9d5d63a71931 Ben Skeggs 2020-06-22  102       }
8b9d5d63a71931 Ben Skeggs 2020-06-22  103  
8b9d5d63a71931 Ben Skeggs 2020-06-22  104       return 0;
8b9d5d63a71931 Ben Skeggs 2020-06-22  105  }
8b9d5d63a71931 Ben Skeggs 2020-06-22  106  

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org

Reply via email to