Lines Matching refs:ttm
46 struct ttm_tt ttm; member
51 static int ttm_agp_bind(struct ttm_tt *ttm, struct ttm_mem_reg *bo_mem) in ttm_agp_bind() argument
53 struct ttm_agp_backend *agp_be = container_of(ttm, struct ttm_agp_backend, ttm); in ttm_agp_bind()
59 mem = agp_allocate_memory(agp_be->bridge, ttm->num_pages, AGP_USER_MEMORY); in ttm_agp_bind()
64 for (i = 0; i < ttm->num_pages; i++) { in ttm_agp_bind()
65 struct page *page = ttm->pages[i]; in ttm_agp_bind()
68 page = ttm->dummy_read_page; in ttm_agp_bind()
84 static int ttm_agp_unbind(struct ttm_tt *ttm) in ttm_agp_unbind() argument
86 struct ttm_agp_backend *agp_be = container_of(ttm, struct ttm_agp_backend, ttm); in ttm_agp_unbind()
97 static void ttm_agp_destroy(struct ttm_tt *ttm) in ttm_agp_destroy() argument
99 struct ttm_agp_backend *agp_be = container_of(ttm, struct ttm_agp_backend, ttm); in ttm_agp_destroy()
102 ttm_agp_unbind(ttm); in ttm_agp_destroy()
103 ttm_tt_fini(ttm); in ttm_agp_destroy()
126 agp_be->ttm.func = &ttm_agp_func; in ttm_agp_tt_create()
128 if (ttm_tt_init(&agp_be->ttm, bdev, size, page_flags, dummy_read_page)) { in ttm_agp_tt_create()
133 return &agp_be->ttm; in ttm_agp_tt_create()
137 int ttm_agp_tt_populate(struct ttm_tt *ttm) in ttm_agp_tt_populate() argument
139 if (ttm->state != tt_unpopulated) in ttm_agp_tt_populate()
142 return ttm_pool_populate(ttm); in ttm_agp_tt_populate()
146 void ttm_agp_tt_unpopulate(struct ttm_tt *ttm) in ttm_agp_tt_unpopulate() argument
148 ttm_pool_unpopulate(ttm); in ttm_agp_tt_unpopulate()