Lines Matching refs:node
98 struct ttm_range_mgr_node *node = to_ttm_range_mgr_node(res); in amdgpu_gtt_mgr_has_gart_addr() local
100 return drm_mm_node_allocated(&node->mm_nodes[0]); in amdgpu_gtt_mgr_has_gart_addr()
120 struct ttm_range_mgr_node *node; in amdgpu_gtt_mgr_new() local
123 node = kzalloc(struct_size(node, mm_nodes, 1), GFP_KERNEL); in amdgpu_gtt_mgr_new()
124 if (!node) in amdgpu_gtt_mgr_new()
127 ttm_resource_init(tbo, place, &node->base); in amdgpu_gtt_mgr_new()
136 r = drm_mm_insert_node_in_range(&mgr->mm, &node->mm_nodes[0], in amdgpu_gtt_mgr_new()
144 node->base.start = node->mm_nodes[0].start; in amdgpu_gtt_mgr_new()
146 node->mm_nodes[0].start = 0; in amdgpu_gtt_mgr_new()
147 node->mm_nodes[0].size = PFN_UP(node->base.size); in amdgpu_gtt_mgr_new()
148 node->base.start = AMDGPU_BO_INVALID_OFFSET; in amdgpu_gtt_mgr_new()
151 *res = &node->base; in amdgpu_gtt_mgr_new()
155 ttm_resource_fini(man, &node->base); in amdgpu_gtt_mgr_new()
156 kfree(node); in amdgpu_gtt_mgr_new()
171 struct ttm_range_mgr_node *node = to_ttm_range_mgr_node(res); in amdgpu_gtt_mgr_del() local
175 if (drm_mm_node_allocated(&node->mm_nodes[0])) in amdgpu_gtt_mgr_del()
176 drm_mm_remove_node(&node->mm_nodes[0]); in amdgpu_gtt_mgr_del()
180 kfree(node); in amdgpu_gtt_mgr_del()
192 struct ttm_range_mgr_node *node; in amdgpu_gtt_mgr_recover() local
199 node = container_of(mm_node, typeof(*node), mm_nodes[0]); in amdgpu_gtt_mgr_recover()
200 amdgpu_ttm_recover_gart(node->base.bo); in amdgpu_gtt_mgr_recover()