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

Commit 79aa0389 authored by Christian König's avatar Christian König Committed by Alex Deucher
Browse files

drm/amdgpu: remove owner cleanup v2



The client ID is now unique, so no need to resert the owner fields any more.

v2: remove unused variables as well

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com> (v1)
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 0ea54b9b
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -1457,7 +1457,6 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm)
void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm)
{
	struct amdgpu_bo_va_mapping *mapping, *tmp;
	struct amdgpu_vm_id *id, *id_tmp;
	int i;

	amd_sched_entity_fini(vm->entity.sched, &vm->entity);
@@ -1481,18 +1480,6 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm)

	amdgpu_bo_unref(&vm->page_directory);
	fence_put(vm->page_directory_fence);

	mutex_lock(&adev->vm_manager.lock);
	list_for_each_entry_safe(id, id_tmp, &adev->vm_manager.ids_lru,
				 list) {
		if (!id)
			continue;
		if (atomic_long_read(&id->owner) == vm->client_id) {
			atomic_long_set(&id->owner, 0);
			id->pd_gpu_addr = 0;
		}
	}
	mutex_unlock(&adev->vm_manager.lock);
}

/**