This was supposed to loop over the individual evicted list, as the
kernel and always_valid evicted lists were already handled in
amdgpu_vm_validate.

Without this, BOs that were created and evicted before a userq was made
would end up never end up in an eviction fence rearm.

Fixes: 4cdbba5a16aa ("drm/amdgpu: restructure VM state machine v4")
Signed-off-by: Benjamin Cheng <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
index a90db4d3d4e9..5b9f7f7f3862 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
@@ -993,8 +993,8 @@ amdgpu_userq_bo_validate(struct amdgpu_device *adev, struct 
drm_exec *exec,
        int ret;
 
        spin_lock(&vm->individual_lock);
-       while (!list_empty(&vm->always_valid.evicted)) {
-               bo_va = list_first_entry(&vm->always_valid.evicted,
+       while (!list_empty(&vm->individual.evicted)) {
+               bo_va = list_first_entry(&vm->individual.evicted,
                                         struct amdgpu_bo_va,
                                         base.vm_status);
                spin_unlock(&vm->individual_lock);
-- 
2.55.0

Reply via email to