Re: [PATCH] drm/amdgpu: Reserve fence slots for command submission

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

 



Am 04.07.2018 um 05:02 schrieb Junwei Zhang:
From: Michel Dänzer <michel.daenzer@xxxxxxx>

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@xxxxxxxxxxxxxxx
Bugzilla: https://bugs.freedesktop.org/106418
Reported-by: mikhail.v.gavrilov@xxxxxxxxx
Signed-off-by: Michel Dänzer <michel.daenzer@xxxxxxx>
Signed-off-by: Junwei Zhang <Jerry.Zhang@xxxxxxx>

I would put that at the end of amdgpu_bo_vm_update_pte(), but that is only a minor nit pick.

Patch is Reviewed-by: Christian König <christian.koenig@xxxxxxx> anyway.

Regards,
Christian.

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++++
  1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 7a625f3..1bc0281 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -928,6 +928,10 @@ static int amdgpu_cs_ib_vm_chunk(struct amdgpu_device *adev,
  		r = amdgpu_bo_vm_update_pte(p);
  		if (r)
  			return r;
+
+		r = reservation_object_reserve_shared(vm->root.base.bo->tbo.resv);
+		if (r)
+			return r;
  	}
return amdgpu_cs_sync_rings(p);




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux