|
| #define | drm_gpuvm_resv(gpuvm__) ((gpuvm__)->r_obj->resv) |
| |
| #define | drm_gpuvm_resv_obj(gpuvm__) ((gpuvm__)->r_obj) |
| |
| #define | drm_gpuvm_resv_held(gpuvm__) dma_resv_held(drm_gpuvm_resv(gpuvm__)) |
| |
| #define | drm_gpuvm_resv_assert_held(gpuvm__) dma_resv_assert_held(drm_gpuvm_resv(gpuvm__)) |
| |
| #define | drm_gpuvm_resv_held(gpuvm__) dma_resv_held(drm_gpuvm_resv(gpuvm__)) |
| |
| #define | drm_gpuvm_resv_assert_held(gpuvm__) dma_resv_assert_held(drm_gpuvm_resv(gpuvm__)) |
| |
| #define | drm_gpuvm_for_each_va_range(va__, gpuvm__, start__, end__) |
| |
| #define | drm_gpuvm_for_each_va_range_safe(va__, next__, gpuvm__, start__, end__) |
| |
| #define | drm_gpuvm_for_each_va(va__, gpuvm__) list_for_each_entry(va__, &(gpuvm__)->rb.list, rb.entry) |
| |
| #define | drm_gpuvm_for_each_va_safe(va__, next__, gpuvm__) list_for_each_entry_safe(va__, next__, &(gpuvm__)->rb.list, rb.entry) |
| |
| #define | drm_gpuvm_bo_for_each_va(va__, vm_bo__) list_for_each_entry(va__, &(vm_bo)->list.gpuva, gem.entry) |
| |
| #define | drm_gpuvm_bo_for_each_va_safe(va__, next__, vm_bo__) list_for_each_entry_safe(va__, next__, &(vm_bo)->list.gpuva, gem.entry) |
| |
| #define | drm_gpuva_for_each_op(op, ops) list_for_each_entry(op, &(ops)->list, entry) |
| |
| #define | drm_gpuva_for_each_op_safe(op, next, ops) list_for_each_entry_safe(op, next, &(ops)->list, entry) |
| |
| #define | drm_gpuva_for_each_op_from_reverse(op, ops) list_for_each_entry_from_reverse(op, &(ops)->list, entry) |
| |
| #define | drm_gpuva_for_each_op_reverse(op, ops) list_for_each_entry_reverse(op, &(ops)->list, entry) |
| |
| #define | drm_gpuva_first_op(ops) list_first_entry(&(ops)->list, struct drm_gpuva_op, entry) |
| |
| #define | drm_gpuva_last_op(ops) list_last_entry(&(ops)->list, struct drm_gpuva_op, entry) |
| |
| #define | drm_gpuva_prev_op(op) list_prev_entry(op, entry) |
| |
| #define | drm_gpuva_next_op(op) list_next_entry(op, entry) |
| |
|
| int | drm_gpuva_insert (struct drm_gpuvm *gpuvm, struct drm_gpuva *va) |
| |
| void | drm_gpuva_remove (struct drm_gpuva *va) |
| |
| void | drm_gpuva_link (struct drm_gpuva *va, struct drm_gpuvm_bo *vm_bo) |
| |
| void | drm_gpuva_unlink (struct drm_gpuva *va) |
| |
| void | drm_gpuva_unlink_defer (struct drm_gpuva *va) |
| |
| struct drm_gpuva * | drm_gpuva_find (struct drm_gpuvm *gpuvm, u64 addr, u64 range) |
| |
| struct drm_gpuva * | drm_gpuva_find_first (struct drm_gpuvm *gpuvm, u64 addr, u64 range) |
| |
| struct drm_gpuva * | drm_gpuva_find_prev (struct drm_gpuvm *gpuvm, u64 start) |
| |
| struct drm_gpuva * | drm_gpuva_find_next (struct drm_gpuvm *gpuvm, u64 end) |
| |
| void | drm_gpuvm_init (struct drm_gpuvm *gpuvm, const char *name, enum drm_gpuvm_flags flags, struct drm_device *drm, struct drm_gem_object *r_obj, u64 start_offset, u64 range, u64 reserve_offset, u64 reserve_range, const struct drm_gpuvm_ops *ops) |
| |
| void | drm_gpuvm_put (struct drm_gpuvm *gpuvm) |
| |
| bool | drm_gpuvm_range_valid (struct drm_gpuvm *gpuvm, u64 addr, u64 range) |
| |
| bool | drm_gpuvm_interval_empty (struct drm_gpuvm *gpuvm, u64 addr, u64 range) |
| |
| struct drm_gem_object * | drm_gpuvm_resv_object_alloc (struct drm_device *drm) |
| |
| int | drm_gpuvm_prepare_vm (struct drm_gpuvm *gpuvm, struct drm_exec *exec, unsigned int num_fences) |
| |
| int | drm_gpuvm_prepare_objects (struct drm_gpuvm *gpuvm, struct drm_exec *exec, unsigned int num_fences) |
| |
| int | drm_gpuvm_prepare_range (struct drm_gpuvm *gpuvm, struct drm_exec *exec, u64 addr, u64 range, unsigned int num_fences) |
| |
| int | drm_gpuvm_exec_lock (struct drm_gpuvm_exec *vm_exec) |
| |
| int | drm_gpuvm_exec_lock_array (struct drm_gpuvm_exec *vm_exec, struct drm_gem_object **objs, unsigned int num_objs) |
| |
| int | drm_gpuvm_exec_lock_range (struct drm_gpuvm_exec *vm_exec, u64 addr, u64 range) |
| |
| int | drm_gpuvm_validate (struct drm_gpuvm *gpuvm, struct drm_exec *exec) |
| |
| void | drm_gpuvm_resv_add_fence (struct drm_gpuvm *gpuvm, struct drm_exec *exec, struct dma_fence *fence, enum dma_resv_usage private_usage, enum dma_resv_usage extobj_usage) |
| |
| struct drm_gpuvm_bo * | drm_gpuvm_bo_create (struct drm_gpuvm *gpuvm, struct drm_gem_object *obj) |
| |
| struct drm_gpuvm_bo * | drm_gpuvm_bo_obtain_locked (struct drm_gpuvm *gpuvm, struct drm_gem_object *obj) |
| |
| struct drm_gpuvm_bo * | drm_gpuvm_bo_obtain_prealloc (struct drm_gpuvm_bo *vm_bo) |
| |
| bool | drm_gpuvm_bo_put (struct drm_gpuvm_bo *vm_bo) |
| |
| bool | drm_gpuvm_bo_put_deferred (struct drm_gpuvm_bo *vm_bo) |
| |
| void | drm_gpuvm_bo_deferred_cleanup (struct drm_gpuvm *gpuvm) |
| |
| struct drm_gpuvm_bo * | drm_gpuvm_bo_find (struct drm_gpuvm *gpuvm, struct drm_gem_object *obj) |
| |
| void | drm_gpuvm_bo_evict (struct drm_gpuvm_bo *vm_bo, bool evict) |
| |
| void | drm_gpuvm_bo_extobj_add (struct drm_gpuvm_bo *vm_bo) |
| |
| struct drm_gpuva_ops * | drm_gpuvm_sm_map_ops_create (struct drm_gpuvm *gpuvm, const struct drm_gpuvm_map_req *req) |
| |
| struct drm_gpuva_ops * | drm_gpuvm_madvise_ops_create (struct drm_gpuvm *gpuvm, const struct drm_gpuvm_map_req *req) |
| |
| struct drm_gpuva_ops * | drm_gpuvm_sm_unmap_ops_create (struct drm_gpuvm *gpuvm, u64 addr, u64 range) |
| |
| struct drm_gpuva_ops * | drm_gpuvm_prefetch_ops_create (struct drm_gpuvm *gpuvm, u64 addr, u64 range) |
| |
| struct drm_gpuva_ops * | drm_gpuvm_bo_unmap_ops_create (struct drm_gpuvm_bo *vm_bo) |
| |
| void | drm_gpuva_ops_free (struct drm_gpuvm *gpuvm, struct drm_gpuva_ops *ops) |
| |
| int | drm_gpuvm_sm_map (struct drm_gpuvm *gpuvm, void *priv, const struct drm_gpuvm_map_req *req) |
| |
| int | drm_gpuvm_sm_unmap (struct drm_gpuvm *gpuvm, void *priv, u64 addr, u64 range) |
| |
| int | drm_gpuvm_sm_map_exec_lock (struct drm_gpuvm *gpuvm, struct drm_exec *exec, unsigned int num_fences, struct drm_gpuvm_map_req *req) |
| |
| int | drm_gpuvm_sm_unmap_exec_lock (struct drm_gpuvm *gpuvm, struct drm_exec *exec, u64 req_addr, u64 req_range) |
| |
| void | drm_gpuva_map (struct drm_gpuvm *gpuvm, struct drm_gpuva *va, const struct drm_gpuva_op_map *op) |
| |
| void | drm_gpuva_remap (struct drm_gpuva *prev, struct drm_gpuva *next, const struct drm_gpuva_op_remap *op) |
| |
| void | drm_gpuva_unmap (const struct drm_gpuva_op_unmap *op) |
| |
| #define drm_gpuvm_for_each_va_range |
( |
|
va__, |
|
|
|
gpuvm__, |
|
|
|
start__, |
|
|
|
end__ |
|
) |
| |
Value:
va__ && (va__->va.addr < (end__)); \
va__ = __drm_gpuva_next(va__))
struct drm_gpuva * drm_gpuva_find_first(struct drm_gpuvm *gpuvm, u64 addr, u64 range)
drm_gpuvm_for_each_va_range() - iterate over a range of &drm_gpuvas @va__: &drm_gpuva structure to assign to in each iteration step @gpuvm__: &drm_gpuvm to walk over @start__: starting offset, the first gpuva will overlap this @end__: ending offset, the last gpuva will start before this (but may overlap)
This iterator walks over all &drm_gpuvas in the &drm_gpuvm that lie between @start__ and @end__. It is implemented similarly to list_for_each(), but is using the &drm_gpuvm's internal interval tree to accelerate the search for the starting &drm_gpuva, and hence isn't safe against removal of elements. It assumes that @end__ is within (or is the upper limit of) the &drm_gpuvm. This iterator does not skip over the &drm_gpuvm's @kernel_alloc_node.
| #define drm_gpuvm_for_each_va_range_safe |
( |
|
va__, |
|
|
|
next__, |
|
|
|
gpuvm__, |
|
|
|
start__, |
|
|
|
end__ |
|
) |
| |
Value:
next__ = __drm_gpuva_next(va__); \
va__ && (va__->va.addr < (end__)); \
va__ = next__, next__ = __drm_gpuva_next(va__))
drm_gpuvm_for_each_va_range_safe() - safely iterate over a range of &drm_gpuvas @va__: &drm_gpuva to assign to in each iteration step @next__: another &drm_gpuva to use as temporary storage @gpuvm__: &drm_gpuvm to walk over @start__: starting offset, the first gpuva will overlap this @end__: ending offset, the last gpuva will start before this (but may overlap)
This iterator walks over all &drm_gpuvas in the &drm_gpuvm that lie between @start__ and @end__. It is implemented similarly to list_for_each_safe(), but is using the &drm_gpuvm's internal interval tree to accelerate the search for the starting &drm_gpuva, and hence is safe against removal of elements. It assumes that @end__ is within (or is the upper limit of) the &drm_gpuvm. This iterator does not skip over the &drm_gpuvm's @kernel_alloc_node.