Lines Matching refs:agp_be
53 struct ttm_agp_backend *agp_be = container_of(ttm, struct ttm_agp_backend, ttm); in ttm_agp_bind() local
60 mem = agp_allocate_memory(agp_be->bridge, ttm->num_pages, AGP_USER_MEMORY); in ttm_agp_bind()
73 agp_be->mem = mem; in ttm_agp_bind()
87 struct ttm_agp_backend *agp_be = container_of(ttm, struct ttm_agp_backend, ttm); in ttm_agp_unbind() local
89 if (agp_be->mem) { in ttm_agp_unbind()
90 if (agp_be->mem->is_bound) in ttm_agp_unbind()
91 return agp_unbind_memory(agp_be->mem); in ttm_agp_unbind()
92 agp_free_memory(agp_be->mem); in ttm_agp_unbind()
93 agp_be->mem = NULL; in ttm_agp_unbind()
100 struct ttm_agp_backend *agp_be = container_of(ttm, struct ttm_agp_backend, ttm); in ttm_agp_destroy() local
102 if (agp_be->mem) in ttm_agp_destroy()
105 kfree(agp_be); in ttm_agp_destroy()
118 struct ttm_agp_backend *agp_be; in ttm_agp_tt_create() local
120 agp_be = kmalloc(sizeof(*agp_be), GFP_KERNEL); in ttm_agp_tt_create()
121 if (!agp_be) in ttm_agp_tt_create()
124 agp_be->mem = NULL; in ttm_agp_tt_create()
125 agp_be->bridge = bridge; in ttm_agp_tt_create()
126 agp_be->ttm.func = &ttm_agp_func; in ttm_agp_tt_create()
128 if (ttm_tt_init(&agp_be->ttm, bo, page_flags)) { in ttm_agp_tt_create()
129 kfree(agp_be); in ttm_agp_tt_create()
133 return &agp_be->ttm; in ttm_agp_tt_create()