Lines Matching refs:curr
162 void agp_free_memory(struct agp_memory *curr) in agp_free_memory() argument
166 if (curr == NULL) in agp_free_memory()
169 if (curr->is_bound) in agp_free_memory()
170 agp_unbind_memory(curr); in agp_free_memory()
172 if (curr->type >= AGP_USER_TYPES) { in agp_free_memory()
173 agp_generic_free_by_type(curr); in agp_free_memory()
177 if (curr->type != 0) { in agp_free_memory()
178 curr->bridge->driver->free_by_type(curr); in agp_free_memory()
181 if (curr->page_count != 0) { in agp_free_memory()
182 if (curr->bridge->driver->agp_destroy_pages) { in agp_free_memory()
183 curr->bridge->driver->agp_destroy_pages(curr); in agp_free_memory()
186 for (i = 0; i < curr->page_count; i++) { in agp_free_memory()
187 curr->bridge->driver->agp_destroy_page( in agp_free_memory()
188 curr->pages[i], in agp_free_memory()
191 for (i = 0; i < curr->page_count; i++) { in agp_free_memory()
192 curr->bridge->driver->agp_destroy_page( in agp_free_memory()
193 curr->pages[i], in agp_free_memory()
198 agp_free_key(curr->key); in agp_free_memory()
199 agp_free_page_array(curr); in agp_free_memory()
200 kfree(curr); in agp_free_memory()
408 int agp_bind_memory(struct agp_memory *curr, off_t pg_start) in agp_bind_memory() argument
412 if (curr == NULL) in agp_bind_memory()
415 if (curr->is_bound) { in agp_bind_memory()
416 printk(KERN_INFO PFX "memory %p is already bound!\n", curr); in agp_bind_memory()
419 if (!curr->is_flushed) { in agp_bind_memory()
420 curr->bridge->driver->cache_flush(); in agp_bind_memory()
421 curr->is_flushed = true; in agp_bind_memory()
424 ret_val = curr->bridge->driver->insert_memory(curr, pg_start, curr->type); in agp_bind_memory()
429 curr->is_bound = true; in agp_bind_memory()
430 curr->pg_start = pg_start; in agp_bind_memory()
432 list_add(&curr->mapped_list, &agp_bridge->mapped_list); in agp_bind_memory()
448 int agp_unbind_memory(struct agp_memory *curr) in agp_unbind_memory() argument
452 if (curr == NULL) in agp_unbind_memory()
455 if (!curr->is_bound) { in agp_unbind_memory()
456 printk(KERN_INFO PFX "memory %p was not bound!\n", curr); in agp_unbind_memory()
460 ret_val = curr->bridge->driver->remove_memory(curr, curr->pg_start, curr->type); in agp_unbind_memory()
465 curr->is_bound = false; in agp_unbind_memory()
466 curr->pg_start = 0; in agp_unbind_memory()
467 spin_lock(&curr->bridge->mapped_lock); in agp_unbind_memory()
468 list_del(&curr->mapped_list); in agp_unbind_memory()
469 spin_unlock(&curr->bridge->mapped_lock); in agp_unbind_memory()
1151 void agp_generic_free_by_type(struct agp_memory *curr) in agp_generic_free_by_type() argument
1153 agp_free_page_array(curr); in agp_generic_free_by_type()
1154 agp_free_key(curr->key); in agp_generic_free_by_type()
1155 kfree(curr); in agp_generic_free_by_type()