[drm-tip:drm-tip 6/10] drivers/gpu/drm/nouveau/nouveau_bo.c:750:25: error: incompatible function pointer types initializing 'int nouveau_channel struct ttm_buffer_object struct ttm_resource struct ttm_resource with an expression of type 'int (struct nouv...

kernel test robot lkp at intel.com
Thu Aug 6 12:22:05 UTC 2020


tree:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
head:   f39035176cb854c6d620af7614a60a485ee26818
commit: ad11f45fae37631b0482ebf6543bdd013d3f9336 [6/10] Merge remote-tracking branch 'drm-misc/drm-misc-next' into drm-tip
config: x86_64-randconfig-a015-20200806 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 076b120bebfd727b502208601012a44ab2e1028e)
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
        git checkout ad11f45fae37631b0482ebf6543bdd013d3f9336
        # 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 at intel.com>

All error/warnings (new ones prefixed by >>):

   In file included from drivers/gpu/drm/nouveau/nouveau_drm.c:52:
   In file included from drivers/gpu/drm/nouveau/nouveau_dma.h:30:
>> drivers/gpu/drm/nouveau/nouveau_bo.h:142:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:146:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:149:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:152:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:156:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:159:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:163:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   7 warnings generated.
--
   In file included from drivers/gpu/drm/nouveau/nouveau_bo.c:37:
>> drivers/gpu/drm/nouveau/nouveau_bo.h:142:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:146:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:149:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:152:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:156:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:159:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:163:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
>> drivers/gpu/drm/nouveau/nouveau_bo.c:750:25: error: incompatible function pointer types initializing 'int (*)(struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_resource *, struct ttm_resource *)' with an expression of type 'int (struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_mem_reg *, struct ttm_mem_reg *)' [-Werror,-Wincompatible-function-pointer-types]
                   {  "COPY", 4, 0xc5b5, nve0_bo_move_copy, nve0_bo_move_init },
                                         ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nouveau_bo.c:751:25: error: incompatible function pointer types initializing 'int (*)(struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_resource *, struct ttm_resource *)' with an expression of type 'int (struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_mem_reg *, struct ttm_mem_reg *)' [-Werror,-Wincompatible-function-pointer-types]
                   {  "GRCE", 0, 0xc5b5, nve0_bo_move_copy, nvc0_bo_move_init },
                                         ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nouveau_bo.c:752:25: error: incompatible function pointer types initializing 'int (*)(struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_resource *, struct ttm_resource *)' with an expression of type 'int (struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_mem_reg *, struct ttm_mem_reg *)' [-Werror,-Wincompatible-function-pointer-types]
                   {  "COPY", 4, 0xc3b5, nve0_bo_move_copy, nve0_bo_move_init },
                                         ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nouveau_bo.c:753:25: error: incompatible function pointer types initializing 'int (*)(struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_resource *, struct ttm_resource *)' with an expression of type 'int (struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_mem_reg *, struct ttm_mem_reg *)' [-Werror,-Wincompatible-function-pointer-types]
                   {  "GRCE", 0, 0xc3b5, nve0_bo_move_copy, nvc0_bo_move_init },
                                         ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nouveau_bo.c:754:25: error: incompatible function pointer types initializing 'int (*)(struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_resource *, struct ttm_resource *)' with an expression of type 'int (struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_mem_reg *, struct ttm_mem_reg *)' [-Werror,-Wincompatible-function-pointer-types]
                   {  "COPY", 4, 0xc1b5, nve0_bo_move_copy, nve0_bo_move_init },
                                         ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nouveau_bo.c:755:25: error: incompatible function pointer types initializing 'int (*)(struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_resource *, struct ttm_resource *)' with an expression of type 'int (struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_mem_reg *, struct ttm_mem_reg *)' [-Werror,-Wincompatible-function-pointer-types]
                   {  "GRCE", 0, 0xc1b5, nve0_bo_move_copy, nvc0_bo_move_init },
                                         ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nouveau_bo.c:756:25: error: incompatible function pointer types initializing 'int (*)(struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_resource *, struct ttm_resource *)' with an expression of type 'int (struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_mem_reg *, struct ttm_mem_reg *)' [-Werror,-Wincompatible-function-pointer-types]
                   {  "COPY", 4, 0xc0b5, nve0_bo_move_copy, nve0_bo_move_init },
                                         ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nouveau_bo.c:757:25: error: incompatible function pointer types initializing 'int (*)(struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_resource *, struct ttm_resource *)' with an expression of type 'int (struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_mem_reg *, struct ttm_mem_reg *)' [-Werror,-Wincompatible-function-pointer-types]
                   {  "GRCE", 0, 0xc0b5, nve0_bo_move_copy, nvc0_bo_move_init },
                                         ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nouveau_bo.c:758:25: error: incompatible function pointer types initializing 'int (*)(struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_resource *, struct ttm_resource *)' with an expression of type 'int (struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_mem_reg *, struct ttm_mem_reg *)' [-Werror,-Wincompatible-function-pointer-types]
                   {  "COPY", 4, 0xb0b5, nve0_bo_move_copy, nve0_bo_move_init },
                                         ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nouveau_bo.c:759:25: error: incompatible function pointer types initializing 'int (*)(struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_resource *, struct ttm_resource *)' with an expression of type 'int (struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_mem_reg *, struct ttm_mem_reg *)' [-Werror,-Wincompatible-function-pointer-types]
                   {  "GRCE", 0, 0xb0b5, nve0_bo_move_copy, nvc0_bo_move_init },
                                         ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nouveau_bo.c:760:25: error: incompatible function pointer types initializing 'int (*)(struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_resource *, struct ttm_resource *)' with an expression of type 'int (struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_mem_reg *, struct ttm_mem_reg *)' [-Werror,-Wincompatible-function-pointer-types]
                   {  "COPY", 4, 0xa0b5, nve0_bo_move_copy, nve0_bo_move_init },
                                         ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nouveau_bo.c:761:25: error: incompatible function pointer types initializing 'int (*)(struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_resource *, struct ttm_resource *)' with an expression of type 'int (struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_mem_reg *, struct ttm_mem_reg *)' [-Werror,-Wincompatible-function-pointer-types]
                   {  "GRCE", 0, 0xa0b5, nve0_bo_move_copy, nvc0_bo_move_init },
                                         ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nouveau_bo.c:762:25: error: incompatible function pointer types initializing 'int (*)(struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_resource *, struct ttm_resource *)' with an expression of type 'int (struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_mem_reg *, struct ttm_mem_reg *)' [-Werror,-Wincompatible-function-pointer-types]
                   { "COPY1", 5, 0x90b8, nvc0_bo_move_copy, nvc0_bo_move_init },
                                         ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nouveau_bo.c:763:25: error: incompatible function pointer types initializing 'int (*)(struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_resource *, struct ttm_resource *)' with an expression of type 'int (struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_mem_reg *, struct ttm_mem_reg *)' [-Werror,-Wincompatible-function-pointer-types]
                   { "COPY0", 4, 0x90b5, nvc0_bo_move_copy, nvc0_bo_move_init },
                                         ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nouveau_bo.c:764:25: error: incompatible function pointer types initializing 'int (*)(struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_resource *, struct ttm_resource *)' with an expression of type 'int (struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_mem_reg *, struct ttm_mem_reg *)' [-Werror,-Wincompatible-function-pointer-types]
                   {  "COPY", 0, 0x85b5, nva3_bo_move_copy, nv50_bo_move_init },
                                         ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nouveau_bo.c:765:25: error: incompatible function pointer types initializing 'int (*)(struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_resource *, struct ttm_resource *)' with an expression of type 'int (struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_mem_reg *, struct ttm_mem_reg *)' [-Werror,-Wincompatible-function-pointer-types]
                   { "CRYPT", 0, 0x74c1, nv84_bo_move_exec, nv50_bo_move_init },
                                         ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nouveau_bo.c:766:25: error: incompatible function pointer types initializing 'int (*)(struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_resource *, struct ttm_resource *)' with an expression of type 'int (struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_mem_reg *, struct ttm_mem_reg *)' [-Werror,-Wincompatible-function-pointer-types]
                   {  "M2MF", 0, 0x9039, nvc0_bo_move_m2mf, nvc0_bo_move_init },
                                         ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nouveau_bo.c:767:25: error: incompatible function pointer types initializing 'int (*)(struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_resource *, struct ttm_resource *)' with an expression of type 'int (struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_mem_reg *, struct ttm_mem_reg *)' [-Werror,-Wincompatible-function-pointer-types]
                   {  "M2MF", 0, 0x5039, nv50_bo_move_m2mf, nv50_bo_move_init },
                                         ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nouveau_bo.c:768:25: error: incompatible function pointer types initializing 'int (*)(struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_resource *, struct ttm_resource *)' with an expression of type 'int (struct nouveau_channel *, struct ttm_buffer_object *, struct ttm_mem_reg *, struct ttm_mem_reg *)' [-Werror,-Wincompatible-function-pointer-types]
                   {  "M2MF", 0, 0x0039, nv04_bo_move_m2mf, nv04_bo_move_init },
                                         ^~~~~~~~~~~~~~~~~
   7 warnings and 19 errors generated.
--
   In file included from drivers/gpu/drm/nouveau/nouveau_bo0039.c:29:
>> drivers/gpu/drm/nouveau/nouveau_bo.h:142:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:146:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:149:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:152:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:156:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:159:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:163:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
>> drivers/gpu/drm/nouveau/nouveau_bo0039.c:39:46: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct nouveau_channel *chan, struct ttm_mem_reg *reg)
                                                              ^
>> drivers/gpu/drm/nouveau/nouveau_bo0039.c:41:9: error: incomplete definition of type 'struct ttm_mem_reg'
           if (reg->mem_type == TTM_PL_TT)
               ~~~^
   drivers/gpu/drm/nouveau/nouveau_bo0039.c:39:46: note: forward declaration of 'struct ttm_mem_reg'
                         struct nouveau_channel *chan, struct ttm_mem_reg *reg)
                                                              ^
   drivers/gpu/drm/nouveau/nouveau_bo0039.c:48:12: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                     struct ttm_mem_reg *old_reg, struct ttm_mem_reg *new_reg)
                            ^
>> drivers/gpu/drm/nouveau/nouveau_bo0039.c:47:1: error: conflicting types for 'nv04_bo_move_m2mf'
   nv04_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
   ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:141:5: note: previous declaration is here
   int nv04_bo_move_m2mf(struct nouveau_channel *, struct ttm_buffer_object *,
       ^
>> drivers/gpu/drm/nouveau/nouveau_bo0039.c:51:51: error: incompatible pointer types passing 'struct ttm_mem_reg *' to parameter of type 'struct ttm_mem_reg *' [-Werror,-Wincompatible-pointer-types]
           u32 src_ctxdma = nouveau_bo_mem_ctxdma(bo, chan, old_reg);
                                                            ^~~~~~~
   drivers/gpu/drm/nouveau/nouveau_bo0039.c:39:59: note: passing argument to parameter 'reg' here
                         struct nouveau_channel *chan, struct ttm_mem_reg *reg)
                                                                           ^
   drivers/gpu/drm/nouveau/nouveau_bo0039.c:52:26: error: incomplete definition of type 'struct ttm_mem_reg'
           u32 src_offset = old_reg->start << PAGE_SHIFT;
                            ~~~~~~~^
   drivers/gpu/drm/nouveau/nouveau_bo0039.c:48:12: note: forward declaration of 'struct ttm_mem_reg'
                     struct ttm_mem_reg *old_reg, struct ttm_mem_reg *new_reg)
                            ^
   drivers/gpu/drm/nouveau/nouveau_bo0039.c:53:51: error: incompatible pointer types passing 'struct ttm_mem_reg *' to parameter of type 'struct ttm_mem_reg *' [-Werror,-Wincompatible-pointer-types]
           u32 dst_ctxdma = nouveau_bo_mem_ctxdma(bo, chan, new_reg);
                                                            ^~~~~~~
   drivers/gpu/drm/nouveau/nouveau_bo0039.c:39:59: note: passing argument to parameter 'reg' here
                         struct nouveau_channel *chan, struct ttm_mem_reg *reg)
                                                                           ^
   drivers/gpu/drm/nouveau/nouveau_bo0039.c:54:26: error: incomplete definition of type 'struct ttm_mem_reg'
           u32 dst_offset = new_reg->start << PAGE_SHIFT;
                            ~~~~~~~^
   drivers/gpu/drm/nouveau/nouveau_bo0039.c:48:12: note: forward declaration of 'struct ttm_mem_reg'
                     struct ttm_mem_reg *old_reg, struct ttm_mem_reg *new_reg)
                            ^
   drivers/gpu/drm/nouveau/nouveau_bo0039.c:55:26: error: incomplete definition of type 'struct ttm_mem_reg'
           u32 page_count = new_reg->num_pages;
                            ~~~~~~~^
   drivers/gpu/drm/nouveau/nouveau_bo0039.c:48:12: note: forward declaration of 'struct ttm_mem_reg'
                     struct ttm_mem_reg *old_reg, struct ttm_mem_reg *new_reg)
                            ^
   drivers/gpu/drm/nouveau/nouveau_bo0039.c:65:22: error: incomplete definition of type 'struct ttm_mem_reg'
           page_count = new_reg->num_pages;
                        ~~~~~~~^
   drivers/gpu/drm/nouveau/nouveau_bo0039.c:48:12: note: forward declaration of 'struct ttm_mem_reg'
                     struct ttm_mem_reg *old_reg, struct ttm_mem_reg *new_reg)
                            ^
   9 warnings and 8 errors generated.
--
   In file included from drivers/gpu/drm/nouveau/nouveau_bo5039.c:29:
>> drivers/gpu/drm/nouveau/nouveau_bo.h:142:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:146:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:149:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:152:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:156:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:159:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:163:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
>> drivers/gpu/drm/nouveau/nouveau_bo5039.c:40:12: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                     struct ttm_mem_reg *old_reg, struct ttm_mem_reg *new_reg)
                            ^
>> drivers/gpu/drm/nouveau/nouveau_bo5039.c:39:1: error: conflicting types for 'nv50_bo_move_m2mf'
   nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
   ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:145:5: note: previous declaration is here
   int nv50_bo_move_m2mf(struct nouveau_channel *, struct ttm_buffer_object *,
       ^
>> drivers/gpu/drm/nouveau/nouveau_bo5039.c:42:40: error: incompatible pointer types passing 'struct ttm_mem_reg *' to parameter of type 'struct ttm_resource *' [-Werror,-Wincompatible-pointer-types]
           struct nouveau_mem *mem = nouveau_mem(old_reg);
                                                 ^~~~~~~
   drivers/gpu/drm/nouveau/nouveau_mem.h:10:34: note: passing argument to parameter 'reg' here
   nouveau_mem(struct ttm_resource *reg)
                                    ^
>> drivers/gpu/drm/nouveau/nouveau_bo5039.c:44:23: error: incomplete definition of type 'struct ttm_mem_reg'
           u64 length = (new_reg->num_pages << PAGE_SHIFT);
                         ~~~~~~~^
   drivers/gpu/drm/nouveau/nouveau_bo5039.c:40:12: note: forward declaration of 'struct ttm_mem_reg'
                     struct ttm_mem_reg *old_reg, struct ttm_mem_reg *new_reg)
                            ^
   drivers/gpu/drm/nouveau/nouveau_bo5039.c:48:32: error: incompatible pointer types passing 'struct ttm_mem_reg *' to parameter of type 'struct ttm_resource *' [-Werror,-Wincompatible-pointer-types]
           int dst_tiled = !!nouveau_mem(new_reg)->kind;
                                         ^~~~~~~
   drivers/gpu/drm/nouveau/nouveau_mem.h:10:34: note: passing argument to parameter 'reg' here
   nouveau_mem(struct ttm_resource *reg)
                                    ^
   8 warnings and 4 errors generated.
--
   In file included from drivers/gpu/drm/nouveau/nouveau_bo74c1.c:29:
>> drivers/gpu/drm/nouveau/nouveau_bo.h:142:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:146:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:149:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:152:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:156:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:159:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:163:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
>> drivers/gpu/drm/nouveau/nouveau_bo74c1.c:37:12: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                     struct ttm_mem_reg *old_reg, struct ttm_mem_reg *new_reg)
                            ^
>> drivers/gpu/drm/nouveau/nouveau_bo74c1.c:36:1: error: conflicting types for 'nv84_bo_move_exec'
   nv84_bo_move_exec(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
   ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:148:5: note: previous declaration is here
   int nv84_bo_move_exec(struct nouveau_channel *, struct ttm_buffer_object *,
       ^
>> drivers/gpu/drm/nouveau/nouveau_bo74c1.c:39:40: error: incompatible pointer types passing 'struct ttm_mem_reg *' to parameter of type 'struct ttm_resource *' [-Werror,-Wincompatible-pointer-types]
           struct nouveau_mem *mem = nouveau_mem(old_reg);
                                                 ^~~~~~~
   drivers/gpu/drm/nouveau/nouveau_mem.h:10:34: note: passing argument to parameter 'reg' here
   nouveau_mem(struct ttm_resource *reg)
                                    ^
>> drivers/gpu/drm/nouveau/nouveau_bo74c1.c:47:41: error: incomplete definition of type 'struct ttm_mem_reg'
           PUSH_NVSQ(push, NV74C1, 0x0304, new_reg->num_pages << PAGE_SHIFT,
                                           ~~~~~~~^
   drivers/gpu/drm/nouveau/include/nvif/push.h:272:38: note: expanded from macro 'PUSH_NVSQ'
   #define PUSH_NVSQ(A...) PUSH(MTHD, ##A)
                                        ^
   drivers/gpu/drm/nouveau/include/nvif/push.h:262:31: note: expanded from macro 'PUSH'
                               PUSH_1P , PUSH_1D)(, ##A)
                                                      ^
   drivers/gpu/drm/nouveau/include/nvif/push.h:202:19: note: expanded from macro 'PUSH_6D'
                                                X##mA, (dA))
                                                        ^~
   note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   drivers/gpu/drm/nouveau/include/nvif/push.h:128:33: note: expanded from macro 'PUSH_1'
           PUSH_##f(X, (p), X##mA, 1, o, (dA), ds, "");                   \
                                          ^~
   drivers/gpu/drm/nouveau/include/nvif/push.h:91:62: note: expanded from macro 'PUSH_DATA_'
   #define PUSH_DATA_(X,p,m,i0,i1,d,s,f,a...) PUSH_DATA__((p), (d), "-> "#m f, ##a)
                                                                ^
   drivers/gpu/drm/nouveau/include/nvif/push.h:84:12: note: expanded from macro 'PUSH_DATA__'
           u32 _d = (d);                                      \
                     ^
   drivers/gpu/drm/nouveau/nouveau_bo74c1.c:37:12: note: forward declaration of 'struct ttm_mem_reg'
                     struct ttm_mem_reg *old_reg, struct ttm_mem_reg *new_reg)
                            ^
   8 warnings and 3 errors generated.
--
   In file included from drivers/gpu/drm/nouveau/nouveau_bo85b5.c:29:
>> drivers/gpu/drm/nouveau/nouveau_bo.h:142:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:146:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:149:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:152:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:156:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:159:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:163:16: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                         struct ttm_mem_reg *, struct ttm_mem_reg *);
                                ^
>> drivers/gpu/drm/nouveau/nouveau_bo85b5.c:41:12: warning: declaration of 'struct ttm_mem_reg' will not be visible outside of this function [-Wvisibility]
                     struct ttm_mem_reg *old_reg, struct ttm_mem_reg *new_reg)
                            ^
>> drivers/gpu/drm/nouveau/nouveau_bo85b5.c:40:1: error: conflicting types for 'nva3_bo_move_copy'
   nva3_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
   ^
   drivers/gpu/drm/nouveau/nouveau_bo.h:151:5: note: previous declaration is here
   int nva3_bo_move_copy(struct nouveau_channel *, struct ttm_buffer_object *,
       ^
>> drivers/gpu/drm/nouveau/nouveau_bo85b5.c:43:40: error: incompatible pointer types passing 'struct ttm_mem_reg *' to parameter of type 'struct ttm_resource *' [-Werror,-Wincompatible-pointer-types]
           struct nouveau_mem *mem = nouveau_mem(old_reg);
                                                 ^~~~~~~
   drivers/gpu/drm/nouveau/nouveau_mem.h:10:34: note: passing argument to parameter 'reg' here
   nouveau_mem(struct ttm_resource *reg)
                                    ^
>> drivers/gpu/drm/nouveau/nouveau_bo85b5.c:47:26: error: incomplete definition of type 'struct ttm_mem_reg'
           u32 page_count = new_reg->num_pages;
                            ~~~~~~~^
   drivers/gpu/drm/nouveau/nouveau_bo85b5.c:41:12: note: forward declaration of 'struct ttm_mem_reg'
                     struct ttm_mem_reg *old_reg, struct ttm_mem_reg *new_reg)
                            ^
   drivers/gpu/drm/nouveau/nouveau_bo85b5.c:50:22: error: incomplete definition of type 'struct ttm_mem_reg'
           page_count = new_reg->num_pages;
                        ~~~~~~~^
   drivers/gpu/drm/nouveau/nouveau_bo85b5.c:41:12: note: forward declaration of 'struct ttm_mem_reg'
                     struct ttm_mem_reg *old_reg, struct ttm_mem_reg *new_reg)
                            ^
   8 warnings and 4 errors generated.
..

vim +750 drivers/gpu/drm/nouveau/nouveau_bo.c

6ee738610f41b5 Ben Skeggs  2009-12-11  737  
d1b167e168bdac Ben Skeggs  2012-05-04  738  void
49981046e3dc2f Ben Skeggs  2012-08-06  739  nouveau_bo_move_init(struct nouveau_drm *drm)
d1b167e168bdac Ben Skeggs  2012-05-04  740  {
72ecb0a6ce89dd James Jones 2019-12-16  741  	static const struct _method_table {
d1b167e168bdac Ben Skeggs  2012-05-04  742  		const char *name;
1a46098e910b96 Ben Skeggs  2012-05-04  743  		int engine;
315a8b2edf5171 Ben Skeggs  2015-08-20  744  		s32 oclass;
d1b167e168bdac Ben Skeggs  2012-05-04  745  		int (*exec)(struct nouveau_channel *,
d1b167e168bdac Ben Skeggs  2012-05-04  746  			    struct ttm_buffer_object *,
2966141ad2dda2 Dave Airlie 2020-08-04  747  			    struct ttm_resource *, struct ttm_resource *);
d1b167e168bdac Ben Skeggs  2012-05-04  748  		int (*init)(struct nouveau_channel *, u32 handle);
d1b167e168bdac Ben Skeggs  2012-05-04  749  	} _methods[] = {
c36322d23d5d84 Ben Skeggs  2018-12-11 @750  		{  "COPY", 4, 0xc5b5, nve0_bo_move_copy, nve0_bo_move_init },
c36322d23d5d84 Ben Skeggs  2018-12-11  751  		{  "GRCE", 0, 0xc5b5, nve0_bo_move_copy, nvc0_bo_move_init },
6e1f34e33c17f6 Ben Skeggs  2018-05-08  752  		{  "COPY", 4, 0xc3b5, nve0_bo_move_copy, nve0_bo_move_init },
6e1f34e33c17f6 Ben Skeggs  2018-05-08  753  		{  "GRCE", 0, 0xc3b5, nve0_bo_move_copy, nvc0_bo_move_init },
146cfe2476ce37 Ben Skeggs  2016-07-09  754  		{  "COPY", 4, 0xc1b5, nve0_bo_move_copy, nve0_bo_move_init },
146cfe2476ce37 Ben Skeggs  2016-07-09  755  		{  "GRCE", 0, 0xc1b5, nve0_bo_move_copy, nvc0_bo_move_init },
8e7e1586c58a5e Ben Skeggs  2016-07-09  756  		{  "COPY", 4, 0xc0b5, nve0_bo_move_copy, nve0_bo_move_init },
8e7e1586c58a5e Ben Skeggs  2016-07-09  757  		{  "GRCE", 0, 0xc0b5, nve0_bo_move_copy, nvc0_bo_move_init },
990b4547042a94 Ben Skeggs  2015-04-14  758  		{  "COPY", 4, 0xb0b5, nve0_bo_move_copy, nve0_bo_move_init },
990b4547042a94 Ben Skeggs  2015-04-14  759  		{  "GRCE", 0, 0xb0b5, nve0_bo_move_copy, nvc0_bo_move_init },
00fc6f6f731efb Ben Skeggs  2013-07-09  760  		{  "COPY", 4, 0xa0b5, nve0_bo_move_copy, nve0_bo_move_init },
49981046e3dc2f Ben Skeggs  2012-08-06  761  		{  "GRCE", 0, 0xa0b5, nve0_bo_move_copy, nvc0_bo_move_init },
1a46098e910b96 Ben Skeggs  2012-05-04  762  		{ "COPY1", 5, 0x90b8, nvc0_bo_move_copy, nvc0_bo_move_init },
1a46098e910b96 Ben Skeggs  2012-05-04  763  		{ "COPY0", 4, 0x90b5, nvc0_bo_move_copy, nvc0_bo_move_init },
1a46098e910b96 Ben Skeggs  2012-05-04  764  		{  "COPY", 0, 0x85b5, nva3_bo_move_copy, nv50_bo_move_init },
1a46098e910b96 Ben Skeggs  2012-05-04  765  		{ "CRYPT", 0, 0x74c1, nv84_bo_move_exec, nv50_bo_move_init },
1a46098e910b96 Ben Skeggs  2012-05-04  766  		{  "M2MF", 0, 0x9039, nvc0_bo_move_m2mf, nvc0_bo_move_init },
1a46098e910b96 Ben Skeggs  2012-05-04  767  		{  "M2MF", 0, 0x5039, nv50_bo_move_m2mf, nv50_bo_move_init },
1a46098e910b96 Ben Skeggs  2012-05-04  768  		{  "M2MF", 0, 0x0039, nv04_bo_move_m2mf, nv04_bo_move_init },
5490e5dfb9e9d6 Ben Skeggs  2012-05-04  769  		{},
72ecb0a6ce89dd James Jones 2019-12-16  770  	};
72ecb0a6ce89dd James Jones 2019-12-16  771  	const struct _method_table *mthd = _methods;
d1b167e168bdac Ben Skeggs  2012-05-04  772  	const char *name = "CPU";
d1b167e168bdac Ben Skeggs  2012-05-04  773  	int ret;
d1b167e168bdac Ben Skeggs  2012-05-04  774  
d1b167e168bdac Ben Skeggs  2012-05-04  775  	do {
49981046e3dc2f Ben Skeggs  2012-08-06  776  		struct nouveau_channel *chan;
ebb945a94bba2c Ben Skeggs  2012-07-20  777  
00fc6f6f731efb Ben Skeggs  2013-07-09  778  		if (mthd->engine)
49981046e3dc2f Ben Skeggs  2012-08-06  779  			chan = drm->cechan;
49981046e3dc2f Ben Skeggs  2012-08-06  780  		else
49981046e3dc2f Ben Skeggs  2012-08-06  781  			chan = drm->channel;
49981046e3dc2f Ben Skeggs  2012-08-06  782  		if (chan == NULL)
49981046e3dc2f Ben Skeggs  2012-08-06  783  			continue;
49981046e3dc2f Ben Skeggs  2012-08-06  784  
9ac596a4e875e2 Ben Skeggs  2020-03-30  785  		ret = nvif_object_ctor(&chan->user, "ttmBoMove",
0ad72863ea426d Ben Skeggs  2014-08-10  786  				       mthd->oclass | (mthd->engine << 16),
0ad72863ea426d Ben Skeggs  2014-08-10  787  				       mthd->oclass, NULL, 0,
0ad72863ea426d Ben Skeggs  2014-08-10  788  				       &drm->ttm.copy);
d1b167e168bdac Ben Skeggs  2012-05-04  789  		if (ret == 0) {
0ad72863ea426d Ben Skeggs  2014-08-10  790  			ret = mthd->init(chan, drm->ttm.copy.handle);
ebb945a94bba2c Ben Skeggs  2012-07-20  791  			if (ret) {
9ac596a4e875e2 Ben Skeggs  2020-03-30  792  				nvif_object_dtor(&drm->ttm.copy);
ebb945a94bba2c Ben Skeggs  2012-07-20  793  				continue;
ebb945a94bba2c Ben Skeggs  2012-07-20  794  			}
ebb945a94bba2c Ben Skeggs  2012-07-20  795  
ebb945a94bba2c Ben Skeggs  2012-07-20  796  			drm->ttm.move = mthd->exec;
1bb3f6a252c92c Ben Skeggs  2013-07-08  797  			drm->ttm.chan = chan;
d1b167e168bdac Ben Skeggs  2012-05-04  798  			name = mthd->name;
d1b167e168bdac Ben Skeggs  2012-05-04  799  			break;
d1b167e168bdac Ben Skeggs  2012-05-04  800  		}
d1b167e168bdac Ben Skeggs  2012-05-04  801  	} while ((++mthd)->exec);
d1b167e168bdac Ben Skeggs  2012-05-04  802  
ebb945a94bba2c Ben Skeggs  2012-07-20  803  	NV_INFO(drm, "MM: using %s for buffer copies\n", name);
d1b167e168bdac Ben Skeggs  2012-05-04  804  }
d1b167e168bdac Ben Skeggs  2012-05-04  805  

:::::: The code at line 750 was first introduced by commit
:::::: c36322d23d5d84cbe03c93beaa5dd6c705d48122 drm/nouveau/ce/tu104: initial support

:::::: TO: Ben Skeggs <bskeggs at redhat.com>
:::::: CC: Ben Skeggs <bskeggs at redhat.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 33721 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20200806/e4ec383c/attachment-0001.gz>


More information about the dri-devel mailing list