drm/ttm: Put BO in its memory manager's lru list
authorjsg <jsg@openbsd.org>
Thu, 27 Jan 2022 22:10:11 +0000 (22:10 +0000)
committerjsg <jsg@openbsd.org>
Thu, 27 Jan 2022 22:10:11 +0000 (22:10 +0000)
From xinhui pan
0da09030aae4a3c9de4699e7ce71085639f8c378 in linux 5.15.y/5.15.17
781050b0a3164934857c300bb0bc291e38c26b6f in mainline linux

sys/dev/pci/drm/ttm/ttm_bo.c

index c840e7e..d66b834 100644 (file)
@@ -724,6 +724,8 @@ int ttm_mem_evict_first(struct ttm_device *bdev,
        ret = ttm_bo_evict(bo, ctx);
        if (locked)
                ttm_bo_unreserve(bo);
+       else
+               ttm_bo_move_to_lru_tail_unlocked(bo);
 
        ttm_bo_put(bo);
        return ret;