Skip to contentSkip to conversation

drm/amdgpu: Reserve shared fence for eviction fence

PATCH In review Kuehling, Felix 2 participants 2 messages May 6, 2019 – May 7, 2019 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Reserve shared fence for eviction fence

Need to reserve space for the shared eviction fence when initializing a KFD VM.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +4 -0
index 20cf8e1e7445..e1cae4a37113 100644
@@ -875,6 +875,9 @@ static int init_kfd_vm(struct amdgpu_vm *vm, void **process_info,
 				  AMDGPU_FENCE_OWNER_KFD, false);
 	if (ret)
 		goto wait_pd_fail;
+	ret = reservation_object_reserve_shared(vm->root.base.bo->tbo.resv, 1);
+	if (ret)
+		goto reserve_shared_fail;
 	amdgpu_bo_fence(vm->root.base.bo,
 			&vm->process_info->eviction_fence->base, true);
 	amdgpu_bo_unreserve(vm->root.base.bo);
@@ -888,6 +891,7 @@ static int init_kfd_vm(struct amdgpu_vm *vm, void **process_info,
 
 	return 0;
 
+reserve_shared_fail:
 wait_pd_fail:
 validate_pd_fail:
 	amdgpu_bo_unreserve(vm->root.base.bo);
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20190506202331.7456-1-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org

Reviewed-by Harish Kasiviswanathan
#2 lore raw
Quoted 35 lines · Felix

[CAUTION: External Email]

Need to reserve space for the shared eviction fence when initializing a KFD VM.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +4 -1
index 20cf8e1e7445..e1cae4a37113 100644
@@ -875,6 +875,9 @@ static int init_kfd_vm(struct amdgpu_vm *vm, void **process_info,
                                  AMDGPU_FENCE_OWNER_KFD, false);
        if (ret)
                goto wait_pd_fail;
+       ret = reservation_object_reserve_shared(vm->root.base.bo->tbo.resv, 1);
+       if (ret)
+               goto reserve_shared_fail;
        amdgpu_bo_fence(vm->root.base.bo,
                        &vm->process_info->eviction_fence->base, true);
        amdgpu_bo_unreserve(vm->root.base.bo);
@@ -888,6 +891,7 @@ static int init_kfd_vm(struct amdgpu_vm *vm, void **process_info,
 
        return 0;
 
+reserve_shared_fail:
 wait_pd_fail:
 validate_pd_fail:
        amdgpu_bo_unreserve(vm->root.base.bo);
--

2.17.1

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx