]> git.hungrycats.org Git - linux/commitdiff
drm/amdgpu: correct reservation fence slots for userq per-vm BOs eviction
authorPrike Liang <Prike.Liang@amd.com>
Thu, 11 Jun 2026 02:58:05 +0000 (10:58 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 17 Jun 2026 20:14:16 +0000 (16:14 -0400)
It fixes both the move overflow and the eviction fence add for
evicting these per-vm BOs.

Signed-off-by: Prike Liang <Prike.Liang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c

index 4e3bd505c368dcb456e1158fd43b0d7b77b89f90..3bcde67aa09295546125fd4fb9ee7cd74a371282 100644 (file)
@@ -921,7 +921,8 @@ amdgpu_userq_bo_validate(struct amdgpu_device *adev, struct drm_exec *exec,
                spin_unlock(&vm->individual_lock);
 
                bo = bo_va->base.bo;
-               ret = drm_exec_prepare_obj(exec, &bo->tbo.base, 2);
+               ret = drm_exec_prepare_obj(exec, &bo->tbo.base,
+                                          TTM_NUM_MOVE_FENCES + 1);
                if (unlikely(ret))
                        return ret;