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

Commit 178d7cb8 authored by Chunming Zhou's avatar Chunming Zhou Committed by Alex Deucher
Browse files

drm/amdgpu: fix error checking when reuse vmid on same ring

parent 68befebe
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -191,7 +191,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
		if (pd_addr != id->pd_gpu_addr)
		if (pd_addr != id->pd_gpu_addr)
			continue;
			continue;


		if (id != vm->ids[ring->idx] &&
		if (id->last_user != ring &&
		    (!id->last_flush || !fence_is_signaled(id->last_flush)))
		    (!id->last_flush || !fence_is_signaled(id->last_flush)))
			continue;
			continue;


@@ -200,7 +200,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
			continue;
			continue;


		/* Good we can use this VMID */
		/* Good we can use this VMID */
		if (id == vm->ids[ring->idx]) {
		if (id->last_user == ring) {
			r = amdgpu_sync_fence(ring->adev, sync,
			r = amdgpu_sync_fence(ring->adev, sync,
					      id->first);
					      id->first);
			if (r)
			if (r)