[PATCH] drm/amdgpu: reserve space before adding a shared fence

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux