From: Vitaly Prosyak <[email protected]>

The root PD reservation is no longer needed after reserving the eviction-fence 
slot
at the userq rearm attach site. The rearm path now reserves capacity 
immediately before
attaching the replacement BOOKKEEP fence, where the reservation lifetime and 
the locked
BO are known. Keeping the caller-side root PD reservation would retain 
unnecessary fence
capacity and duplicate the protection.

This reverts commit 00af92666f29 ("drm/amdgpu: reserve root PD fence slots for 
userq eviction-fence rearm").

Cc: Christian König <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: Prike Liang <[email protected]>
Signed-off-by: Vitaly Prosyak <[email protected]>
Change-Id: I98c1c9b096ec03fe8e27eda867ca1836abbe6322
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
index 5d07320a29b2..d83953a1c076 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
@@ -1043,11 +1043,7 @@ amdgpu_userq_vm_validate_and_restore_queue(struct 
amdgpu_userq_mgr *uq_mgr)
 retry_lock:
        drm_exec_init(&exec, DRM_EXEC_IGNORE_DUPLICATES, 0);
        drm_exec_until_all_locked(&exec) {
-               /*
-                * Rearm adds one BOOKKEEP fence and validation may queue move 
fences
-                * on the root PD BO, so reserve caller-side slots accordingly.
-                */
-               ret = amdgpu_vm_lock_pd(vm, &exec, TTM_NUM_MOVE_FENCES + 1);
+               ret = amdgpu_vm_lock_pd(vm, &exec, 1);
                drm_exec_retry_on_contention(&exec);
                if (unlikely(ret))
                        goto unlock_all;
-- 
2.55.0

Reply via email to