Home | History | Annotate | Download | only in drm

Lines Matching refs:agp

5  * DRM support for AGP/GART backend
43 #include <asm/agp.h>
54 * Get AGP information.
62 * Verifies the AGP device has been initialized and acquired and fills in the
69 if (!dev->agp || !dev->agp->acquired)
72 kern = &dev->agp->agp_info;
113 * Acquire the AGP device.
115 * \param dev DRM device that is to acquire AGP.
118 * Verifies the AGP device hasn't been acquired before and calls
123 if (!dev->agp)
125 if (dev->agp->acquired)
127 dev->agp->bridge = agp_backend_acquire(dev->pdev);
128 if (!dev->agp->bridge)
130 dev->agp->acquired = 1;
136 * Acquire the AGP device (ioctl).
144 * Verifies the AGP device hasn't been acquired before and calls
154 * Release the AGP device.
156 * \param dev DRM device that is to release AGP.
159 * Verifies the AGP device has been acquired and calls \c agp_backend_release.
163 if (!dev->agp || !dev->agp->acquired)
165 agp_backend_release(dev->agp->bridge);
166 dev->agp->acquired = 0;
178 * Enable the AGP bus.
180 * \param dev DRM device that has previously acquired AGP.
181 * \param mode Requested AGP mode.
184 * Verifies the AGP device has been acquired but not enabled, and calls
189 if (!dev->agp || !dev->agp->acquired)
192 dev->agp->mode = mode.mode;
193 agp_enable(dev->agp->bridge, mode.mode);
194 dev->agp->enabled = 1;
208 * Allocate AGP memory.
216 * Verifies the AGP device is present and has been acquired, allocates the
226 if (!dev->agp || !dev->agp->acquired)
234 memory = agp_allocate_memory(dev->agp->bridge, pages, type);
249 list_add(&entry->head, &dev->agp->memory);
255 agp_memory_info(dev->agp->bridge, memory, &info);
276 * Search for the AGP memory entry associated with a handle.
279 * \param handle AGP memory handle.
289 list_for_each_entry(entry, &dev->agp->memory, head) {
297 * Unbind AGP memory from the GATT (ioctl).
305 * Verifies the AGP device is present and acquired, looks-up the AGP memory
313 if (!dev->agp || !dev->agp->acquired)
319 ret = drm_unbind_agp(dev->agp->bridge, entry->memory);
339 * Bind AGP memory into the GATT (ioctl)
347 * Verifies the AGP device is present and has been acquired and that no memory
348 * is currently bound into the GATT. Looks-up the AGP memory entry and passes
357 if (!dev->agp || !dev->agp->acquired)
364 if ((retcode = drm_bind_agp(dev->agp->bridge, entry->memory, page)))
371 entry->bound = dev->agp->base + (page << PAGE_SHIFT);
373 dev->agp->base, entry->bound);
388 * Free AGP memory (ioctl).
396 * Verifies the AGP device is present and has been acquired and looks up the
397 * AGP memory entry. If the memory is currently bound, unbind it via
405 if (!dev->agp || !dev->agp->acquired)
412 drm_unbind_agp(dev->agp->bridge, entry->memory);
420 drm_free_agp(dev->agp->bridge, entry->memory, entry->pages);
439 * Initialize the AGP resources.
492 * drm_legacy_agp_clear - Clear AGP resource list
495 * Iterate over all AGP resources and remove them. But keep the AGP head
496 * intact so it can still be used. It is safe to call this if AGP is disabled or
505 if (!dev->agp)
510 list_for_each_entry_safe(entry, tempe, &dev->agp->memory, head) {
513 drm_unbind_agp(dev->agp->bridge, entry->memory);
514 drm_free_agp(dev->agp->bridge, entry->memory, entry->pages);
522 INIT_LIST_HEAD(&dev->agp->memory);
524 if (dev->agp->acquired)
527 dev->agp->acquired = 0;
528 dev->agp->enabled = 0;
565 MODULE(MODULE_CLASS_MISC, drmkms_agp, "drmkms"); /* XXX agp */