summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/tests
diff options
context:
space:
mode:
authorThomas Hellström <thomas.hellstrom@linux.intel.com>2023-06-26 21:17:41 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:35:04 +0300
commita201c6ee37d63e7c0a2973fb7790e94211b7fa83 (patch)
tree1632caab847bb36d9ab20be7df2f0fc203f0876e /drivers/gpu/drm/xe/tests
parent70ff6a999d7cae52b6b418c3110b6245dde9271c (diff)
downloadlinux-a201c6ee37d63e7c0a2973fb7790e94211b7fa83.tar.xz
drm/xe/bo: Evict VRAM to TT rather than to system
The main difference is that we don't bounce and sync on eviction, allowing for pipelined eviction. Moving forward we also need to be careful with dma mappings which can be released in SYSTEM but may remain in TT. v2: - Remove a stale comment (Matthew Brost) Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230626181741.32820-5-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/tests')
-rw-r--r--drivers/gpu/drm/xe/tests/xe_dma_buf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/xe/tests/xe_dma_buf.c b/drivers/gpu/drm/xe/tests/xe_dma_buf.c
index 513a3b3362e9..810a035bf720 100644
--- a/drivers/gpu/drm/xe/tests/xe_dma_buf.c
+++ b/drivers/gpu/drm/xe/tests/xe_dma_buf.c
@@ -72,7 +72,7 @@ static void check_residency(struct kunit *test, struct xe_bo *exported,
}
/* Verify that also importer has been evicted to SYSTEM */
- if (!xe_bo_is_mem_type(imported, XE_PL_SYSTEM)) {
+ if (exported != imported && !xe_bo_is_mem_type(imported, XE_PL_SYSTEM)) {
KUNIT_FAIL(test, "Importer wasn't properly evicted.\n");
return;
}
@@ -91,8 +91,7 @@ static void check_residency(struct kunit *test, struct xe_bo *exported,
* possible, saving a migration step as the transfer is just
* likely as fast from system memory.
*/
- if (params->force_different_devices &&
- params->mem_mask & XE_BO_CREATE_SYSTEM_BIT)
+ if (params->mem_mask & XE_BO_CREATE_SYSTEM_BIT)
KUNIT_EXPECT_TRUE(test, xe_bo_is_mem_type(exported, XE_PL_TT));
else
KUNIT_EXPECT_TRUE(test, xe_bo_is_mem_type(exported, mem_type));