Lines Matching refs:vce_bo
240 static void alloc_resource(struct amdgpu_vce_bo *vce_bo, unsigned size, unsigned domain) in alloc_resource() argument
260 vce_bo->addr = va; in alloc_resource()
261 vce_bo->handle = buf_handle; in alloc_resource()
262 vce_bo->size = req.alloc_size; in alloc_resource()
263 vce_bo->va_handle = va_handle; in alloc_resource()
264 r = amdgpu_bo_cpu_map(vce_bo->handle, (void **)&vce_bo->ptr); in alloc_resource()
266 memset(vce_bo->ptr, 0, size); in alloc_resource()
267 r = amdgpu_bo_cpu_unmap(vce_bo->handle); in alloc_resource()
271 static void free_resource(struct amdgpu_vce_bo *vce_bo) in free_resource() argument
275 r = amdgpu_bo_va_op(vce_bo->handle, 0, vce_bo->size, in free_resource()
276 vce_bo->addr, 0, AMDGPU_VA_OP_UNMAP); in free_resource()
279 r = amdgpu_va_range_free(vce_bo->va_handle); in free_resource()
282 r = amdgpu_bo_free(vce_bo->handle); in free_resource()
284 memset(vce_bo, 0, sizeof(*vce_bo)); in free_resource()