Lines Matching refs:mem_obj

1243 			struct kfd_mem_obj **mem_obj)  in kfd_gtt_sa_allocate()  argument
1254 *mem_obj = kzalloc(sizeof(struct kfd_mem_obj), GFP_KERNEL); in kfd_gtt_sa_allocate()
1255 if (!(*mem_obj)) in kfd_gtt_sa_allocate()
1258 pr_debug("Allocated mem_obj = %p for size = %d\n", *mem_obj, size); in kfd_gtt_sa_allocate()
1277 (*mem_obj)->range_start = found; in kfd_gtt_sa_allocate()
1278 (*mem_obj)->range_end = found; in kfd_gtt_sa_allocate()
1279 (*mem_obj)->gpu_addr = kfd_gtt_sa_calc_gpu_addr( in kfd_gtt_sa_allocate()
1283 (*mem_obj)->cpu_ptr = kfd_gtt_sa_calc_cpu_addr( in kfd_gtt_sa_allocate()
1289 (uint64_t *) (*mem_obj)->gpu_addr, (*mem_obj)->cpu_ptr); in kfd_gtt_sa_allocate()
1301 (*mem_obj)->range_end = in kfd_gtt_sa_allocate()
1309 if ((*mem_obj)->range_end != found) { in kfd_gtt_sa_allocate()
1329 (*mem_obj)->range_start, (*mem_obj)->range_end); in kfd_gtt_sa_allocate()
1332 bitmap_set(kfd->gtt_sa_bitmap, (*mem_obj)->range_start, in kfd_gtt_sa_allocate()
1333 (*mem_obj)->range_end - (*mem_obj)->range_start + 1); in kfd_gtt_sa_allocate()
1340 pr_debug("Allocation failed with mem_obj = %p\n", *mem_obj); in kfd_gtt_sa_allocate()
1342 kfree(*mem_obj); in kfd_gtt_sa_allocate()
1346 int kfd_gtt_sa_free(struct kfd_node *node, struct kfd_mem_obj *mem_obj) in kfd_gtt_sa_free() argument
1351 if (!mem_obj) in kfd_gtt_sa_free()
1355 mem_obj, mem_obj->range_start, mem_obj->range_end); in kfd_gtt_sa_free()
1360 bitmap_clear(kfd->gtt_sa_bitmap, mem_obj->range_start, in kfd_gtt_sa_free()
1361 mem_obj->range_end - mem_obj->range_start + 1); in kfd_gtt_sa_free()
1365 kfree(mem_obj); in kfd_gtt_sa_free()