Lines Matching refs:pt_update_ops

1266 				 struct xe_vm_pgtable_update_ops *pt_update_ops,  in xe_pt_vm_dependencies()  argument
1279 if (!job && !xe_exec_queue_is_idle(pt_update_ops->q)) in xe_pt_vm_dependencies()
1282 if (pt_update_ops->wait_vm_bookkeep || pt_update_ops->wait_vm_kernel) { in xe_pt_vm_dependencies()
1284 pt_update_ops->wait_vm_bookkeep ? in xe_pt_vm_dependencies()
1291 rtfence = xe_range_fence_tree_first(rftree, pt_update_ops->start, in xe_pt_vm_dependencies()
1292 pt_update_ops->last); in xe_pt_vm_dependencies()
1311 pt_update_ops->start, in xe_pt_vm_dependencies()
1312 pt_update_ops->last); in xe_pt_vm_dependencies()
1321 if (!(pt_update_ops->q->flags & EXEC_QUEUE_FLAG_KERNEL)) { in xe_pt_vm_dependencies()
1325 err = xe_exec_queue_last_fence_test_dep(pt_update_ops->q, vm); in xe_pt_vm_dependencies()
1339 struct xe_vm_pgtable_update_ops *pt_update_ops = in xe_pt_pre_commit() local
1340 &vops->pt_update_ops[pt_update->tile_id]; in xe_pt_pre_commit()
1343 pt_update_ops, rftree); in xe_pt_pre_commit()
1438 struct xe_vm_pgtable_update_ops *pt_update_ops = in xe_pt_userptr_pre_commit() local
1439 &vops->pt_update_ops[pt_update->tile_id]; in xe_pt_userptr_pre_commit()
1450 err = op_check_userptr(vm, op, pt_update_ops); in xe_pt_userptr_pre_commit()
1811 xe_pt_update_ops_rfence_interval(struct xe_vm_pgtable_update_ops *pt_update_ops, in xe_pt_update_ops_rfence_interval() argument
1815 u32 current_op = pt_update_ops->current_op; in xe_pt_update_ops_rfence_interval()
1816 struct xe_vm_pgtable_update_op *pt_op = &pt_update_ops->ops[current_op]; in xe_pt_update_ops_rfence_interval()
1830 if (start < pt_update_ops->start) in xe_pt_update_ops_rfence_interval()
1831 pt_update_ops->start = start; in xe_pt_update_ops_rfence_interval()
1832 if (last > pt_update_ops->last) in xe_pt_update_ops_rfence_interval()
1833 pt_update_ops->last = last; in xe_pt_update_ops_rfence_interval()
1848 struct xe_vm_pgtable_update_ops *pt_update_ops, in bind_op_prepare() argument
1851 u32 current_op = pt_update_ops->current_op; in bind_op_prepare()
1852 struct xe_vm_pgtable_update_op *pt_op = &pt_update_ops->ops[current_op]; in bind_op_prepare()
1878 xe_pt_update_ops_rfence_interval(pt_update_ops, in bind_op_prepare()
1881 ++pt_update_ops->current_op; in bind_op_prepare()
1882 pt_update_ops->needs_userptr_lock |= xe_vma_is_userptr(vma); in bind_op_prepare()
1898 pt_update_ops->needs_invalidation = true; in bind_op_prepare()
1915 struct xe_vm_pgtable_update_ops *pt_update_ops, in bind_range_prepare() argument
1918 u32 current_op = pt_update_ops->current_op; in bind_range_prepare()
1919 struct xe_vm_pgtable_update_op *pt_op = &pt_update_ops->ops[current_op]; in bind_range_prepare()
1940 xe_pt_update_ops_rfence_interval(pt_update_ops, in bind_range_prepare()
1943 ++pt_update_ops->current_op; in bind_range_prepare()
1944 pt_update_ops->needs_svm_lock = true; in bind_range_prepare()
1957 struct xe_vm_pgtable_update_ops *pt_update_ops, in unbind_op_prepare() argument
1960 u32 current_op = pt_update_ops->current_op; in unbind_op_prepare()
1961 struct xe_vm_pgtable_update_op *pt_op = &pt_update_ops->ops[current_op]; in unbind_op_prepare()
1987 xe_pt_update_ops_rfence_interval(pt_update_ops, xe_vma_start(vma), in unbind_op_prepare()
1989 ++pt_update_ops->current_op; in unbind_op_prepare()
1990 pt_update_ops->needs_userptr_lock |= xe_vma_is_userptr(vma); in unbind_op_prepare()
1991 pt_update_ops->needs_invalidation = true; in unbind_op_prepare()
2026 struct xe_vm_pgtable_update_ops *pt_update_ops, in unbind_range_prepare() argument
2029 u32 current_op = pt_update_ops->current_op; in unbind_range_prepare()
2030 struct xe_vm_pgtable_update_op *pt_op = &pt_update_ops->ops[current_op]; in unbind_range_prepare()
2048 xe_pt_update_ops_rfence_interval(pt_update_ops, range->base.itree.start, in unbind_range_prepare()
2050 ++pt_update_ops->current_op; in unbind_range_prepare()
2051 pt_update_ops->needs_svm_lock = true; in unbind_range_prepare()
2052 pt_update_ops->needs_invalidation |= xe_vm_has_scratch(vm) || in unbind_range_prepare()
2065 struct xe_vm_pgtable_update_ops *pt_update_ops, in op_prepare() argument
2079 err = bind_op_prepare(vm, tile, pt_update_ops, op->map.vma, in op_prepare()
2081 pt_update_ops->wait_vm_kernel = true; in op_prepare()
2090 err = unbind_op_prepare(tile, pt_update_ops, old); in op_prepare()
2093 err = bind_op_prepare(vm, tile, pt_update_ops, in op_prepare()
2095 pt_update_ops->wait_vm_bookkeep = true; in op_prepare()
2098 err = bind_op_prepare(vm, tile, pt_update_ops, in op_prepare()
2100 pt_update_ops->wait_vm_bookkeep = true; in op_prepare()
2111 err = unbind_op_prepare(tile, pt_update_ops, vma); in op_prepare()
2123 err = bind_range_prepare(vm, tile, pt_update_ops, in op_prepare()
2129 err = bind_op_prepare(vm, tile, pt_update_ops, vma, false); in op_prepare()
2130 pt_update_ops->wait_vm_kernel = true; in op_prepare()
2138 err = bind_range_prepare(vm, tile, pt_update_ops, in op_prepare()
2142 err = unbind_range_prepare(vm, tile, pt_update_ops, in op_prepare()
2154 xe_pt_update_ops_init(struct xe_vm_pgtable_update_ops *pt_update_ops) in xe_pt_update_ops_init() argument
2156 init_llist_head(&pt_update_ops->deferred); in xe_pt_update_ops_init()
2157 pt_update_ops->start = ~0x0ull; in xe_pt_update_ops_init()
2158 pt_update_ops->last = 0x0ull; in xe_pt_update_ops_init()
2174 struct xe_vm_pgtable_update_ops *pt_update_ops = in xe_pt_update_ops_prepare() local
2175 &vops->pt_update_ops[tile->id]; in xe_pt_update_ops_prepare()
2183 xe_pt_update_ops_init(pt_update_ops); in xe_pt_update_ops_prepare()
2191 err = op_prepare(vops->vm, tile, pt_update_ops, op); in xe_pt_update_ops_prepare()
2197 xe_tile_assert(tile, pt_update_ops->current_op <= in xe_pt_update_ops_prepare()
2198 pt_update_ops->num_ops); in xe_pt_update_ops_prepare()
2211 struct xe_vm_pgtable_update_ops *pt_update_ops, in bind_op_commit() argument
2219 pt_update_ops->wait_vm_bookkeep ? in bind_op_commit()
2224 pt_update_ops->wait_vm_bookkeep ? in bind_op_commit()
2246 if (pt_update_ops->wait_vm_bookkeep && in bind_op_commit()
2253 struct xe_vm_pgtable_update_ops *pt_update_ops, in unbind_op_commit() argument
2261 pt_update_ops->wait_vm_bookkeep ? in unbind_op_commit()
2266 pt_update_ops->wait_vm_bookkeep ? in unbind_op_commit()
2297 struct xe_vm_pgtable_update_ops *pt_update_ops, in op_commit() argument
2309 bind_op_commit(vm, tile, pt_update_ops, op->map.vma, fence, in op_commit()
2319 unbind_op_commit(vm, tile, pt_update_ops, old, fence, fence2); in op_commit()
2322 bind_op_commit(vm, tile, pt_update_ops, op->remap.prev, in op_commit()
2325 bind_op_commit(vm, tile, pt_update_ops, op->remap.next, in op_commit()
2334 unbind_op_commit(vm, tile, pt_update_ops, vma, fence, in op_commit()
2349 bind_op_commit(vm, tile, pt_update_ops, vma, fence, in op_commit()
2408 struct xe_vm_pgtable_update_ops *pt_update_ops = in xe_pt_update_ops_run() local
2409 &vops->pt_update_ops[tile->id]; in xe_pt_update_ops_run()
2418 .ops = pt_update_ops->needs_svm_lock ? in xe_pt_update_ops_run()
2420 pt_update_ops->needs_userptr_lock ? in xe_pt_update_ops_run()
2430 if (!pt_update_ops->current_op) { in xe_pt_update_ops_run()
2442 if (pt_update_ops->needs_invalidation) { in xe_pt_update_ops_run()
2480 for (i = 0; i < pt_update_ops->current_op; ++i) { in xe_pt_update_ops_run()
2481 struct xe_vm_pgtable_update_op *pt_op = &pt_update_ops->ops[i]; in xe_pt_update_ops_run()
2484 pt_op->num_entries, &pt_update_ops->deferred); in xe_pt_update_ops_run()
2490 pt_update_ops->start, in xe_pt_update_ops_run()
2491 pt_update_ops->last, fence)) in xe_pt_update_ops_run()
2499 pt_update_ops->start, in xe_pt_update_ops_run()
2500 pt_update_ops->last, vm->usm.asid); in xe_pt_update_ops_run()
2503 pt_update_ops->start, in xe_pt_update_ops_run()
2504 pt_update_ops->last, vm->usm.asid); in xe_pt_update_ops_run()
2519 pt_update_ops->wait_vm_bookkeep ? in xe_pt_update_ops_run()
2524 op_commit(vops->vm, tile, pt_update_ops, op, fence, NULL); in xe_pt_update_ops_run()
2527 pt_update_ops->wait_vm_bookkeep ? in xe_pt_update_ops_run()
2532 pt_update_ops->wait_vm_bookkeep ? in xe_pt_update_ops_run()
2537 op_commit(vops->vm, tile, pt_update_ops, op, in xe_pt_update_ops_run()
2541 if (pt_update_ops->needs_svm_lock) in xe_pt_update_ops_run()
2543 if (pt_update_ops->needs_userptr_lock) in xe_pt_update_ops_run()
2572 struct xe_vm_pgtable_update_ops *pt_update_ops = in xe_pt_update_ops_fini() local
2573 &vops->pt_update_ops[tile->id]; in xe_pt_update_ops_fini()
2579 for (i = 0; i < pt_update_ops->current_op; ++i) { in xe_pt_update_ops_fini()
2580 struct xe_vm_pgtable_update_op *pt_op = &pt_update_ops->ops[i]; in xe_pt_update_ops_fini()
2584 xe_bo_put_commit(&vops->pt_update_ops[tile->id].deferred); in xe_pt_update_ops_fini()
2596 struct xe_vm_pgtable_update_ops *pt_update_ops = in xe_pt_update_ops_abort() local
2597 &vops->pt_update_ops[tile->id]; in xe_pt_update_ops_abort()
2603 for (i = pt_update_ops->num_ops - 1; i >= 0; --i) { in xe_pt_update_ops_abort()
2605 &pt_update_ops->ops[i]; in xe_pt_update_ops_abort()
2607 if (!pt_op->vma || i >= pt_update_ops->current_op) in xe_pt_update_ops_abort()