Lines Matching defs:entry

200  * memory via agp_allocate_memory() and creates a drm_agp_mem entry for it.
204 struct drm_agp_mem *entry;
211 entry = kzalloc(sizeof(*entry), GFP_KERNEL);
212 if (!entry)
219 kfree(entry);
223 entry->handle = (unsigned long)memory->key + 1;
224 entry->memory = memory;
225 entry->bound = 0;
226 entry->pages = pages;
227 list_add(&entry->head, &dev->agp->memory);
229 request->handle = entry->handle;
246 * Search for the AGP memory entry associated with a handle.
257 struct drm_agp_mem *entry;
259 list_for_each_entry(entry, &dev->agp->memory, head) {
260 if (entry->handle == handle)
261 return entry;
276 * entry and passes it to the unbind_agp() function.
280 struct drm_agp_mem *entry;
285 entry = drm_agp_lookup_entry(dev, request->handle);
286 if (!entry || !entry->bound)
288 ret = drm_unbind_agp(entry->memory);
290 entry->bound = 0;
314 * is currently bound into the GATT. Looks-up the AGP memory entry and passes
319 struct drm_agp_mem *entry;
325 entry = drm_agp_lookup_entry(dev, request->handle);
326 if (!entry || entry->bound)
329 retcode = drm_bind_agp(entry->memory, page);
332 entry->bound = dev->agp->base + (page << PAGE_SHIFT);
333 DRM_DEBUG("base = 0x%lx entry->bound = 0x%lx\n",
334 dev->agp->base, entry->bound);
358 * AGP memory entry. If the memory is currently bound, unbind it via
359 * unbind_agp(). Frees it via free_agp() as well as the entry itself
364 struct drm_agp_mem *entry;
368 entry = drm_agp_lookup_entry(dev, request->handle);
369 if (!entry)
371 if (entry->bound)
372 drm_unbind_agp(entry->memory);
374 list_del(&entry->head);
376 drm_free_agp(entry->memory, entry->pages);
377 kfree(entry);
447 struct drm_agp_mem *entry, *tempe;
454 list_for_each_entry_safe(entry, tempe, &dev->agp->memory, head) {
455 if (entry->bound)
456 drm_unbind_agp(entry->memory);
457 drm_free_agp(entry->memory, entry->pages);
458 kfree(entry);