Lines Matching refs:ttm
34 #include "ttm/ttm_module.h"
35 #include "ttm/ttm_bo_driver.h"
36 #include "ttm/ttm_page_alloc.h"
38 #include "ttm/ttm_placement.h"
46 struct ttm_tt ttm;
51 static int ttm_agp_bind(struct ttm_tt *ttm, struct ttm_mem_reg *bo_mem)
53 struct ttm_agp_backend *agp_be = container_of(ttm, struct ttm_agp_backend, ttm);
59 mem = agp_allocate_memory(agp_be->bridge, ttm->num_pages, AGP_USER_MEMORY);
64 for (i = 0; i < ttm->num_pages; i++) {
65 struct page *page = ttm->pages[i];
68 page = ttm->dummy_read_page;
84 static int ttm_agp_unbind(struct ttm_tt *ttm)
86 struct ttm_agp_backend *agp_be = container_of(ttm, struct ttm_agp_backend, ttm);
97 static void ttm_agp_destroy(struct ttm_tt *ttm)
99 struct ttm_agp_backend *agp_be = container_of(ttm, struct ttm_agp_backend, ttm);
102 ttm_agp_unbind(ttm);
103 ttm_tt_fini(ttm);
126 agp_be->ttm.func = &ttm_agp_func;
128 if (ttm_tt_init(&agp_be->ttm, bdev, size, page_flags, dummy_read_page)) {
132 return &agp_be->ttm;
136 int ttm_agp_tt_populate(struct ttm_tt *ttm)
138 if (ttm->state != tt_unpopulated)
141 return ttm_pool_populate(ttm);
145 void ttm_agp_tt_unpopulate(struct ttm_tt *ttm)
147 ttm_pool_unpopulate(ttm);