From: Christian König Date: Wed, 30 Jan 2019 12:41:05 +0000 (+0100) Subject: drm/amdgpu: partial revert cleanup setting bulk_movable v2 X-Git-Tag: v5.15~6763^2~10^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=661b96b21c25e05b9a02178b4f19fea83b5dd774;p=platform%2Fkernel%2Flinux-starfive.git 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 Tested-by: StDenis, Tom Tested-by: Przemek Socha Reviewed-by: Zhou, David(ChunMing) Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index d4c7338..b06ffd2 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, if (bo->tbo.resv != vm->root.base.bo->tbo.resv) return; + vm->bulk_moveable = false; if (bo->tbo.type == ttm_bo_type_kernel) amdgpu_vm_bo_relocated(base); else @@ -2755,6 +2756,9 @@ void amdgpu_vm_bo_rmv(struct amdgpu_device *adev, struct amdgpu_vm_bo_base **base; if (bo) { + if (bo->tbo.resv == vm->root.base.bo->tbo.resv) + vm->bulk_moveable = false; + for (base = &bo_va->base.bo->vm_bo; *base; base = &(*base)->next) { if (*base != &bo_va->base)