Lines Matching refs:entry

201 	struct drm_agp_mem *entry;  in drm_agp_alloc()  local
208 if (!(entry = kzalloc(sizeof(*entry), GFP_KERNEL))) in drm_agp_alloc()
214 kfree(entry); in drm_agp_alloc()
218 entry->handle = (unsigned long)memory->key + 1; in drm_agp_alloc()
219 entry->memory = memory; in drm_agp_alloc()
220 entry->bound = 0; in drm_agp_alloc()
221 entry->pages = pages; in drm_agp_alloc()
222 list_add(&entry->head, &dev->agp->memory); in drm_agp_alloc()
224 request->handle = entry->handle; in drm_agp_alloc()
252 struct drm_agp_mem *entry; in drm_agp_lookup_entry() local
254 list_for_each_entry(entry, &dev->agp->memory, head) { in drm_agp_lookup_entry()
255 if (entry->handle == handle) in drm_agp_lookup_entry()
256 return entry; in drm_agp_lookup_entry()
275 struct drm_agp_mem *entry; in drm_agp_unbind() local
280 if (!(entry = drm_agp_lookup_entry(dev, request->handle))) in drm_agp_unbind()
282 if (!entry->bound) in drm_agp_unbind()
284 ret = drm_unbind_agp(entry->memory); in drm_agp_unbind()
286 entry->bound = 0; in drm_agp_unbind()
315 struct drm_agp_mem *entry; in drm_agp_bind() local
321 if (!(entry = drm_agp_lookup_entry(dev, request->handle))) in drm_agp_bind()
323 if (entry->bound) in drm_agp_bind()
326 if ((retcode = drm_bind_agp(entry->memory, page))) in drm_agp_bind()
328 entry->bound = dev->agp->base + (page << PAGE_SHIFT); in drm_agp_bind()
330 dev->agp->base, entry->bound); in drm_agp_bind()
360 struct drm_agp_mem *entry; in drm_agp_free() local
364 if (!(entry = drm_agp_lookup_entry(dev, request->handle))) in drm_agp_free()
366 if (entry->bound) in drm_agp_free()
367 drm_unbind_agp(entry->memory); in drm_agp_free()
369 list_del(&entry->head); in drm_agp_free()
371 drm_free_agp(entry->memory, entry->pages); in drm_agp_free()
372 kfree(entry); in drm_agp_free()
441 struct drm_agp_mem *entry, *tempe; in drm_agp_clear() local
448 list_for_each_entry_safe(entry, tempe, &dev->agp->memory, head) { in drm_agp_clear()
449 if (entry->bound) in drm_agp_clear()
450 drm_unbind_agp(entry->memory); in drm_agp_clear()
451 drm_free_agp(entry->memory, entry->pages); in drm_agp_clear()
452 kfree(entry); in drm_agp_clear()