Lines Matching refs:gart
119 if (adev->gart.bo == NULL) { in amdgpu_gart_table_vram_alloc()
123 bp.size = adev->gart.table_size; in amdgpu_gart_table_vram_alloc()
132 r = amdgpu_bo_create(adev, &bp, &adev->gart.bo); in amdgpu_gart_table_vram_alloc()
154 r = amdgpu_bo_reserve(adev->gart.bo, false); in amdgpu_gart_table_vram_pin()
157 r = amdgpu_bo_pin(adev->gart.bo, AMDGPU_GEM_DOMAIN_VRAM); in amdgpu_gart_table_vram_pin()
159 amdgpu_bo_unreserve(adev->gart.bo); in amdgpu_gart_table_vram_pin()
162 r = amdgpu_bo_kmap(adev->gart.bo, &adev->gart.ptr); in amdgpu_gart_table_vram_pin()
164 amdgpu_bo_unpin(adev->gart.bo); in amdgpu_gart_table_vram_pin()
165 amdgpu_bo_unreserve(adev->gart.bo); in amdgpu_gart_table_vram_pin()
181 if (adev->gart.bo == NULL) { in amdgpu_gart_table_vram_unpin()
184 r = amdgpu_bo_reserve(adev->gart.bo, true); in amdgpu_gart_table_vram_unpin()
186 amdgpu_bo_kunmap(adev->gart.bo); in amdgpu_gart_table_vram_unpin()
187 amdgpu_bo_unpin(adev->gart.bo); in amdgpu_gart_table_vram_unpin()
188 amdgpu_bo_unreserve(adev->gart.bo); in amdgpu_gart_table_vram_unpin()
189 adev->gart.ptr = NULL; in amdgpu_gart_table_vram_unpin()
204 if (adev->gart.bo == NULL) { in amdgpu_gart_table_vram_free()
207 amdgpu_bo_unref(&adev->gart.bo); in amdgpu_gart_table_vram_free()
208 adev->gart.ptr = NULL; in amdgpu_gart_table_vram_free()
236 if (!adev->gart.ready) { in amdgpu_gart_unbind()
248 if (!adev->gart.ptr) in amdgpu_gart_unbind()
252 amdgpu_gmc_set_pte_pde(adev, adev->gart.ptr, in amdgpu_gart_unbind()
287 if (!adev->gart.ready) { in amdgpu_gart_map()
325 if (!adev->gart.ready) { in amdgpu_gart_bind()
330 if (!adev->gart.ptr) in amdgpu_gart_bind()
334 adev->gart.ptr); in amdgpu_gart_bind()
379 adev->gart.num_cpu_pages = adev->gmc.gart_size / PAGE_SIZE; in amdgpu_gart_init()
380 adev->gart.num_gpu_pages = adev->gmc.gart_size / AMDGPU_GPU_PAGE_SIZE; in amdgpu_gart_init()
382 adev->gart.num_cpu_pages, adev->gart.num_gpu_pages); in amdgpu_gart_init()