Re: [PATCH 3/4] drm/ttm: drop size from resource manager base class.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dave,

I love your patch! Perhaps something to improve:

[auto build test WARNING on drm-tip/drm-tip]
[cannot apply to drm-intel/for-linux-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next drm-exynos/exynos-drm-next v5.8 next-20200806]
[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/Dave-Airlie/drm-amdgpu-ttm-move-vram-gtt-mgr-allocations-to-mman/20200807-083526
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: arc-randconfig-r005-20200805 (attached as .config)
compiler: arc-elf-gcc (GCC) 9.3.0
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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc 

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

All warnings (new ones prefixed by >>):

   In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h:29,
                    from drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h:26,
                    from drivers/gpu/drm/amd/amdgpu/amdgpu.h:43,
                    from drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:38:
   drivers/gpu/drm/amd/amdgpu/amdgpu_object.c: In function 'amdgpu_bo_validate_size':
>> drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:473:12: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
     473 |  DRM_DEBUG("BO size %lu > total memory in domain: %llu\n", size,
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:490:25: note: in definition of macro 'DRM_DEBUG'
     490 |  __drm_dbg(DRM_UT_CORE, fmt, ##__VA_ARGS__)
         |                         ^~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:473:54: note: format string is defined here
     473 |  DRM_DEBUG("BO size %lu > total memory in domain: %llu\n", size,
         |                                                   ~~~^
         |                                                      |
         |                                                      long long unsigned int
         |                                                   %lu
   In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:38:
   At top level:
   drivers/gpu/drm/amd/amdgpu/amdgpu.h:192:19: warning: 'debug_evictions' defined but not used [-Wunused-const-variable=]
     192 | static const bool debug_evictions; /* = false */
         |                   ^~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu.h:191:18: warning: 'sched_policy' defined but not used [-Wunused-const-variable=]
     191 | static const int sched_policy = KFD_SCHED_POLICY_HWS;
         |                  ^~~~~~~~~~~~
   In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
                    from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
                    from drivers/gpu/drm/amd/amdgpu/../include/dm_pp_interface.h:26,
                    from drivers/gpu/drm/amd/amdgpu/amdgpu.h:65,
                    from drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:38:
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: 'dc_fixpt_ln2_div_2' defined but not used [-Wunused-const-variable=]
      76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
         |                                ^~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: 'dc_fixpt_ln2' defined but not used [-Wunused-const-variable=]
      75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
         |                                ^~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: 'dc_fixpt_e' defined but not used [-Wunused-const-variable=]
      74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
         |                                ^~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: 'dc_fixpt_two_pi' defined but not used [-Wunused-const-variable=]
      73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
         |                                ^~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: 'dc_fixpt_pi' defined but not used [-Wunused-const-variable=]
      72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
         |                                ^~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:67:32: warning: 'dc_fixpt_zero' defined but not used [-Wunused-const-variable=]
      67 | static const struct fixed31_32 dc_fixpt_zero = { 0 };
         |                                ^~~~~~~~~~~~~

vim +473 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

aa1d562e645d254 Junwei Zhang      2016-09-08  440  
79c631239a83aeb Andrey Grodzovsky 2017-11-10  441  /* Validate bo size is bit bigger then the request domain */
79c631239a83aeb Andrey Grodzovsky 2017-11-10  442  static bool amdgpu_bo_validate_size(struct amdgpu_device *adev,
79c631239a83aeb Andrey Grodzovsky 2017-11-10  443  					  unsigned long size, u32 domain)
79c631239a83aeb Andrey Grodzovsky 2017-11-10  444  {
89e1ba9e4973560 Dave Airlie       2020-08-07  445  	unsigned long mgr_size = 0;
79c631239a83aeb Andrey Grodzovsky 2017-11-10  446  	/*
79c631239a83aeb Andrey Grodzovsky 2017-11-10  447  	 * If GTT is part of requested domains the check must succeed to
79c631239a83aeb Andrey Grodzovsky 2017-11-10  448  	 * allow fall back to GTT
79c631239a83aeb Andrey Grodzovsky 2017-11-10  449  	 */
79c631239a83aeb Andrey Grodzovsky 2017-11-10  450  	if (domain & AMDGPU_GEM_DOMAIN_GTT) {
89e1ba9e4973560 Dave Airlie       2020-08-07  451  		mgr_size = to_gtt_mgr(ttm_manager_type(&adev->mman.bdev, TTM_PL_TT))->size;
79c631239a83aeb Andrey Grodzovsky 2017-11-10  452  
89e1ba9e4973560 Dave Airlie       2020-08-07  453  		if (size < (mgr_size << PAGE_SHIFT))
79c631239a83aeb Andrey Grodzovsky 2017-11-10  454  			return true;
79c631239a83aeb Andrey Grodzovsky 2017-11-10  455  		else
79c631239a83aeb Andrey Grodzovsky 2017-11-10  456  			goto fail;
79c631239a83aeb Andrey Grodzovsky 2017-11-10  457  	}
79c631239a83aeb Andrey Grodzovsky 2017-11-10  458  
79c631239a83aeb Andrey Grodzovsky 2017-11-10  459  	if (domain & AMDGPU_GEM_DOMAIN_VRAM) {
89e1ba9e4973560 Dave Airlie       2020-08-07  460  		mgr_size = to_vram_mgr(ttm_manager_type(&adev->mman.bdev, TTM_PL_TT))->size;
79c631239a83aeb Andrey Grodzovsky 2017-11-10  461  
89e1ba9e4973560 Dave Airlie       2020-08-07  462  		if (size < (mgr_size << PAGE_SHIFT))
79c631239a83aeb Andrey Grodzovsky 2017-11-10  463  			return true;
79c631239a83aeb Andrey Grodzovsky 2017-11-10  464  		else
79c631239a83aeb Andrey Grodzovsky 2017-11-10  465  			goto fail;
79c631239a83aeb Andrey Grodzovsky 2017-11-10  466  	}
79c631239a83aeb Andrey Grodzovsky 2017-11-10  467  
79c631239a83aeb Andrey Grodzovsky 2017-11-10  468  
79c631239a83aeb Andrey Grodzovsky 2017-11-10  469  	/* TODO add more domains checks, such as AMDGPU_GEM_DOMAIN_CPU */
79c631239a83aeb Andrey Grodzovsky 2017-11-10  470  	return true;
79c631239a83aeb Andrey Grodzovsky 2017-11-10  471  
79c631239a83aeb Andrey Grodzovsky 2017-11-10  472  fail:
299c776cebb01c1 Michel Dänzer     2017-11-15 @473  	DRM_DEBUG("BO size %lu > total memory in domain: %llu\n", size,
89e1ba9e4973560 Dave Airlie       2020-08-07  474  		  mgr_size << PAGE_SHIFT);
79c631239a83aeb Andrey Grodzovsky 2017-11-10  475  	return false;
79c631239a83aeb Andrey Grodzovsky 2017-11-10  476  }
79c631239a83aeb Andrey Grodzovsky 2017-11-10  477  

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux