aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
diff options
context:
space:
mode:
authorChunming Zhou <David1.Zhou@amd.com>2016-04-14 03:53:55 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-05-04 20:22:58 -0400
commit178d7cb8d576ff837fea8e1b6460c769297615ec (patch)
tree04e16c2c57013fb397e658db7d70bcabade033eb /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
parent68befebee4927036b0f350825a20d46104f375b5 (diff)
drm/amdgpu: fix error checking when reuse vmid on same ring
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 2aff938f94c6..856116a874bb 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -191,7 +191,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
191 if (pd_addr != id->pd_gpu_addr) 191 if (pd_addr != id->pd_gpu_addr)
192 continue; 192 continue;
193 193
194 if (id != vm->ids[ring->idx] && 194 if (id->last_user != ring &&
195 (!id->last_flush || !fence_is_signaled(id->last_flush))) 195 (!id->last_flush || !fence_is_signaled(id->last_flush)))
196 continue; 196 continue;
197 197
@@ -200,7 +200,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
200 continue; 200 continue;
201 201
202 /* Good we can use this VMID */ 202 /* Good we can use this VMID */
203 if (id == vm->ids[ring->idx]) { 203 if (id->last_user == ring) {
204 r = amdgpu_sync_fence(ring->adev, sync, 204 r = amdgpu_sync_fence(ring->adev, sync,
205 id->first); 205 id->first);
206 if (r) 206 if (r)