Re: [PATCH] Remove custom dumb_map_offset implementations in i915 driver

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

 



Hi Dipam,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-tip/drm-tip]

url:    https://github.com/intel-lab-lkp/linux/commits/Dipam-Turkar/Remove-custom-dumb_map_offset-implementations-in-i915-driver/20231110-185942
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
patch link:    https://lore.kernel.org/r/20231110105811.380646-1-dipamt1729%40gmail.com
patch subject:  [PATCH] Remove custom dumb_map_offset implementations in i915 driver
config: x86_64-randconfig-001-20231110 (https://download.01.org/0day-ci/archive/20231111/202311110226.CsxS1u1i-lkp@xxxxxxxxx/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231111/202311110226.CsxS1u1i-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311110226.CsxS1u1i-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/i915/gem/i915_gem_mman.c: In function 'i915_gem_mmap_offset_ioctl':
   drivers/gpu/drm/i915/gem/i915_gem_mman.c:673:9: error: implicit declaration of function '__assign_mmap_offset_handle'; did you mean 'i915_gem_mmap_offset_ioctl'? [-Werror=implicit-function-declaration]
     return __assign_mmap_offset_handle(file, args->handle, type, &args->offset);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
            i915_gem_mmap_offset_ioctl
   drivers/gpu/drm/i915/gem/i915_gem_mman.c: In function 'i915_gem_fb_mmap':
   drivers/gpu/drm/i915/gem/i915_gem_mman.c:896:9: error: implicit declaration of function 'mmap_offset_attach'; did you mean 'dma_free_attrs'? [-Werror=implicit-function-declaration]
      mmo = mmap_offset_attach(obj, mmap_type, NULL);
            ^~~~~~~~~~~~~~~~~~
            dma_free_attrs
>> drivers/gpu/drm/i915/gem/i915_gem_mman.c:896:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
      mmo = mmap_offset_attach(obj, mmap_type, NULL);
          ^
   cc1: some warnings being treated as errors


vim +896 drivers/gpu/drm/i915/gem/i915_gem_mman.c

eaee1c085863951 Nirmoy Das    2023-04-04  874  
eaee1c085863951 Nirmoy Das    2023-04-04  875  int i915_gem_fb_mmap(struct drm_i915_gem_object *obj, struct vm_area_struct *vma)
eaee1c085863951 Nirmoy Das    2023-04-04  876  {
eaee1c085863951 Nirmoy Das    2023-04-04  877  	struct drm_i915_private *i915 = to_i915(obj->base.dev);
eaee1c085863951 Nirmoy Das    2023-04-04  878  	struct drm_device *dev = &i915->drm;
eaee1c085863951 Nirmoy Das    2023-04-04  879  	struct i915_mmap_offset *mmo = NULL;
eaee1c085863951 Nirmoy Das    2023-04-04  880  	enum i915_mmap_type mmap_type;
eaee1c085863951 Nirmoy Das    2023-04-04  881  	struct i915_ggtt *ggtt = to_gt(i915)->ggtt;
eaee1c085863951 Nirmoy Das    2023-04-04  882  
eaee1c085863951 Nirmoy Das    2023-04-04  883  	if (drm_dev_is_unplugged(dev))
eaee1c085863951 Nirmoy Das    2023-04-04  884  		return -ENODEV;
eaee1c085863951 Nirmoy Das    2023-04-04  885  
eaee1c085863951 Nirmoy Das    2023-04-04  886  	/* handle ttm object */
eaee1c085863951 Nirmoy Das    2023-04-04  887  	if (obj->ops->mmap_ops) {
eaee1c085863951 Nirmoy Das    2023-04-04  888  		/*
eaee1c085863951 Nirmoy Das    2023-04-04  889  		 * ttm fault handler, ttm_bo_vm_fault_reserved() uses fake offset
eaee1c085863951 Nirmoy Das    2023-04-04  890  		 * to calculate page offset so set that up.
eaee1c085863951 Nirmoy Das    2023-04-04  891  		 */
eaee1c085863951 Nirmoy Das    2023-04-04  892  		vma->vm_pgoff += drm_vma_node_start(&obj->base.vma_node);
eaee1c085863951 Nirmoy Das    2023-04-04  893  	} else {
eaee1c085863951 Nirmoy Das    2023-04-04  894  		/* handle stolen and smem objects */
eaee1c085863951 Nirmoy Das    2023-04-04  895  		mmap_type = i915_ggtt_has_aperture(ggtt) ? I915_MMAP_TYPE_GTT : I915_MMAP_TYPE_WC;
eaee1c085863951 Nirmoy Das    2023-04-04 @896  		mmo = mmap_offset_attach(obj, mmap_type, NULL);
274d4b96b12f78c Dan Carpenter 2023-06-06  897  		if (IS_ERR(mmo))
274d4b96b12f78c Dan Carpenter 2023-06-06  898  			return PTR_ERR(mmo);
eaee1c085863951 Nirmoy Das    2023-04-04  899  	}
eaee1c085863951 Nirmoy Das    2023-04-04  900  
eaee1c085863951 Nirmoy Das    2023-04-04  901  	/*
eaee1c085863951 Nirmoy Das    2023-04-04  902  	 * When we install vm_ops for mmap we are too late for
eaee1c085863951 Nirmoy Das    2023-04-04  903  	 * the vm_ops->open() which increases the ref_count of
eaee1c085863951 Nirmoy Das    2023-04-04  904  	 * this obj and then it gets decreased by the vm_ops->close().
eaee1c085863951 Nirmoy Das    2023-04-04  905  	 * To balance this increase the obj ref_count here.
eaee1c085863951 Nirmoy Das    2023-04-04  906  	 */
eaee1c085863951 Nirmoy Das    2023-04-04  907  	obj = i915_gem_object_get(obj);
eaee1c085863951 Nirmoy Das    2023-04-04  908  	return i915_gem_object_mmap(obj, mmo, vma);
eaee1c085863951 Nirmoy Das    2023-04-04  909  }
eaee1c085863951 Nirmoy Das    2023-04-04  910  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux