[PATCH] drm/amdgpu: reserve space before adding a shared fence
Junwei Zhang
Jerry.Zhang at amd.com
Mon Apr 10 06:54:19 UTC 2017
Signed-off-by: Junwei Zhang <Jerry.Zhang at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 157ae50..55af909 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -913,6 +913,9 @@ static int amdgpu_vm_update_level(struct amdgpu_device *adev,
if (shadow)
amdgpu_sync_resv(adev, &job->sync, shadow->tbo.resv,
AMDGPU_FENCE_OWNER_VM);
+ r = reservation_object_reserve_shared(parent->bo->tbo.resv);
+ if (r)
+ goto error_free;
WARN_ON(params.ib->length_dw > ndw);
r = amdgpu_job_submit(job, ring, &vm->entity,
--
1.9.1
More information about the amd-gfx
mailing list