All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Dave Airlie <airlied@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH] drm/ttm/xe: drop unused force_alloc flag
Date: Wed, 7 May 2025 19:00:59 +0800	[thread overview]
Message-ID: <202505071848.39m0TUuR-lkp@intel.com> (raw)
In-Reply-To: <20250423022920.27701-1-airlied@gmail.com>

Hi Dave,

kernel test robot noticed the following build errors:

[auto build test ERROR on drm-xe/drm-xe-next]
[also build test ERROR on drm-exynos/exynos-drm-next linus/master v6.15-rc5]
[cannot apply to drm/drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-misc/drm-misc-next drm-tip/drm-tip next-20250507]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Dave-Airlie/drm-ttm-xe-drop-unused-force_alloc-flag/20250423-103716
base:   https://gitlab.freedesktop.org/drm/xe/kernel.git drm-xe-next
patch link:    https://lore.kernel.org/r/20250423022920.27701-1-airlied%40gmail.com
patch subject: [PATCH] drm/ttm/xe: drop unused force_alloc flag
config: i386-randconfig-005-20250426 (https://download.01.org/0day-ci/archive/20250507/202505071848.39m0TUuR-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250507/202505071848.39m0TUuR-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505071848.39m0TUuR-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/gpu/drm/xe/xe_dma_buf.c:319:
   drivers/gpu/drm/xe/tests/xe_dma_buf.c: In function 'check_residency':
>> drivers/gpu/drm/xe/tests/xe_dma_buf.c:68:15: error: too many arguments to function 'xe_bo_evict'
      68 |         ret = xe_bo_evict(exported, true);
         |               ^~~~~~~~~~~
   In file included from drivers/gpu/drm/xe/xe_dma_buf.c:17:
   drivers/gpu/drm/xe/xe_bo.h:277:5: note: declared here
     277 | int xe_bo_evict(struct xe_bo *bo);
         |     ^~~~~~~~~~~
--
   In file included from drivers/gpu/drm/xe/xe_bo.c:3022:
   drivers/gpu/drm/xe/tests/xe_bo.c: In function 'ccs_test_migrate':
>> drivers/gpu/drm/xe/tests/xe_bo.c:63:15: error: too many arguments to function 'xe_bo_evict'
      63 |         ret = xe_bo_evict(bo, true);
         |               ^~~~~~~~~~~
   drivers/gpu/drm/xe/xe_bo.c:2843:5: note: declared here
    2843 | int xe_bo_evict(struct xe_bo *bo)
         |     ^~~~~~~~~~~
--
   In file included from drivers/gpu/drm/xe/xe_migrate.c:1729:
   drivers/gpu/drm/xe/tests/xe_migrate.c: In function 'test_migrate':
>> drivers/gpu/drm/xe/tests/xe_migrate.c:512:15: error: too many arguments to function 'xe_bo_evict'
     512 |         ret = xe_bo_evict(vram_bo, true);
         |               ^~~~~~~~~~~
   In file included from drivers/gpu/drm/xe/xe_migrate.c:23:
   drivers/gpu/drm/xe/xe_bo.h:277:5: note: declared here
     277 | int xe_bo_evict(struct xe_bo *bo);
         |     ^~~~~~~~~~~


vim +/xe_bo_evict +68 drivers/gpu/drm/xe/tests/xe_dma_buf.c

dd08ebf6c3525a Matthew Brost    2023-03-30   28  
dd08ebf6c3525a Matthew Brost    2023-03-30   29  static void check_residency(struct kunit *test, struct xe_bo *exported,
dd08ebf6c3525a Matthew Brost    2023-03-30   30  			    struct xe_bo *imported, struct dma_buf *dmabuf)
dd08ebf6c3525a Matthew Brost    2023-03-30   31  {
dd08ebf6c3525a Matthew Brost    2023-03-30   32  	struct dma_buf_test_params *params = to_dma_buf_test_params(test->priv);
dd08ebf6c3525a Matthew Brost    2023-03-30   33  	u32 mem_type;
dd08ebf6c3525a Matthew Brost    2023-03-30   34  	int ret;
dd08ebf6c3525a Matthew Brost    2023-03-30   35  
dd08ebf6c3525a Matthew Brost    2023-03-30   36  	xe_bo_assert_held(exported);
dd08ebf6c3525a Matthew Brost    2023-03-30   37  	xe_bo_assert_held(imported);
dd08ebf6c3525a Matthew Brost    2023-03-30   38  
dd08ebf6c3525a Matthew Brost    2023-03-30   39  	mem_type = XE_PL_VRAM0;
62742d12663145 Lucas De Marchi  2024-03-22   40  	if (!(params->mem_mask & XE_BO_FLAG_VRAM0))
dd08ebf6c3525a Matthew Brost    2023-03-30   41  		/* No VRAM allowed */
dd08ebf6c3525a Matthew Brost    2023-03-30   42  		mem_type = XE_PL_TT;
dd08ebf6c3525a Matthew Brost    2023-03-30   43  	else if (params->force_different_devices && !p2p_enabled(params))
dd08ebf6c3525a Matthew Brost    2023-03-30   44  		/* No P2P */
dd08ebf6c3525a Matthew Brost    2023-03-30   45  		mem_type = XE_PL_TT;
dd08ebf6c3525a Matthew Brost    2023-03-30   46  	else if (params->force_different_devices && !is_dynamic(params) &&
62742d12663145 Lucas De Marchi  2024-03-22   47  		 (params->mem_mask & XE_BO_FLAG_SYSTEM))
dd08ebf6c3525a Matthew Brost    2023-03-30   48  		/* Pin migrated to TT */
dd08ebf6c3525a Matthew Brost    2023-03-30   49  		mem_type = XE_PL_TT;
dd08ebf6c3525a Matthew Brost    2023-03-30   50  
dd08ebf6c3525a Matthew Brost    2023-03-30   51  	if (!xe_bo_is_mem_type(exported, mem_type)) {
dd08ebf6c3525a Matthew Brost    2023-03-30   52  		KUNIT_FAIL(test, "Exported bo was not in expected memory type.\n");
dd08ebf6c3525a Matthew Brost    2023-03-30   53  		return;
dd08ebf6c3525a Matthew Brost    2023-03-30   54  	}
dd08ebf6c3525a Matthew Brost    2023-03-30   55  
dd08ebf6c3525a Matthew Brost    2023-03-30   56  	if (xe_bo_is_pinned(exported))
dd08ebf6c3525a Matthew Brost    2023-03-30   57  		return;
dd08ebf6c3525a Matthew Brost    2023-03-30   58  
dd08ebf6c3525a Matthew Brost    2023-03-30   59  	/*
dd08ebf6c3525a Matthew Brost    2023-03-30   60  	 * Evict exporter. Note that the gem object dma_buf member isn't
dd08ebf6c3525a Matthew Brost    2023-03-30   61  	 * set from xe_gem_prime_export(), and it's needed for the move_notify()
dd08ebf6c3525a Matthew Brost    2023-03-30   62  	 * functionality, so hack that up here. Evicting the exported bo will
dd08ebf6c3525a Matthew Brost    2023-03-30   63  	 * evict also the imported bo through the move_notify() functionality if
dd08ebf6c3525a Matthew Brost    2023-03-30   64  	 * importer is on a different device. If they're on the same device,
dd08ebf6c3525a Matthew Brost    2023-03-30   65  	 * the exporter and the importer should be the same bo.
dd08ebf6c3525a Matthew Brost    2023-03-30   66  	 */
dd08ebf6c3525a Matthew Brost    2023-03-30   67  	swap(exported->ttm.base.dma_buf, dmabuf);
dd08ebf6c3525a Matthew Brost    2023-03-30  @68  	ret = xe_bo_evict(exported, true);
dd08ebf6c3525a Matthew Brost    2023-03-30   69  	swap(exported->ttm.base.dma_buf, dmabuf);
dd08ebf6c3525a Matthew Brost    2023-03-30   70  	if (ret) {
dd08ebf6c3525a Matthew Brost    2023-03-30   71  		if (ret != -EINTR && ret != -ERESTARTSYS)
dd08ebf6c3525a Matthew Brost    2023-03-30   72  			KUNIT_FAIL(test, "Evicting exporter failed with err=%d.\n",
dd08ebf6c3525a Matthew Brost    2023-03-30   73  				   ret);
dd08ebf6c3525a Matthew Brost    2023-03-30   74  		return;
dd08ebf6c3525a Matthew Brost    2023-03-30   75  	}
dd08ebf6c3525a Matthew Brost    2023-03-30   76  
dd08ebf6c3525a Matthew Brost    2023-03-30   77  	/* Verify that also importer has been evicted to SYSTEM */
a201c6ee37d63e Thomas Hellström 2023-06-26   78  	if (exported != imported && !xe_bo_is_mem_type(imported, XE_PL_SYSTEM)) {
dd08ebf6c3525a Matthew Brost    2023-03-30   79  		KUNIT_FAIL(test, "Importer wasn't properly evicted.\n");
dd08ebf6c3525a Matthew Brost    2023-03-30   80  		return;
dd08ebf6c3525a Matthew Brost    2023-03-30   81  	}
dd08ebf6c3525a Matthew Brost    2023-03-30   82  
dd08ebf6c3525a Matthew Brost    2023-03-30   83  	/* Re-validate the importer. This should move also exporter in. */
dd08ebf6c3525a Matthew Brost    2023-03-30   84  	ret = xe_bo_validate(imported, NULL, false);
dd08ebf6c3525a Matthew Brost    2023-03-30   85  	if (ret) {
dd08ebf6c3525a Matthew Brost    2023-03-30   86  		if (ret != -EINTR && ret != -ERESTARTSYS)
dd08ebf6c3525a Matthew Brost    2023-03-30   87  			KUNIT_FAIL(test, "Validating importer failed with err=%d.\n",
dd08ebf6c3525a Matthew Brost    2023-03-30   88  				   ret);
dd08ebf6c3525a Matthew Brost    2023-03-30   89  		return;
dd08ebf6c3525a Matthew Brost    2023-03-30   90  	}
dd08ebf6c3525a Matthew Brost    2023-03-30   91  
dd08ebf6c3525a Matthew Brost    2023-03-30   92  	/*
dd08ebf6c3525a Matthew Brost    2023-03-30   93  	 * If on different devices, the exporter is kept in system  if
dd08ebf6c3525a Matthew Brost    2023-03-30   94  	 * possible, saving a migration step as the transfer is just
dd08ebf6c3525a Matthew Brost    2023-03-30   95  	 * likely as fast from system memory.
dd08ebf6c3525a Matthew Brost    2023-03-30   96  	 */
62742d12663145 Lucas De Marchi  2024-03-22   97  	if (params->mem_mask & XE_BO_FLAG_SYSTEM)
dd08ebf6c3525a Matthew Brost    2023-03-30   98  		KUNIT_EXPECT_TRUE(test, xe_bo_is_mem_type(exported, XE_PL_TT));
dd08ebf6c3525a Matthew Brost    2023-03-30   99  	else
dd08ebf6c3525a Matthew Brost    2023-03-30  100  		KUNIT_EXPECT_TRUE(test, xe_bo_is_mem_type(exported, mem_type));
dd08ebf6c3525a Matthew Brost    2023-03-30  101  
dd08ebf6c3525a Matthew Brost    2023-03-30  102  	if (params->force_different_devices)
dd08ebf6c3525a Matthew Brost    2023-03-30  103  		KUNIT_EXPECT_TRUE(test, xe_bo_is_mem_type(imported, XE_PL_TT));
dd08ebf6c3525a Matthew Brost    2023-03-30  104  	else
dd08ebf6c3525a Matthew Brost    2023-03-30  105  		KUNIT_EXPECT_TRUE(test, exported == imported);
dd08ebf6c3525a Matthew Brost    2023-03-30  106  }
dd08ebf6c3525a Matthew Brost    2023-03-30  107  

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

      parent reply	other threads:[~2025-05-07 11:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23  2:29 [PATCH] drm/ttm/xe: drop unused force_alloc flag Dave Airlie
2025-04-23  3:05 ` Matthew Brost
2025-04-28  1:40 ` Matthew Brost
2025-04-28  7:47 ` Christian König
2025-05-07 11:00 ` kernel test robot [this message]

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=202505071848.39m0TUuR-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=airlied@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.