Lines Matching +full:0 +full:xe
53 if (dma_fence_wait_timeout(fence, false, 5 * HZ) <= 0) { in ccs_test_migrate()
74 if (timeout <= 0) { in ccs_test_migrate()
100 if (cpu_map[0] != get_val) { in ccs_test_migrate()
102 "Expected CCS readout 0x%016llx, got 0x%016llx.\n", in ccs_test_migrate()
104 (unsigned long long)cpu_map[0]); in ccs_test_migrate()
113 "Expected CCS readout 0x%016llx, got 0x%016llx.\n", in ccs_test_migrate()
119 cpu_map[0] = assign_val; in ccs_test_migrate()
126 static void ccs_test_run_tile(struct xe_device *xe, struct xe_tile *tile, in ccs_test_run_tile() argument
137 if (IS_DGFX(xe)) in ccs_test_run_tile()
142 bo = xe_bo_create_user(xe, NULL, SZ_1M, DRM_XE_GEM_CPU_CACHING_WC, in ccs_test_run_tile()
152 ret = ccs_test_migrate(tile, bo, false, 0ULL, 0xdeadbeefdeadbeefULL, in ccs_test_run_tile()
158 ret = ccs_test_migrate(tile, bo, false, 0xdeadbeefdeadbeefULL, in ccs_test_run_tile()
159 0xdeadbeefdeadbeefULL, test, exec); in ccs_test_run_tile()
164 ret = ccs_test_migrate(tile, bo, true, 0ULL, 0ULL, test, exec); in ccs_test_run_tile()
171 static int ccs_test_run_device(struct xe_device *xe) in ccs_test_run_device() argument
177 if (!xe_device_has_flat_ccs(xe)) { in ccs_test_run_device()
179 return 0; in ccs_test_run_device()
183 if (GRAPHICS_VER(xe) >= 20 && IS_DGFX(xe)) { in ccs_test_run_device()
185 return 0; in ccs_test_run_device()
188 xe_pm_runtime_get(xe); in ccs_test_run_device()
190 for_each_tile(tile, xe, id) { in ccs_test_run_device()
192 if (!IS_DGFX(xe) && id > 0) in ccs_test_run_device()
194 ccs_test_run_tile(xe, tile, test); in ccs_test_run_device()
197 xe_pm_runtime_put(xe); in ccs_test_run_device()
199 return 0; in ccs_test_run_device()
204 struct xe_device *xe = test->priv; in xe_ccs_migrate_kunit() local
206 ccs_test_run_device(xe); in xe_ccs_migrate_kunit()
209 static int evict_test_run_tile(struct xe_device *xe, struct xe_tile *tile, struct kunit *test) in evict_test_run_tile() argument
213 struct xe_vm *vm = xe_migrate_get_vm(xe_device_get_root_tile(xe)->migrate); in evict_test_run_tile()
219 dev_name(xe->drm.dev), tile->id); in evict_test_run_tile()
221 for (i = 0; i < 2; ++i) { in evict_test_run_tile()
223 bo = xe_bo_create_user(xe, vm, 0x10000, in evict_test_run_tile()
232 external = xe_bo_create_user(xe, NULL, 0x10000, in evict_test_run_tile()
249 err = xe_bo_evict_all(xe); in evict_test_run_tile()
255 for_each_gt(__gt, xe, id) in evict_test_run_tile()
257 err = xe_bo_restore_early(xe); in evict_test_run_tile()
269 for_each_gt(__gt, xe, id) in evict_test_run_tile()
278 err = xe_bo_restore_late(xe); in evict_test_run_tile()
345 return 0; in evict_test_run_tile()
348 static int evict_test_run_device(struct xe_device *xe) in evict_test_run_device() argument
354 if (!IS_DGFX(xe)) { in evict_test_run_device()
356 return 0; in evict_test_run_device()
359 xe_pm_runtime_get(xe); in evict_test_run_device()
361 for_each_tile(tile, xe, id) in evict_test_run_device()
362 evict_test_run_tile(xe, tile, test); in evict_test_run_device()
364 xe_pm_runtime_put(xe); in evict_test_run_device()
366 return 0; in evict_test_run_device()
371 struct xe_device *xe = test->priv; in xe_bo_evict_kunit() local
373 evict_test_run_device(xe); in xe_bo_evict_kunit()
394 for (i = 0; i < bo->ttm.base.size; i += sizeof(u32)) { in shrink_test_fill_random()
398 if (i == 0) in shrink_test_fill_random()
403 return 0; in shrink_test_fill_random()
420 for (i = 0; i < bo->ttm.base.size; i += sizeof(u32)) { in shrink_test_verify()
424 KUNIT_FAIL(test, "Content not preserved, bo %u offset 0x%016llx", in shrink_test_verify()
426 kunit_info(test, "Failed value is 0x%08x, recorded 0x%08x\n", in shrink_test_verify()
428 if (i == 0 && val != link->val) in shrink_test_verify()
446 static int shrink_test_run_device(struct xe_device *xe) in shrink_test_run_device() argument
452 u64 ram, ram_and_swap, purgeable = 0, alloced, to_alloc, limit; in shrink_test_run_device()
453 unsigned int interrupted = 0, successful = 0, count = 0; in shrink_test_run_device()
460 kunit_info(test, "Random seed is 0x%016llx.\n", in shrink_test_run_device()
467 if (!IS_DGFX(xe) && xe_device_has_flat_ccs(xe)) in shrink_test_run_device()
474 return 0; in shrink_test_run_device()
485 for (alloced = 0; alloced < to_alloc; alloced += XE_BO_SHRINK_SIZE) { in shrink_test_run_device()
500 bo = xe_bo_create_user(xe, NULL, XE_BO_SHRINK_SIZE, in shrink_test_run_device()
519 xe_ttm_tt_account_subtract(xe, &xe_tt->ttm); in shrink_test_run_device()
521 xe_ttm_tt_account_add(xe, &xe_tt->ttm); in shrink_test_run_device()
522 bo->ttm.priority = 0; in shrink_test_run_device()
601 return 0; in shrink_test_run_device()
606 struct xe_device *xe = test->priv; in xe_bo_shrink_kunit() local
608 shrink_test_run_device(xe); in xe_bo_shrink_kunit()