summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/tests
diff options
context:
space:
mode:
authorMatthew Auld <matthew.auld@intel.com>2023-09-01 17:28:26 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:41:03 +0300
commite6a373dc3d1267f828a3e6523fe2e46c6824d3e4 (patch)
tree4c4ee6e7a38f8d34fe101b38cfd2eb7b73678699 /drivers/gpu/drm/xe/tests
parentfba153b0d0b769bb2379c9e78968036d17bdfb6b (diff)
downloadlinux-e6a373dc3d1267f828a3e6523fe2e46c6824d3e4.tar.xz
drm/xe/selftests: make eviction test tile centric
The concern here is that we may have platforms with dedicated media GT, and we anyway allocate the object on the tile, which just means running the same test twice (i.e primary vs media GT). Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@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_bo.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/xe/tests/xe_bo.c b/drivers/gpu/drm/xe/tests/xe_bo.c
index 0e4ec22c5667..c448b00a569c 100644
--- a/drivers/gpu/drm/xe/tests/xe_bo.c
+++ b/drivers/gpu/drm/xe/tests/xe_bo.c
@@ -174,18 +174,18 @@ void xe_ccs_migrate_kunit(struct kunit *test)
}
EXPORT_SYMBOL_IF_KUNIT(xe_ccs_migrate_kunit);
-static int evict_test_run_gt(struct xe_device *xe, struct xe_gt *gt, struct kunit *test)
+static int evict_test_run_tile(struct xe_device *xe, struct xe_tile *tile, struct kunit *test)
{
struct xe_bo *bo, *external;
unsigned int bo_flags = XE_BO_CREATE_USER_BIT |
- XE_BO_CREATE_VRAM_IF_DGFX(gt_to_tile(gt));
+ XE_BO_CREATE_VRAM_IF_DGFX(tile);
struct xe_vm *vm = xe_migrate_get_vm(xe_device_get_root_tile(xe)->migrate);
struct ww_acquire_ctx ww;
struct xe_gt *__gt;
int err, i, id;
- kunit_info(test, "Testing device %s gt id %u vram id %u\n",
- dev_name(xe->drm.dev), gt->info.id, gt_to_tile(gt)->id);
+ kunit_info(test, "Testing device %s vram id %u\n",
+ dev_name(xe->drm.dev), tile->id);
for (i = 0; i < 2; ++i) {
xe_vm_lock(vm, &ww, 0, false);
@@ -316,7 +316,7 @@ cleanup_bo:
static int evict_test_run_device(struct xe_device *xe)
{
struct kunit *test = xe_cur_kunit();
- struct xe_gt *gt;
+ struct xe_tile *tile;
int id;
if (!IS_DGFX(xe)) {
@@ -327,8 +327,8 @@ static int evict_test_run_device(struct xe_device *xe)
xe_device_mem_access_get(xe);
- for_each_gt(gt, xe, id)
- evict_test_run_gt(xe, gt, test);
+ for_each_tile(tile, xe, id)
+ evict_test_run_tile(xe, tile, test);
xe_device_mem_access_put(xe);