* drivers/gpu/drm/nouveau/nouveau_bo5039.c:39 nv50_bo_move_m2mf() warn: should 'new_reg->num_pages << (12)' be a 64 bit
@ 2020-09-12 6:52 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-09-12 6:52 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 6540 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Ben Skeggs <bskeggs@redhat.com>
CC: Lyude Paul <lyude@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 <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@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-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 26271 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* drivers/gpu/drm/nouveau/nouveau_bo5039.c:39 nv50_bo_move_m2mf() warn: should 'new_reg->num_pages << (12)' be a 64 bit
@ 2021-01-26 6:32 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-01-26 6:32 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 6241 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Ben Skeggs <bskeggs@redhat.com>
CC: Lyude Paul <lyude@redhat.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 13391c60da3308ed9980de0168f74cce6c62ac1d
commit: 8b9d5d63a7193156b6b397c4f5078efbc200695f drm/nouveau/bo: split buffer move functions into their own source files
date: 6 months ago
:::::: branch date: 7 hours ago
:::::: commit date: 6 months ago
config: riscv-randconfig-m031-20210125 (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 <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@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?
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-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 43763 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* drivers/gpu/drm/nouveau/nouveau_bo5039.c:39 nv50_bo_move_m2mf() warn: should 'new_reg->num_pages << 12' be a 64 bit
@ 2020-08-07 17:43 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-08-07 17:43 UTC (permalink / raw)
To: Ben Skeggs; +Cc: kbuild-all, linux-kernel, Lyude Paul
[-- Attachment #1: Type: text/plain, Size: 3215 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 86cfccb66937dd6cbf26ed619958b9e587e6a115
commit: 8b9d5d63a7193156b6b397c4f5078efbc200695f drm/nouveau/bo: split buffer move functions into their own source files
date: 2 weeks ago
config: i386-randconfig-m021-20200807 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.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?
vim +39 drivers/gpu/drm/nouveau/nouveau_bo5039.c
33
34 int
35 nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
36 struct ttm_mem_reg *old_reg, struct ttm_mem_reg *new_reg)
37 {
38 struct nouveau_mem *mem = nouveau_mem(old_reg);
> 39 u64 length = (new_reg->num_pages << PAGE_SHIFT);
40 u64 src_offset = mem->vma[0].addr;
41 u64 dst_offset = mem->vma[1].addr;
42 int src_tiled = !!mem->kind;
43 int dst_tiled = !!nouveau_mem(new_reg)->kind;
44 int ret;
45
46 while (length) {
47 u32 amount, stride, height;
48
49 ret = RING_SPACE(chan, 18 + 6 * (src_tiled + dst_tiled));
50 if (ret)
51 return ret;
52
53 amount = min(length, (u64)(4 * 1024 * 1024));
54 stride = 16 * 4;
55 height = amount / stride;
56
57 if (src_tiled) {
58 BEGIN_NV04(chan, NvSubCopy, 0x0200, 7);
59 OUT_RING (chan, 0);
60 OUT_RING (chan, 0);
61 OUT_RING (chan, stride);
62 OUT_RING (chan, height);
63 OUT_RING (chan, 1);
64 OUT_RING (chan, 0);
65 OUT_RING (chan, 0);
66 } else {
67 BEGIN_NV04(chan, NvSubCopy, 0x0200, 1);
68 OUT_RING (chan, 1);
69 }
70 if (dst_tiled) {
71 BEGIN_NV04(chan, NvSubCopy, 0x021c, 7);
72 OUT_RING (chan, 0);
73 OUT_RING (chan, 0);
74 OUT_RING (chan, stride);
75 OUT_RING (chan, height);
76 OUT_RING (chan, 1);
77 OUT_RING (chan, 0);
78 OUT_RING (chan, 0);
79 } else {
80 BEGIN_NV04(chan, NvSubCopy, 0x021c, 1);
81 OUT_RING (chan, 1);
82 }
83
84 BEGIN_NV04(chan, NvSubCopy, 0x0238, 2);
85 OUT_RING (chan, upper_32_bits(src_offset));
86 OUT_RING (chan, upper_32_bits(dst_offset));
87 BEGIN_NV04(chan, NvSubCopy, 0x030c, 8);
88 OUT_RING (chan, lower_32_bits(src_offset));
89 OUT_RING (chan, lower_32_bits(dst_offset));
90 OUT_RING (chan, stride);
91 OUT_RING (chan, stride);
92 OUT_RING (chan, stride);
93 OUT_RING (chan, height);
94 OUT_RING (chan, 0x00000101);
95 OUT_RING (chan, 0x00000000);
96 BEGIN_NV04(chan, NvSubCopy, NV_MEMORY_TO_MEMORY_FORMAT_NOP, 1);
97 OUT_RING (chan, 0);
98
99 length -= amount;
100 src_offset += amount;
101 dst_offset += amount;
102 }
103
104 return 0;
105 }
106
---
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: 35736 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* drivers/gpu/drm/nouveau/nouveau_bo5039.c:39 nv50_bo_move_m2mf() warn: should 'new_reg->num_pages << 12' be a 64 bit
@ 2020-08-07 17:43 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-08-07 17:43 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3310 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 86cfccb66937dd6cbf26ed619958b9e587e6a115
commit: 8b9d5d63a7193156b6b397c4f5078efbc200695f drm/nouveau/bo: split buffer move functions into their own source files
date: 2 weeks ago
config: i386-randconfig-m021-20200807 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.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?
vim +39 drivers/gpu/drm/nouveau/nouveau_bo5039.c
33
34 int
35 nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
36 struct ttm_mem_reg *old_reg, struct ttm_mem_reg *new_reg)
37 {
38 struct nouveau_mem *mem = nouveau_mem(old_reg);
> 39 u64 length = (new_reg->num_pages << PAGE_SHIFT);
40 u64 src_offset = mem->vma[0].addr;
41 u64 dst_offset = mem->vma[1].addr;
42 int src_tiled = !!mem->kind;
43 int dst_tiled = !!nouveau_mem(new_reg)->kind;
44 int ret;
45
46 while (length) {
47 u32 amount, stride, height;
48
49 ret = RING_SPACE(chan, 18 + 6 * (src_tiled + dst_tiled));
50 if (ret)
51 return ret;
52
53 amount = min(length, (u64)(4 * 1024 * 1024));
54 stride = 16 * 4;
55 height = amount / stride;
56
57 if (src_tiled) {
58 BEGIN_NV04(chan, NvSubCopy, 0x0200, 7);
59 OUT_RING (chan, 0);
60 OUT_RING (chan, 0);
61 OUT_RING (chan, stride);
62 OUT_RING (chan, height);
63 OUT_RING (chan, 1);
64 OUT_RING (chan, 0);
65 OUT_RING (chan, 0);
66 } else {
67 BEGIN_NV04(chan, NvSubCopy, 0x0200, 1);
68 OUT_RING (chan, 1);
69 }
70 if (dst_tiled) {
71 BEGIN_NV04(chan, NvSubCopy, 0x021c, 7);
72 OUT_RING (chan, 0);
73 OUT_RING (chan, 0);
74 OUT_RING (chan, stride);
75 OUT_RING (chan, height);
76 OUT_RING (chan, 1);
77 OUT_RING (chan, 0);
78 OUT_RING (chan, 0);
79 } else {
80 BEGIN_NV04(chan, NvSubCopy, 0x021c, 1);
81 OUT_RING (chan, 1);
82 }
83
84 BEGIN_NV04(chan, NvSubCopy, 0x0238, 2);
85 OUT_RING (chan, upper_32_bits(src_offset));
86 OUT_RING (chan, upper_32_bits(dst_offset));
87 BEGIN_NV04(chan, NvSubCopy, 0x030c, 8);
88 OUT_RING (chan, lower_32_bits(src_offset));
89 OUT_RING (chan, lower_32_bits(dst_offset));
90 OUT_RING (chan, stride);
91 OUT_RING (chan, stride);
92 OUT_RING (chan, stride);
93 OUT_RING (chan, height);
94 OUT_RING (chan, 0x00000101);
95 OUT_RING (chan, 0x00000000);
96 BEGIN_NV04(chan, NvSubCopy, NV_MEMORY_TO_MEMORY_FORMAT_NOP, 1);
97 OUT_RING (chan, 0);
98
99 length -= amount;
100 src_offset += amount;
101 dst_offset += amount;
102 }
103
104 return 0;
105 }
106
---
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: 35736 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-26 6:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-12 6:52 drivers/gpu/drm/nouveau/nouveau_bo5039.c:39 nv50_bo_move_m2mf() warn: should 'new_reg->num_pages << (12)' be a 64 bit kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-01-26 6:32 kernel test robot
2020-08-07 17:43 drivers/gpu/drm/nouveau/nouveau_bo5039.c:39 nv50_bo_move_m2mf() warn: should 'new_reg->num_pages << 12' " kernel test robot
2020-08-07 17:43 ` kernel test robot
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.