diff options
author | Felix Kuehling <Felix.Kuehling@amd.com> | 2018-09-05 20:19:54 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-09-10 23:44:48 -0400 |
commit | 03e9dee11db0cc244baf21a690fbb0664ab1b1b7 (patch) | |
tree | 4a146ed7b56c4b083ba07e07952076a1898c0ab2 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
parent | c3e1b43c2c1ef9d0eb735cc5e0675100c95b91fa (diff) |
drm/amdgpu: Fix compute VM BO params after rebase v2
The intent of two commits was lost in the last rebase:
810955b drm/amdgpu: Fix acquiring VM on large-BAR systems
b5d21aa drm/amdgpu: Don't use shadow BO for compute context
This commit restores the original behaviour:
* Don't set AMDGPU_GEM_CREATE_NO_CPU_ACCESS for page directories
to allow them to be reused for compute VMs
* Don't create shadow BOs for page tables in compute VMs
v2: move more logic into amdgpu_vm_bo_param
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Tested-by: Kent Russell <Kent.Russell@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index ea5e277ae038..1d7e3c17e542 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |||
@@ -595,9 +595,8 @@ static void amdgpu_vm_bo_param(struct amdgpu_device *adev, struct amdgpu_vm *vm, | |||
595 | AMDGPU_GEM_CREATE_CPU_GTT_USWC; | 595 | AMDGPU_GEM_CREATE_CPU_GTT_USWC; |
596 | if (vm->use_cpu_for_update) | 596 | if (vm->use_cpu_for_update) |
597 | bp->flags |= AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED; | 597 | bp->flags |= AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED; |
598 | else | 598 | else if (!vm->root.base.bo || vm->root.base.bo->shadow) |
599 | bp->flags |= AMDGPU_GEM_CREATE_SHADOW | | 599 | bp->flags |= AMDGPU_GEM_CREATE_SHADOW; |
600 | AMDGPU_GEM_CREATE_NO_CPU_ACCESS; | ||
601 | bp->type = ttm_bo_type_kernel; | 600 | bp->type = ttm_bo_type_kernel; |
602 | if (vm->root.base.bo) | 601 | if (vm->root.base.bo) |
603 | bp->resv = vm->root.base.bo->tbo.resv; | 602 | bp->resv = vm->root.base.bo->tbo.resv; |
@@ -2749,6 +2748,8 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm, | |||
2749 | vm->last_update = NULL; | 2748 | vm->last_update = NULL; |
2750 | 2749 | ||
2751 | amdgpu_vm_bo_param(adev, vm, adev->vm_manager.root_level, &bp); | 2750 | amdgpu_vm_bo_param(adev, vm, adev->vm_manager.root_level, &bp); |
2751 | if (vm_context == AMDGPU_VM_CONTEXT_COMPUTE) | ||
2752 | bp.flags &= ~AMDGPU_GEM_CREATE_SHADOW; | ||
2752 | r = amdgpu_bo_create(adev, &bp, &root); | 2753 | r = amdgpu_bo_create(adev, &bp, &root); |
2753 | if (r) | 2754 | if (r) |
2754 | goto error_free_sched_entity; | 2755 | goto error_free_sched_entity; |