Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/agp/agp_i810.c
Show First 20 Lines • Show All 1,789 Lines • ▼ Show 20 Lines | agp_i810_free_memory(device_t dev, struct agp_memory *mem) | ||||
if (mem->am_type == 2) { | if (mem->am_type == 2) { | ||||
if (mem->am_size == AGP_PAGE_SIZE) { | if (mem->am_size == AGP_PAGE_SIZE) { | ||||
/* | /* | ||||
* Unwire the page which we wired in alloc_memory. | * Unwire the page which we wired in alloc_memory. | ||||
*/ | */ | ||||
VM_OBJECT_WLOCK(mem->am_obj); | VM_OBJECT_WLOCK(mem->am_obj); | ||||
m = vm_page_lookup(mem->am_obj, 0); | m = vm_page_lookup(mem->am_obj, 0); | ||||
vm_page_lock(m); | |||||
vm_page_unwire(m, PQ_INACTIVE); | vm_page_unwire(m, PQ_INACTIVE); | ||||
vm_page_unlock(m); | |||||
VM_OBJECT_WUNLOCK(mem->am_obj); | VM_OBJECT_WUNLOCK(mem->am_obj); | ||||
} else { | } else { | ||||
contigfree(sc->argb_cursor, mem->am_size, M_AGP); | contigfree(sc->argb_cursor, mem->am_size, M_AGP); | ||||
sc->argb_cursor = NULL; | sc->argb_cursor = NULL; | ||||
} | } | ||||
} | } | ||||
sc->agp.as_allocated -= mem->am_size; | sc->agp.as_allocated -= mem->am_size; | ||||
▲ Show 20 Lines • Show All 567 Lines • Show Last 20 Lines |