aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-06-25 05:07:17 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-07-10 16:36:21 -0400
commited6b4b5559769c6c5a0fcb3fac8a9e1f4e58c4ae (patch)
tree0e5340306fc66bbf8835c9ad49011ce69ec111db /drivers
parent5292221d6ddfed75e5b46cd42237a677094b99f3 (diff)
drm/amdgpu: Reserve VM root shared fence slot for command submission (v3)
Without this, there could not be enough slots, which could trigger the BUG_ON in reservation_object_add_shared_fence. v2: * Jump to the error label instead of returning directly (Jerry Zhang) v3: * Reserve slots for command submission after VM updates (Christian König) Cc: stable@vger.kernel.org Bugzilla: https://bugs.freedesktop.org/106418 Reported-by: mikhail.v.gavrilov@gmail.com Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 82312a7bc6ad..9c85a90be293 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -927,6 +927,10 @@ static int amdgpu_cs_ib_vm_chunk(struct amdgpu_device *adev,
927 r = amdgpu_bo_vm_update_pte(p); 927 r = amdgpu_bo_vm_update_pte(p);
928 if (r) 928 if (r)
929 return r; 929 return r;
930
931 r = reservation_object_reserve_shared(vm->root.base.bo->tbo.resv);
932 if (r)
933 return r;
930 } 934 }
931 935
932 return amdgpu_cs_sync_rings(p); 936 return amdgpu_cs_sync_rings(p);