public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: kbuild-all@lists.01.org, maarten.lankhorst@linux.intel.com,
	matthew.auld@intel.com,
	"Thomas Hellström" <thomas.hellstrom@intel.com>
Subject: Re: [Intel-gfx] [PATCH v2 3/3] drm/i915: Initial introduction of vma resources
Date: Thu, 28 Oct 2021 06:07:15 +0800	[thread overview]
Message-ID: <202110280624.g3JxPY2S-lkp@intel.com> (raw)
In-Reply-To: <20211027105211.485125-4-thomas.hellstrom@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 6257 bytes --]

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@intel.com>

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@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29349 bytes --]

  reply	other threads:[~2021-10-27 22:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27 10:52 [Intel-gfx] [PATCH v2 0/3] Prepare error capture for asynchronous migration Thomas Hellström
2021-10-27 10:52 ` [Intel-gfx] [PATCH v2 1/3] drm/i915: Introduce refcounted sg-tables Thomas Hellström
2021-10-27 18:03   ` Matthew Auld
2021-10-28  7:04     ` Thomas Hellström
2021-10-28  8:47       ` Matthew Auld
2021-10-28  9:35         ` Thomas Hellström
2021-10-28  9:58           ` Matthew Auld
2021-10-28 11:20             ` Thomas Hellström
2021-10-27 10:52 ` [Intel-gfx] [PATCH v2 2/3] drm/i915: Update error capture code to avoid using the current vma state Thomas Hellström
2021-10-28  8:46   ` kernel test robot
2021-10-27 10:52 ` [Intel-gfx] [PATCH v2 3/3] drm/i915: Initial introduction of vma resources Thomas Hellström
2021-10-27 22:07   ` kernel test robot [this message]
2021-10-27 14:40 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Prepare error capture for asynchronous migration (rev2) Patchwork
2021-10-27 15:13 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-10-27 18:54 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202110280624.g3JxPY2S-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kbuild-all@lists.01.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthew.auld@intel.com \
    --cc=thomas.hellstrom@intel.com \
    --cc=thomas.hellstrom@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox