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

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

Signed-off-by: default avatarChunming Zhou <David1.Zhou@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 68befebe
...@@ -191,7 +191,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring, ...@@ -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, ...@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment