From: Chunming Zhou Date: Thu, 14 Apr 2016 07:53:55 +0000 (+0800) Subject: drm/amdgpu: fix error checking when reuse vmid on same ring X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=178d7cb8d576ff837fea8e1b6460c769297615ec;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/amdgpu: fix error checking when reuse vmid on same ring Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher --- 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, 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; @@ -200,7 +200,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring, 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)