diff options
author | Christian König <christian.koenig@amd.com> | 2019-01-30 10:07:29 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-03-19 16:36:48 -0400 |
commit | 0ce15d6f7d3fb1162fd7de2829dbdf6d63a6a02a (patch) | |
tree | c83a9a486a58d392808ea1453a7f5fa8b689d352 /drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | |
parent | 780637cbdf8fd614cc85a01c6c810d9d28902a59 (diff) |
drm/amdgpu: allocate VM PDs/PTs on demand
Let's start to allocate VM PDs/PTs on demand instead of pre-allocating
them during mapping.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c index 4e96ad84efaa..314c048fcac6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | |||
@@ -410,15 +410,7 @@ static int add_bo_to_vm(struct amdgpu_device *adev, struct kgd_mem *mem, | |||
410 | if (p_bo_va_entry) | 410 | if (p_bo_va_entry) |
411 | *p_bo_va_entry = bo_va_entry; | 411 | *p_bo_va_entry = bo_va_entry; |
412 | 412 | ||
413 | /* Allocate new page tables if needed and validate | 413 | /* Allocate validate page tables if needed */ |
414 | * them. | ||
415 | */ | ||
416 | ret = amdgpu_vm_alloc_pts(adev, vm, va, amdgpu_bo_size(bo)); | ||
417 | if (ret) { | ||
418 | pr_err("Failed to allocate pts, err=%d\n", ret); | ||
419 | goto err_alloc_pts; | ||
420 | } | ||
421 | |||
422 | ret = vm_validate_pt_pd_bos(vm); | 414 | ret = vm_validate_pt_pd_bos(vm); |
423 | if (ret) { | 415 | if (ret) { |
424 | pr_err("validate_pt_pd_bos() failed\n"); | 416 | pr_err("validate_pt_pd_bos() failed\n"); |