aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2019-01-30 07:41:05 -0500
committerAlex Deucher <alexander.deucher@amd.com>2019-02-19 15:58:27 -0500
commit661b96b21c25e05b9a02178b4f19fea83b5dd774 (patch)
treeeac646c8bcfd5a2ac6d17ff7249b6f9dead74c7f /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
parent8466cc61da89d33441e0d7a98de1ba98697cd465 (diff)
drm/amdgpu: partial revert cleanup setting bulk_movable v2
We still need to set bulk_movable to false when new BOs are added or removed. v2: also set it to false on removal Signed-off-by: Christian König <christian.koenig@amd.com> Tested-by: StDenis, Tom <Tom.StDenis@amd.com> Tested-by: Przemek Socha <soprwa@gmail.com> Reviewed-by: Zhou, David(ChunMing) <David1.Zhou@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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index d4c733885e87..b06ffd29ccc6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -332,6 +332,7 @@ static void amdgpu_vm_bo_base_init(struct amdgpu_vm_bo_base *base,
332 if (bo->tbo.resv != vm->root.base.bo->tbo.resv) 332 if (bo->tbo.resv != vm->root.base.bo->tbo.resv)
333 return; 333 return;
334 334
335 vm->bulk_moveable = false;
335 if (bo->tbo.type == ttm_bo_type_kernel) 336 if (bo->tbo.type == ttm_bo_type_kernel)
336 amdgpu_vm_bo_relocated(base); 337 amdgpu_vm_bo_relocated(base);
337 else 338 else
@@ -2755,6 +2756,9 @@ void amdgpu_vm_bo_rmv(struct amdgpu_device *adev,
2755 struct amdgpu_vm_bo_base **base; 2756 struct amdgpu_vm_bo_base **base;
2756 2757
2757 if (bo) { 2758 if (bo) {
2759 if (bo->tbo.resv == vm->root.base.bo->tbo.resv)
2760 vm->bulk_moveable = false;
2761
2758 for (base = &bo_va->base.bo->vm_bo; *base; 2762 for (base = &bo_va->base.bo->vm_bo; *base;
2759 base = &(*base)->next) { 2763 base = &(*base)->next) {
2760 if (*base != &bo_va->base) 2764 if (*base != &bo_va->base)