Lines Matching refs:curr

174  *	@curr:		agp_memory pointer to be freed.
179 void agp_free_memory(struct agp_memory *curr)
183 if (curr == NULL)
186 if (curr->is_bound)
187 agp_unbind_memory(curr);
189 if (curr->type >= AGP_USER_TYPES) {
190 agp_generic_free_by_type(curr);
194 if (curr->type != 0) {
195 curr->bridge->driver->free_by_type(curr);
198 if (curr->page_count != 0) {
199 if (curr->bridge->driver->agp_destroy_pages) {
200 curr->bridge->driver->agp_destroy_pages(curr);
203 for (i = 0; i < curr->page_count; i++) {
204 curr->bridge->driver->agp_destroy_page(
205 curr->pages[i],
208 for (i = 0; i < curr->page_count; i++) {
209 curr->bridge->driver->agp_destroy_page(
210 curr->pages[i],
215 agp_free_key(curr->key);
216 agp_free_page_array(curr);
217 kfree(curr);
417 * @curr: agp_memory pointer
423 int agp_bind_memory(struct agp_memory *curr, off_t pg_start)
427 if (curr == NULL)
430 if (curr->is_bound) {
431 printk(KERN_INFO PFX "memory %p is already bound!\n", curr);
434 if (!curr->is_flushed) {
435 curr->bridge->driver->cache_flush();
436 curr->is_flushed = true;
439 ret_val = curr->bridge->driver->insert_memory(curr, pg_start, curr->type);
444 curr->is_bound = true;
445 curr->pg_start = pg_start;
447 list_add(&curr->mapped_list, &agp_bridge->mapped_list);
458 * @curr: agp_memory pointer to be removed from the GATT.
463 int agp_unbind_memory(struct agp_memory *curr)
467 if (curr == NULL)
470 if (!curr->is_bound) {
471 printk(KERN_INFO PFX "memory %p was not bound!\n", curr);
475 ret_val = curr->bridge->driver->remove_memory(curr, curr->pg_start, curr->type);
480 curr->is_bound = false;
481 curr->pg_start = 0;
482 spin_lock(&curr->bridge->mapped_lock);
483 list_del(&curr->mapped_list);
484 spin_unlock(&curr->bridge->mapped_lock);
1173 void agp_generic_free_by_type(struct agp_memory *curr)
1175 agp_free_page_array(curr);
1176 agp_free_key(curr->key);
1177 kfree(curr);