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: x86_64-randconfig-a015-20200806 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project aa57cabae2fc5abc08ab3e17b45f2890fc7c9e42)
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
        # 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@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/radeon/radeon_ttm.c:754:5: warning: no previous prototype for function 'radeon_ttm_init' [-Wmissing-prototypes]
   int radeon_ttm_init(struct radeon_device *rdev)
       ^
   drivers/gpu/drm/radeon/radeon_ttm.c:754:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int radeon_ttm_init(struct radeon_device *rdev)
   ^
   static 
   drivers/gpu/drm/radeon/radeon_ttm.c:812:6: warning: no previous prototype for function 'radeon_ttm_fini' [-Wmissing-prototypes]
   void radeon_ttm_fini(struct radeon_device *rdev)
        ^
   drivers/gpu/drm/radeon/radeon_ttm.c:812:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void radeon_ttm_fini(struct radeon_device *rdev)
   ^
   static 
>> drivers/gpu/drm/radeon/radeon_ttm.c:845:28: warning: variable 'man' is uninitialized when used here [-Wuninitialized]
           ttm_range_man_adjust_size(man, size >> PAGE_SHIFT);
                                     ^~~
   drivers/gpu/drm/radeon/radeon_ttm.c:839:34: note: initialize the variable 'man' to silence this warning
           struct ttm_resource_manager *man;
                                           ^
                                            = NULL
   drivers/gpu/drm/radeon/radeon_ttm.c:872:5: warning: no previous prototype for function 'radeon_mmap' [-Wmissing-prototypes]
   int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
       ^
   drivers/gpu/drm/radeon/radeon_ttm.c:872:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
   ^
   static 
   4 warnings generated.

vim +/man +845 drivers/gpu/drm/radeon/radeon_ttm.c

   811	
 > 812	void radeon_ttm_fini(struct radeon_device *rdev)
   813	{
   814		int r;
   815	
   816		if (!rdev->mman.initialized)
   817			return;
   818		radeon_ttm_debugfs_fini(rdev);
   819		if (rdev->stolen_vga_memory) {
   820			r = radeon_bo_reserve(rdev->stolen_vga_memory, false);
   821			if (r == 0) {
   822				radeon_bo_unpin(rdev->stolen_vga_memory);
   823				radeon_bo_unreserve(rdev->stolen_vga_memory);
   824			}
   825			radeon_bo_unref(&rdev->stolen_vga_memory);
   826		}
   827		ttm_range_man_fini(&rdev->mman.bdev, TTM_PL_VRAM);
   828		ttm_range_man_fini(&rdev->mman.bdev, TTM_PL_TT);
   829		ttm_bo_device_release(&rdev->mman.bdev);
   830		radeon_gart_fini(rdev);
   831		rdev->mman.initialized = false;
   832		DRM_INFO("radeon: ttm finalized\n");
   833	}
   834	
   835	/* this should only be called at bootup or when userspace
   836	 * isn't running */
   837	void radeon_ttm_set_active_vram_size(struct radeon_device *rdev, u64 size)
   838	{
   839		struct ttm_resource_manager *man;
   840	
   841		if (!rdev->mman.initialized)
   842			return;
   843	
   844		/* this just adjusts TTM size idea, which sets lpfn to the correct value */
 > 845		ttm_range_man_adjust_size(man, size >> PAGE_SHIFT);
   846	}
   847	

---
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