提交 178d7cb8 编写于 作者: C Chunming Zhou 提交者: Alex Deucher

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

Signed-off-by: NChunming Zhou <David1.Zhou@amd.com>
Reviewed-by: NChristian König <christian.koenig@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册