Lines Matching refs:mem
46 struct agp_memory *mem; member
54 struct agp_memory *mem; in ttm_agp_bind() local
58 if (agp_be->mem) in ttm_agp_bind()
61 mem = agp_allocate_memory(agp_be->bridge, ttm->num_pages, AGP_USER_MEMORY); in ttm_agp_bind()
62 if (unlikely(mem == NULL)) in ttm_agp_bind()
65 mem->page_count = 0; in ttm_agp_bind()
72 mem->pages[mem->page_count++] = page; in ttm_agp_bind()
74 agp_be->mem = mem; in ttm_agp_bind()
76 mem->is_flushed = 1; in ttm_agp_bind()
77 mem->type = (cached) ? AGP_USER_CACHED_MEMORY : AGP_USER_MEMORY; in ttm_agp_bind()
79 ret = agp_bind_memory(mem, bo_mem->start); in ttm_agp_bind()
91 if (agp_be->mem) { in ttm_agp_unbind()
92 if (agp_be->mem->is_bound) { in ttm_agp_unbind()
93 agp_unbind_memory(agp_be->mem); in ttm_agp_unbind()
96 agp_free_memory(agp_be->mem); in ttm_agp_unbind()
97 agp_be->mem = NULL; in ttm_agp_unbind()
109 return (agp_be->mem != NULL); in ttm_agp_is_bound()
117 if (agp_be->mem) in ttm_agp_destroy()
134 agp_be->mem = NULL; in ttm_agp_tt_create()