Commit fde1403e authored by Christian König's avatar Christian König
Browse files

drm/ttm: use pin_count more extensively



Check the pin_count instead of the lru list is empty here.

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Acked-by: default avatarAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Link: https://patchwork.freedesktop.org/patch/404617/
parent 2200736a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -938,9 +938,8 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
	}

error:
	if (bo->mem.mem_type == TTM_PL_SYSTEM && !list_empty(&bo->lru)) {
	if (bo->mem.mem_type == TTM_PL_SYSTEM && !bo->pin_count)
		ttm_bo_move_to_lru_tail_unlocked(bo);
	}

	return ret;
}