Lines Matching refs:mem
201 static int nvidia_insert_memory(struct agp_memory *mem, off_t pg_start, int type) in nvidia_insert_memory() argument
206 mask_type = agp_generic_type_to_mask_type(mem->bridge, type); in nvidia_insert_memory()
207 if (mask_type != 0 || type != mem->type) in nvidia_insert_memory()
210 if (mem->page_count == 0) in nvidia_insert_memory()
213 if ((pg_start + mem->page_count) > in nvidia_insert_memory()
217 for (j = pg_start; j < (pg_start + mem->page_count); j++) { in nvidia_insert_memory()
222 if (!mem->is_flushed) { in nvidia_insert_memory()
224 mem->is_flushed = true; in nvidia_insert_memory()
226 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { in nvidia_insert_memory()
228 page_to_phys(mem->pages[i]), mask_type), in nvidia_insert_memory()
235 agp_bridge->driver->tlb_flush(mem); in nvidia_insert_memory()
240 static int nvidia_remove_memory(struct agp_memory *mem, off_t pg_start, int type) in nvidia_remove_memory() argument
246 mask_type = agp_generic_type_to_mask_type(mem->bridge, type); in nvidia_remove_memory()
247 if (mask_type != 0 || type != mem->type) in nvidia_remove_memory()
250 if (mem->page_count == 0) in nvidia_remove_memory()
253 for (i = pg_start; i < (mem->page_count + pg_start); i++) in nvidia_remove_memory()
256 agp_bridge->driver->tlb_flush(mem); in nvidia_remove_memory()
261 static void nvidia_tlbflush(struct agp_memory *mem) in nvidia_tlbflush() argument