Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
if (pd_addr != id->pd_gpu_addr)
continue;
- if (id != vm->ids[ring->idx] &&
+ if (id->last_user != ring &&
(!id->last_flush || !fence_is_signaled(id->last_flush)))
continue;
continue;
/* Good we can use this VMID */
- if (id == vm->ids[ring->idx]) {
+ if (id->last_user == ring) {
r = amdgpu_sync_fence(ring->adev, sync,
id->first);
if (r)