Lines Matching refs:curr

163 void agp_free_memory(struct agp_memory *curr)  in agp_free_memory()  argument
167 if (curr == NULL) in agp_free_memory()
170 if (curr->is_bound) in agp_free_memory()
171 agp_unbind_memory(curr); in agp_free_memory()
173 if (curr->type >= AGP_USER_TYPES) { in agp_free_memory()
174 agp_generic_free_by_type(curr); in agp_free_memory()
178 if (curr->type != 0) { in agp_free_memory()
179 curr->bridge->driver->free_by_type(curr); in agp_free_memory()
182 if (curr->page_count != 0) { in agp_free_memory()
183 if (curr->bridge->driver->agp_destroy_pages) { in agp_free_memory()
184 curr->bridge->driver->agp_destroy_pages(curr); in agp_free_memory()
187 for (i = 0; i < curr->page_count; i++) { in agp_free_memory()
188 curr->bridge->driver->agp_destroy_page( in agp_free_memory()
189 curr->pages[i], in agp_free_memory()
192 for (i = 0; i < curr->page_count; i++) { in agp_free_memory()
193 curr->bridge->driver->agp_destroy_page( in agp_free_memory()
194 curr->pages[i], in agp_free_memory()
199 agp_free_key(curr->key); in agp_free_memory()
200 agp_free_page_array(curr); in agp_free_memory()
201 kfree(curr); in agp_free_memory()
407 int agp_bind_memory(struct agp_memory *curr, off_t pg_start) in agp_bind_memory() argument
411 if (curr == NULL) in agp_bind_memory()
414 if (curr->is_bound) { in agp_bind_memory()
415 printk(KERN_INFO PFX "memory %p is already bound!\n", curr); in agp_bind_memory()
418 if (!curr->is_flushed) { in agp_bind_memory()
419 curr->bridge->driver->cache_flush(); in agp_bind_memory()
420 curr->is_flushed = true; in agp_bind_memory()
423 ret_val = curr->bridge->driver->insert_memory(curr, pg_start, curr->type); in agp_bind_memory()
428 curr->is_bound = true; in agp_bind_memory()
429 curr->pg_start = pg_start; in agp_bind_memory()
431 list_add(&curr->mapped_list, &agp_bridge->mapped_list); in agp_bind_memory()
447 int agp_unbind_memory(struct agp_memory *curr) in agp_unbind_memory() argument
451 if (curr == NULL) in agp_unbind_memory()
454 if (!curr->is_bound) { in agp_unbind_memory()
455 printk(KERN_INFO PFX "memory %p was not bound!\n", curr); in agp_unbind_memory()
459 ret_val = curr->bridge->driver->remove_memory(curr, curr->pg_start, curr->type); in agp_unbind_memory()
464 curr->is_bound = false; in agp_unbind_memory()
465 curr->pg_start = 0; in agp_unbind_memory()
466 spin_lock(&curr->bridge->mapped_lock); in agp_unbind_memory()
467 list_del(&curr->mapped_list); in agp_unbind_memory()
468 spin_unlock(&curr->bridge->mapped_lock); in agp_unbind_memory()
1155 void agp_generic_free_by_type(struct agp_memory *curr) in agp_generic_free_by_type() argument
1157 agp_free_page_array(curr); in agp_generic_free_by_type()
1158 agp_free_key(curr->key); in agp_generic_free_by_type()
1159 kfree(curr); in agp_generic_free_by_type()