Lines Matching refs:ctx

117 				  struct ttm_operation_ctx *ctx,
142 ret = ttm_tt_populate(bo->bdev, bo->ttm, ctx);
152 ret = bdev->funcs->move(bo, evict, ctx, mem, hop);
159 ctx->bytes_moved += bo->base.size;
400 struct ttm_operation_ctx *ctx,
411 ret = ttm_bo_mem_space(bo, &hop_placement, &hop_mem, ctx);
415 ret = ttm_bo_handle_move_mem(bo, hop_mem, false, ctx, NULL);
424 struct ttm_operation_ctx *ctx)
441 ret = ttm_bo_wait_ctx(bo, ctx);
452 ret = ttm_bo_mem_space(bo, &placement, &evict_mem, ctx);
463 ret = ttm_bo_handle_move_mem(bo, evict_mem, true, ctx, &hop);
467 ret = ttm_bo_bounce_temp_buffer(bo, &evict_mem, ctx, &hop);
507 * a. if share same reservation object with ctx->resv, have assumption
515 struct ttm_operation_ctx *ctx,
528 if (bo->base.resv == ctx->resv) {
530 if (ctx->allow_res_evict)
558 * @ctx: operation context
564 struct ttm_operation_ctx *ctx,
572 if (ctx->interruptible)
592 struct ttm_operation_ctx *ctx,
605 if (!ttm_bo_evict_swapout_allowable(res->bo, ctx, place,
625 ret = ttm_mem_evict_wait_busy(busy_bo, ctx, ticket);
632 ret = ttm_bo_cleanup_refs(bo, ctx->interruptible,
633 ctx->no_wait_gpu, locked);
640 ret = ttm_bo_evict(bo, ctx);
729 struct ttm_operation_ctx *ctx)
744 ret = ttm_mem_evict_first(bdev, man, place, ctx,
750 return ttm_bo_add_move_fence(bo, man, *mem, ctx->no_wait_gpu);
760 * @ctx: if and how to sleep, lock buffers and alloc memory
774 struct ttm_operation_ctx *ctx)
799 ret = ttm_bo_add_move_fence(bo, man, *mem, ctx->no_wait_gpu);
819 ret = ttm_bo_mem_force_space(bo, place, mem, ctx);
840 struct ttm_operation_ctx *ctx)
857 ret = ttm_bo_mem_space(bo, placement, &mem, ctx);
861 ret = ttm_bo_handle_move_mem(bo, mem, false, ctx, &hop);
863 ret = ttm_bo_bounce_temp_buffer(bo, &mem, ctx, &hop);
880 * @ctx: validation parameters.
892 struct ttm_operation_ctx *ctx)
912 ret = ttm_bo_move_buffer(bo, placement, ctx);
936 * @ctx: TTM operation context for memory allocation.
963 uint32_t alignment, struct ttm_operation_ctx *ctx,
1002 ret = ttm_bo_validate(bo, placement, ctx);
1060 struct ttm_operation_ctx ctx = { interruptible, false };
1063 ret = ttm_bo_init_reserved(bdev, bo, type, placement, alignment, &ctx,
1097 * @ctx: defines how to wait
1103 int ttm_bo_wait_ctx(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx)
1107 if (ctx->no_wait_gpu) {
1116 ctx->interruptible, 15 * HZ);
1125 int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
1140 if (!ttm_bo_evict_swapout_allowable(bo, ctx, &place, &locked, NULL))
1174 ret = ttm_bo_handle_move_mem(bo, evict_mem, true, ctx, &hop);
1185 ret = ttm_bo_wait_ctx(bo, ctx);