Lines Matching refs:entry
199 struct drm_agp_mem *entry; in drm_agp_alloc() local
206 if (!(entry = kzalloc(sizeof(*entry), GFP_KERNEL))) in drm_agp_alloc()
212 kfree(entry); in drm_agp_alloc()
216 entry->handle = (unsigned long)memory->key + 1; in drm_agp_alloc()
217 entry->memory = memory; in drm_agp_alloc()
218 entry->bound = 0; in drm_agp_alloc()
219 entry->pages = pages; in drm_agp_alloc()
220 list_add(&entry->head, &dev->agp->memory); in drm_agp_alloc()
222 request->handle = entry->handle; in drm_agp_alloc()
250 struct drm_agp_mem *entry; in drm_agp_lookup_entry() local
252 list_for_each_entry(entry, &dev->agp->memory, head) { in drm_agp_lookup_entry()
253 if (entry->handle == handle) in drm_agp_lookup_entry()
254 return entry; in drm_agp_lookup_entry()
273 struct drm_agp_mem *entry; in drm_agp_unbind() local
278 if (!(entry = drm_agp_lookup_entry(dev, request->handle))) in drm_agp_unbind()
280 if (!entry->bound) in drm_agp_unbind()
282 ret = drm_unbind_agp(entry->memory); in drm_agp_unbind()
284 entry->bound = 0; in drm_agp_unbind()
313 struct drm_agp_mem *entry; in drm_agp_bind() local
319 if (!(entry = drm_agp_lookup_entry(dev, request->handle))) in drm_agp_bind()
321 if (entry->bound) in drm_agp_bind()
324 if ((retcode = drm_bind_agp(entry->memory, page))) in drm_agp_bind()
326 entry->bound = dev->agp->base + (page << PAGE_SHIFT); in drm_agp_bind()
328 dev->agp->base, entry->bound); in drm_agp_bind()
358 struct drm_agp_mem *entry; in drm_agp_free() local
362 if (!(entry = drm_agp_lookup_entry(dev, request->handle))) in drm_agp_free()
364 if (entry->bound) in drm_agp_free()
365 drm_unbind_agp(entry->memory); in drm_agp_free()
367 list_del(&entry->head); in drm_agp_free()
369 drm_free_agp(entry->memory, entry->pages); in drm_agp_free()
370 kfree(entry); in drm_agp_free()
439 struct drm_agp_mem *entry, *tempe; in drm_agp_clear() local
446 list_for_each_entry_safe(entry, tempe, &dev->agp->memory, head) { in drm_agp_clear()
447 if (entry->bound) in drm_agp_clear()
448 drm_unbind_agp(entry->memory); in drm_agp_clear()
449 drm_free_agp(entry->memory, entry->pages); in drm_agp_clear()
450 kfree(entry); in drm_agp_clear()