Lines Matching refs:ttm
45 #include <dev/drm2/ttm/ttm_bo_driver.h>
46 #include <dev/drm2/ttm/ttm_page_alloc.h>
134 KASSERT(m->object == NULL, ("ttm page %p is owned", m));
135 KASSERT(vm_page_wired(m), ("ttm lost wire %p", m));
136 KASSERT((m->flags & PG_FICTITIOUS) != 0, ("ttm lost fictitious %p", m));
137 KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("ttm got unmanaged %p", m));
309 * Select the right pool or requested caching state and ttm flags. */
850 int ttm_pool_populate(struct ttm_tt *ttm)
852 struct ttm_mem_global *mem_glob = ttm->glob->mem_glob;
856 if (ttm->state != tt_unpopulated)
859 for (i = 0; i < ttm->num_pages; ++i) {
860 ret = ttm_get_pages(&ttm->pages[i], 1,
861 ttm->page_flags,
862 ttm->caching_state);
864 ttm_pool_unpopulate(ttm);
868 ret = ttm_mem_global_alloc_page(mem_glob, ttm->pages[i],
871 ttm_pool_unpopulate(ttm);
876 if (unlikely(ttm->page_flags & TTM_PAGE_FLAG_SWAPPED)) {
877 ret = ttm_tt_swapin(ttm);
879 ttm_pool_unpopulate(ttm);
884 ttm->state = tt_unbound;
888 void ttm_pool_unpopulate(struct ttm_tt *ttm)
892 for (i = 0; i < ttm->num_pages; ++i) {
893 if (ttm->pages[i]) {
894 ttm_mem_global_free_page(ttm->glob->mem_glob,
895 ttm->pages[i]);
896 ttm_put_pages(&ttm->pages[i], 1,
897 ttm->page_flags,
898 ttm->caching_state);
901 ttm->state = tt_unpopulated;