[PATCH 2/2] drm/amdgpu: skip vm entries checking while in sriov vf

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

 



vm page table would be allocated while in amdgpu_vm_init
by amdgpu_allocate_static_csa for sriov, so the checking
here would be skipped.

Change-Id: Id30b86ad15ae509aeed9ed8ab60c259c88af3df5
Signed-off-by: Frank.Min <Frank.Min@xxxxxxx>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 6904d79..6066f87 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -3100,11 +3100,12 @@ int amdgpu_vm_make_compute(struct amdgpu_device *adev, struct amdgpu_vm *vm, uns
 		return r;
 
 	/* Sanity checks */
-	if (!RB_EMPTY_ROOT(&vm->va.rb_root) || vm->root.entries) {
-		r = -EINVAL;
-		goto unreserve_bo;
+	if (!amdgpu_sriov_vf(adev)) {
+		if (!RB_EMPTY_ROOT(&vm->va.rb_root) || vm->root.entries) {
+			r = -EINVAL;
+			goto unreserve_bo;
+		}
 	}
-
 	if (pasid) {
 		unsigned long flags;
 
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




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

  Powered by Linux