Lines Matching refs:mem_obj
977 struct kfd_mem_obj **mem_obj) in kfd_gtt_sa_allocate() argument
987 *mem_obj = kzalloc(sizeof(struct kfd_mem_obj), GFP_KERNEL); in kfd_gtt_sa_allocate()
988 if (!(*mem_obj)) in kfd_gtt_sa_allocate()
991 pr_debug("Allocated mem_obj = %p for size = %d\n", *mem_obj, size); in kfd_gtt_sa_allocate()
1010 (*mem_obj)->range_start = found; in kfd_gtt_sa_allocate()
1011 (*mem_obj)->range_end = found; in kfd_gtt_sa_allocate()
1012 (*mem_obj)->gpu_addr = kfd_gtt_sa_calc_gpu_addr( in kfd_gtt_sa_allocate()
1016 (*mem_obj)->cpu_ptr = kfd_gtt_sa_calc_cpu_addr( in kfd_gtt_sa_allocate()
1022 (uint64_t *) (*mem_obj)->gpu_addr, (*mem_obj)->cpu_ptr); in kfd_gtt_sa_allocate()
1034 (*mem_obj)->range_end = in kfd_gtt_sa_allocate()
1042 if ((*mem_obj)->range_end != found) { in kfd_gtt_sa_allocate()
1062 (*mem_obj)->range_start, (*mem_obj)->range_end); in kfd_gtt_sa_allocate()
1065 bitmap_set(kfd->gtt_sa_bitmap, (*mem_obj)->range_start, in kfd_gtt_sa_allocate()
1066 (*mem_obj)->range_end - (*mem_obj)->range_start + 1); in kfd_gtt_sa_allocate()
1073 pr_debug("Allocation failed with mem_obj = %p\n", *mem_obj); in kfd_gtt_sa_allocate()
1075 kfree(*mem_obj); in kfd_gtt_sa_allocate()
1079 int kfd_gtt_sa_free(struct kfd_dev *kfd, struct kfd_mem_obj *mem_obj) in kfd_gtt_sa_free() argument
1082 if (!mem_obj) in kfd_gtt_sa_free()
1086 mem_obj, mem_obj->range_start, mem_obj->range_end); in kfd_gtt_sa_free()
1091 bitmap_clear(kfd->gtt_sa_bitmap, mem_obj->range_start, in kfd_gtt_sa_free()
1092 mem_obj->range_end - mem_obj->range_start + 1); in kfd_gtt_sa_free()
1096 kfree(mem_obj); in kfd_gtt_sa_free()