From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Matthew Auld <matthew.auld@intel.com>
Subject: [Intel-xe] [PATCH v2 1/2] drm/xe: Fix the migrate selftest for integrated GPUs
Date: Fri, 26 May 2023 16:36:56 +0200 [thread overview]
Message-ID: <20230526143657.226637-2-thomas.hellstrom@linux.intel.com> (raw)
In-Reply-To: <20230526143657.226637-1-thomas.hellstrom@linux.intel.com>
The TTM resource cursor was set up incorrectly.
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
---
drivers/gpu/drm/xe/tests/xe_migrate.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/tests/xe_migrate.c b/drivers/gpu/drm/xe/tests/xe_migrate.c
index 0f4371ad1fd9..f8ee9b9fca99 100644
--- a/drivers/gpu/drm/xe/tests/xe_migrate.c
+++ b/drivers/gpu/drm/xe/tests/xe_migrate.c
@@ -303,9 +303,14 @@ static void xe_migrate_sanity_test(struct xe_migrate *m, struct kunit *test)
expected = gen8_pte_encode(NULL, pt, 0, XE_CACHE_WB, 0, 0);
if (m->eng->vm->flags & XE_VM_FLAGS_64K)
expected |= XE_PTE_PS64;
- xe_res_first(pt->ttm.resource, 0, pt->size, &src_it);
+ if (xe_bo_is_vram(pt))
+ xe_res_first(pt->ttm.resource, 0, pt->size, &src_it);
+ else
+ xe_res_first_sg(xe_bo_get_sg(pt), 0, pt->size, &src_it);
+
emit_pte(m, bb, NUM_KERNEL_PDE - 1, xe_bo_is_vram(pt),
&src_it, XE_PAGE_SIZE, pt);
+
run_sanity_job(m, xe, bb, bb->len, "Writing PTE for our fake PT", test);
retval = xe_map_rd(xe, &bo->vmap, XE_PAGE_SIZE * (NUM_KERNEL_PDE - 1),
--
2.39.2
next prev parent reply other threads:[~2023-05-26 14:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-26 14:36 [Intel-xe] [PATCH v2 0/2] Migrate fix and update Thomas Hellström
2023-05-26 14:36 ` Thomas Hellström [this message]
2023-05-26 14:36 ` [Intel-xe] [PATCH v2 2/2] drm/xe: Support copying of data between system memory bos Thomas Hellström
2023-05-26 14:39 ` [Intel-xe] ✓ CI.Patch_applied: success for Migrate fix and update (rev2) Patchwork
2023-05-26 14:41 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-05-26 14:45 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-05-26 15:13 ` [Intel-xe] ○ CI.BAT: info " 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=20230526143657.226637-2-thomas.hellstrom@linux.intel.com \
--to=thomas.hellstrom@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.auld@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