Re: [Intel-gfx] [PATCH v2 3/3] drm/i915: Initial introduction of vma resources

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

 



Hi "Thomas,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-tip/drm-tip]
[cannot apply to drm-intel/for-linux-next drm-exynos/exynos-drm-next drm/drm-next tegra-drm/drm/tegra/for-next airlied/drm-next v5.15-rc7 next-20211027]
[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/Thomas-Hellstr-m/Prepare-error-capture-for-asynchronous-migration/20211027-185501
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: i386-defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/ce3de63c87b40e04e9a9960549435085aa55fb27
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Thomas-Hellstr-m/Prepare-error-capture-for-asynchronous-migration/20211027-185501
        git checkout ce3de63c87b40e04e9a9960549435085aa55fb27
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

All errors (new ones prefixed by >>):

   drivers/gpu/drm/i915/i915_vma.c: In function 'i915_vma_bind':
>> drivers/gpu/drm/i915/i915_vma.c:445:3: error: implicit declaration of function 'i915_vma_resource_init'; did you mean 'i915_vma_resource_put'? [-Werror=implicit-function-declaration]
     445 |   i915_vma_resource_init(vma_res, vma);
         |   ^~~~~~~~~~~~~~~~~~~~~~
         |   i915_vma_resource_put
   drivers/gpu/drm/i915/i915_vma.c: At top level:
   drivers/gpu/drm/i915/i915_vma.c:1502:1: error: conflicting types for 'i915_vma_resource_init' [-Werror]
    1502 | i915_vma_resource_init(struct i915_vma_resource *vma_res,
         | ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/i915/i915_vma.c:1502:1: error: static declaration of 'i915_vma_resource_init' follows non-static declaration
   drivers/gpu/drm/i915/i915_vma.c:445:3: note: previous implicit declaration of 'i915_vma_resource_init' was here
     445 |   i915_vma_resource_init(vma_res, vma);
         |   ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/i915/i915_vma.c:1502:1: error: 'i915_vma_resource_init' defined but not used [-Werror=unused-function]
    1502 | i915_vma_resource_init(struct i915_vma_resource *vma_res,
         | ^~~~~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors


vim +445 drivers/gpu/drm/i915/i915_vma.c

   384	
   385	/**
   386	 * i915_vma_bind - Sets up PTEs for an VMA in it's corresponding address space.
   387	 * @vma: VMA to map
   388	 * @cache_level: mapping cache level
   389	 * @flags: flags like global or local mapping
   390	 * @work: preallocated worker for allocating and binding the PTE
   391	 * @vma_res: pointer to a preallocated vma resource. The resource is either
   392	 * consumed or freed.
   393	 *
   394	 * DMA addresses are taken from the scatter-gather table of this object (or of
   395	 * this VMA in case of non-default GGTT views) and PTE entries set up.
   396	 * Note that DMA addresses are also the only part of the SG table we care about.
   397	 */
   398	int i915_vma_bind(struct i915_vma *vma,
   399			  enum i915_cache_level cache_level,
   400			  u32 flags,
   401			  struct i915_vma_work *work,
   402			  struct i915_vma_resource *vma_res)
   403	{
   404		u32 bind_flags;
   405		u32 vma_flags;
   406	
   407		GEM_BUG_ON(!drm_mm_node_allocated(&vma->node));
   408		GEM_BUG_ON(vma->size > vma->node.size);
   409	
   410		if (GEM_DEBUG_WARN_ON(range_overflows(vma->node.start,
   411						      vma->node.size,
   412						      vma->vm->total))) {
   413			kfree(vma_res);
   414			return -ENODEV;
   415		}
   416	
   417		if (GEM_DEBUG_WARN_ON(!flags)) {
   418			kfree(vma_res);
   419			return -EINVAL;
   420		}
   421	
   422		bind_flags = flags;
   423		bind_flags &= I915_VMA_GLOBAL_BIND | I915_VMA_LOCAL_BIND;
   424	
   425		vma_flags = atomic_read(&vma->flags);
   426		vma_flags &= I915_VMA_GLOBAL_BIND | I915_VMA_LOCAL_BIND;
   427	
   428		bind_flags &= ~vma_flags;
   429		if (bind_flags == 0) {
   430			kfree(vma_res);
   431			return 0;
   432		}
   433	
   434		GEM_BUG_ON(!vma->pages);
   435	
   436		if (!i915_vma_is_pinned(vma))
   437			lockdep_assert_held(&vma->vm->mutex);
   438	
   439		if ((vma->resource) || !vma_res) {
   440			/* Rebinding with an additional I915_VMA_*_BIND */
   441			GEM_WARN_ON(!vma_flags);
   442			kfree(vma_res);
   443		} else {
   444			lockdep_assert_held(&vma->vm->mutex);
 > 445			i915_vma_resource_init(vma_res, vma);
   446			vma->resource = vma_res;
   447		}
   448		trace_i915_vma_bind(vma, bind_flags);
   449		if (work && bind_flags & vma->vm->bind_async_flags) {
   450			struct dma_fence *prev;
   451	
   452			work->vma = vma;
   453			work->cache_level = cache_level;
   454			work->flags = bind_flags;
   455	
   456			/*
   457			 * Note we only want to chain up to the migration fence on
   458			 * the pages (not the object itself). As we don't track that,
   459			 * yet, we have to use the exclusive fence instead.
   460			 *
   461			 * Also note that we do not want to track the async vma as
   462			 * part of the obj->resv->excl_fence as it only affects
   463			 * execution and not content or object's backing store lifetime.
   464			 */
   465			prev = i915_active_set_exclusive(&vma->active, &work->base.dma);
   466			if (prev) {
   467				__i915_sw_fence_await_dma_fence(&work->base.chain,
   468								prev,
   469								&work->cb);
   470				dma_fence_put(prev);
   471			}
   472	
   473			work->base.dma.error = 0; /* enable the queue_work() */
   474	
   475			if (vma->obj) {
   476				__i915_gem_object_pin_pages(vma->obj);
   477				work->pinned = i915_gem_object_get(vma->obj);
   478			}
   479		} else {
   480			vma->ops->bind_vma(vma->vm, NULL, vma, cache_level, bind_flags);
   481		}
   482	
   483		atomic_or(bind_flags, &vma->flags);
   484		return 0;
   485	}
   486	

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

Attachment: .config.gz
Description: application/gzip


[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