Lines Matching refs:vcn_bo
235 static void alloc_resource(struct amdgpu_vcn_bo *vcn_bo, in alloc_resource() argument
256 vcn_bo->addr = va; in alloc_resource()
257 vcn_bo->handle = buf_handle; in alloc_resource()
258 vcn_bo->size = req.alloc_size; in alloc_resource()
259 vcn_bo->va_handle = va_handle; in alloc_resource()
260 r = amdgpu_bo_cpu_map(vcn_bo->handle, (void **)&vcn_bo->ptr); in alloc_resource()
262 memset(vcn_bo->ptr, 0, size); in alloc_resource()
263 r = amdgpu_bo_cpu_unmap(vcn_bo->handle); in alloc_resource()
267 static void free_resource(struct amdgpu_vcn_bo *vcn_bo) in free_resource() argument
271 r = amdgpu_bo_va_op(vcn_bo->handle, 0, vcn_bo->size, in free_resource()
272 vcn_bo->addr, 0, AMDGPU_VA_OP_UNMAP); in free_resource()
275 r = amdgpu_va_range_free(vcn_bo->va_handle); in free_resource()
278 r = amdgpu_bo_free(vcn_bo->handle); in free_resource()
280 memset(vcn_bo, 0, sizeof(*vcn_bo)); in free_resource()