Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 661b96b2 authored by Christian König's avatar Christian König Committed by Alex Deucher
Browse files

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: default avatarChristian König <christian.koenig@amd.com>
Tested-by: default avatarStDenis, Tom <Tom.StDenis@amd.com>
Tested-by: default avatarPrzemek Socha <soprwa@gmail.com>
Reviewed-by: default avatarZhou, David(ChunMing) <David1.Zhou@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8466cc61
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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)