Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: matthew.auld@intel.com, thomas.hellstrom@linux.intel.com
Subject: [PATCH v3 5/6] drm/xe: Set XE_BO_FLAG_PINNED in migrate selftest BOs
Date: Sat, 19 Oct 2024 12:20:29 -0700	[thread overview]
Message-ID: <20241019192030.1505020-6-matthew.brost@intel.com> (raw)
In-Reply-To: <20241019192030.1505020-1-matthew.brost@intel.com>

We only allow continguous BOs to be vmapped, set XE_BO_FLAG_PINNED on
BOs in migrate selftest as this forces continguous BOs and selftest uses
vmaps.

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/xe/tests/xe_migrate.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/xe/tests/xe_migrate.c b/drivers/gpu/drm/xe/tests/xe_migrate.c
index 1a192a2a941b..4cef3b20bd17 100644
--- a/drivers/gpu/drm/xe/tests/xe_migrate.c
+++ b/drivers/gpu/drm/xe/tests/xe_migrate.c
@@ -83,7 +83,8 @@ static void test_copy(struct xe_migrate *m, struct xe_bo *bo,
 						   bo->size,
 						   ttm_bo_type_kernel,
 						   region |
-						   XE_BO_FLAG_NEEDS_CPU_ACCESS);
+						   XE_BO_FLAG_NEEDS_CPU_ACCESS |
+						   XE_BO_FLAG_PINNED);
 	if (IS_ERR(remote)) {
 		KUNIT_FAIL(test, "Failed to allocate remote bo for %s: %pe\n",
 			   str, remote);
@@ -642,7 +643,9 @@ static void validate_ccs_test_run_tile(struct xe_device *xe, struct xe_tile *til
 
 	sys_bo = xe_bo_create_user(xe, NULL, NULL, SZ_4M,
 				   DRM_XE_GEM_CPU_CACHING_WC,
-				   XE_BO_FLAG_SYSTEM | XE_BO_FLAG_NEEDS_CPU_ACCESS);
+				   XE_BO_FLAG_SYSTEM |
+				   XE_BO_FLAG_NEEDS_CPU_ACCESS |
+				   XE_BO_FLAG_PINNED);
 
 	if (IS_ERR(sys_bo)) {
 		KUNIT_FAIL(test, "xe_bo_create() failed with err=%ld\n",
@@ -666,7 +669,8 @@ static void validate_ccs_test_run_tile(struct xe_device *xe, struct xe_tile *til
 
 	ccs_bo = xe_bo_create_user(xe, NULL, NULL, SZ_4M,
 				   DRM_XE_GEM_CPU_CACHING_WC,
-				   bo_flags | XE_BO_FLAG_NEEDS_CPU_ACCESS);
+				   bo_flags | XE_BO_FLAG_NEEDS_CPU_ACCESS |
+				   XE_BO_FLAG_PINNED);
 
 	if (IS_ERR(ccs_bo)) {
 		KUNIT_FAIL(test, "xe_bo_create() failed with err=%ld\n",
@@ -690,7 +694,8 @@ static void validate_ccs_test_run_tile(struct xe_device *xe, struct xe_tile *til
 
 	vram_bo = xe_bo_create_user(xe, NULL, NULL, SZ_4M,
 				    DRM_XE_GEM_CPU_CACHING_WC,
-				    bo_flags | XE_BO_FLAG_NEEDS_CPU_ACCESS);
+				    bo_flags | XE_BO_FLAG_NEEDS_CPU_ACCESS |
+				    XE_BO_FLAG_PINNED);
 	if (IS_ERR(vram_bo)) {
 		KUNIT_FAIL(test, "xe_bo_create() failed with err=%ld\n",
 			   PTR_ERR(vram_bo));
-- 
2.34.1


  parent reply	other threads:[~2024-10-19 19:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-19 19:20 [PATCH v3 0/6] Fix non-contiguous VRAM BO access in Xe Matthew Brost
2024-10-19 19:20 ` [PATCH v3 1/6] drm/ttm: Add ttm_bo_access Matthew Brost
2024-10-19 19:20 ` [PATCH v3 2/6] drm/xe: Add xe_ttm_access_memory Matthew Brost
2024-10-19 19:20 ` [PATCH v3 3/6] drm/xe: Update xe_ttm_access_memory to use GPU for non-visible access Matthew Brost
2024-10-21 10:15   ` Matthew Auld
2024-10-21 11:01     ` Thomas Hellström
2024-10-21 17:18       ` Matthew Brost
2024-10-21 17:02     ` Matthew Brost
2024-10-19 19:20 ` [PATCH v3 4/6] drm/xe: Use ttm_bo_access in xe_vm_snapshot_capture_delayed Matthew Brost
2024-10-21  9:07   ` Matthew Auld
2024-10-21 16:58     ` Matthew Brost
2024-10-19 19:20 ` Matthew Brost [this message]
2024-10-21  9:50   ` [PATCH v3 5/6] drm/xe: Set XE_BO_FLAG_PINNED in migrate selftest BOs Matthew Auld
2024-10-19 19:20 ` [PATCH v3 6/6] drm/xe: Only allow contiguous BOs to use xe_bo_vmap Matthew Brost
2024-10-21  9:32   ` Matthew Auld
2024-10-19 19:25 ` ✓ CI.Patch_applied: success for Fix non-contiguous VRAM BO access in Xe (rev3) Patchwork
2024-10-19 19:25 ` ✗ CI.checkpatch: warning " Patchwork
2024-10-19 19:27 ` ✓ CI.KUnit: success " Patchwork
2024-10-19 19:38 ` ✓ CI.Build: " Patchwork
2024-10-19 19:40 ` ✓ CI.Hooks: " Patchwork
2024-10-19 19:42 ` ✗ CI.checksparse: warning " Patchwork
2024-10-19 20:07 ` ✓ CI.BAT: success " Patchwork
2024-10-19 21:06 ` ✗ CI.FULL: 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=20241019192030.1505020-6-matthew.brost@intel.com \
    --to=matthew.brost@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.auld@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