summaryrefslogtreecommitdiff
path: root/libdrm/xf86drm.h
AgeCommit message (Collapse)Author
2007-07-18drm: remove drm_u64_t, replace with uint64_t everwhereDave Airlie
This might break something, stdint.h inclusion in drm.h maybe required but I'm not sure yet what platforms have it what ones don't.
2007-04-26libdrm: remove HAVE_XORG_CONFIG_H and XFree86LOADER ifdef's.George Sapountzis
We no longer import libdrm in the xserver.
2007-02-22Add DRM_VBLANK_FLIP.Michel Dänzer
Used to request that a scheduled buffer swap be done as a flip instead of a blit.
2006-11-09libdrm: add drmOpenOnce + drmCloseOnce to libdrmDave Airlie
2006-11-08libdrm: add support for server side functionality in libdrmDave Airlie
This adds APIs to allow the X server to use libdrm from the system rather than its own in-built copy.
2006-10-18Merging drm-ttm-0-2-branchThomas Hellstrom
Conflicts: linux-core/drmP.h linux-core/drm_drv.c linux-core/drm_irq.c linux-core/drm_stub.c shared-core/drm.h shared-core/i915_drv.h shared-core/i915_irq.c
2006-10-02Bug 6242: [mach64] Use private DMA buffers, part #3.George Sapountzis
Add DRM_PCI_BUFFER_RO flag for mapping PCI DMA buffer read-only. An additional flag is needed, since PCI DMA buffers do not have an associated map.
2006-09-29Core vsync: Add flag DRM_VBLANK_NEXTONMISS.Michel Dänzer
When this flag is set and the target sequence is missed, wait for the next vertical blank instead of returning immediately. (cherry picked from 89e323e4900af84cc33219ad24eb0b435a039d23 commit)
2006-09-29Add definition of DRM_VBLANK_SECONDARY.Michel Dänzer
(cherry picked from 84b38b63f05e04ade8b1ddfb770047fd86de0d64 commit)
2006-09-29Add support for tracking drawable information to coreMichel Dänzer
Actually make the existing ioctls for adding and removing drawables do something useful, and add another ioctl for the X server to update drawable information. The only kind of drawable information tracked so far is cliprects. (cherry picked from 29598e5253ff5c085ccf63580fd24b84db848424 commit)
2006-09-28Core vsync: Add flag DRM_VBLANK_NEXTONMISS.Michel Dänzer
When this flag is set and the target sequence is missed, wait for the next vertical blank instead of returning immediately.
2006-09-28Add definition of DRM_VBLANK_SECONDARY.Michel Dänzer
2006-09-28Add support for tracking drawable information to coreMichel Dänzer
Actually make the existing ioctls for adding and removing drawables do something useful, and add another ioctl for the X server to update drawable information. The only kind of drawable information tracked so far is cliprects.
2006-09-15Some bugfixes.Thomas Hellstrom
Change the fence object interface somewhat to allow some more flexibility. Make list IOCTLS really restartable. Try to avoid busy-waits in the kernel using immediate return to user-space with an -EAGAIN.
2006-09-12More bugfixes.Thomas Hellstrom
Disable the i915 IRQ turnoff for now since it seems to be causing problems.
2006-09-05Fence all unfenced buffers function.Thomas Hellstrom
2006-08-30Memory manager init and takedown.Thomas Hellstrom
2006-08-29Part of buffer object libdrm interface.Thomas Hellstrom
2006-08-28Add a 64-bit drm unsigned type for 64-bit clean IOCTLS.Thomas Hellstrom
Conversion functions in drmP.h and xf86drm.c.
2006-08-27Bugfixes.Thomas Hellstrom
2006-08-27Remove the ioctl multiplexing, and instead allow for genericThomas Hellstrom
drm ioctls 0x80 - 0xFF.
2006-08-22Add a fence object class field for future use (For example VSYNC fence objects)Thomas Hellstrom
2006-08-21User / Kernel space fence objects (device-independent part).Thomas Hellstrom
2006-02-20Formatting cleanup, dead code removal. Remove N() namespacing macro,Adam Jackson
useless. Remove SIGIO handling functions as they're server-only and properly belong in libdri.
2005-11-29fixes from Egbert for 64bitDave Airlie
2005-10-22Bug #328: Silence read-from-uninitialized warnings in DRM_CAS on Alpha.Adam Jackson
(David Dawes)
2005-08-23add options for x86_64 and amd will small lettersDave Airlie
2005-02-01momentary revert. libdrm build may be broken now, but no one uses it yet...Adam Jackson
2005-01-30Final pass of libdrm.so work:Adam Jackson
- Add $(DESTDIR) for distributors doing package creation - Remove OS-specific include path from build - Add /usr/include/drm for driver-kernel API - Install all of shared-core/*.h in /usr/include/drm - Rename xf86drm.h to libdrm.h since we're not X biased anymore - Include backwards compat for xf86drm.h name, with a warning - Fix libdrm source to account for drm.h living in /usr/include/drm
2005-01-16The patch makes drmAddBufs/drmMapBufs can handle buffers in video memoryDave Airlie
The attached patch adds a new buffer type DRM_FB_BUFFER. It works like AGP memory but uses video memory. From: austinyuan@viatech.com.cn (fd.o bug 1668) Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-01-01Added a new DRM map type _DRM_CONSISTENT for consistent PCI memory. It usesFelix Kuehling
drm_pci_alloc/free for allocating/freeing the memory. Only implemented in the Linux DRM so far.
2004-07-31Patch picked up from Redhat xorg release:Dave Airlie
Patch by John Dennis <jdennis@redhat.com> which fixes DRI locking bug on ia64 architecture. https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=104338 http://bugs.xfree86.org/show_bug.cgi?id=778
2004-07-07Add xf86drm.h back to drm/libdrm until it's true home can be found.Jon Smirl
mesa-solo needs this file to build. XFree86 bug: Reported by: Submitted by: Reviewed by: Obtained from:
pan> sizeof(*sman->mm), DRM_MEM_MM); } EXPORT_SYMBOL(drm_sman_takedown); int drm_sman_init(drm_sman_t * sman, unsigned int num_managers, unsigned int user_order, unsigned int owner_order) { int ret = 0; sman->mm = (drm_sman_mm_t *) drm_calloc(num_managers, sizeof(*sman->mm), DRM_MEM_MM); if (!sman->mm) { ret = -ENOMEM; goto out; } sman->num_managers = num_managers; INIT_LIST_HEAD(&sman->owner_items); ret = drm_ht_create(&sman->owner_hash_tab, owner_order); if (ret) goto out1; ret = drm_ht_create(&sman->user_hash_tab, user_order); if (!ret) goto out; drm_ht_remove(&sman->owner_hash_tab); out1: drm_free(sman->mm, num_managers * sizeof(*sman->mm), DRM_MEM_MM); out: return ret; } EXPORT_SYMBOL(drm_sman_init); static void *drm_sman_mm_allocate(void *private, unsigned long size, unsigned alignment) { drm_mm_t *mm = (drm_mm_t *) private; drm_mm_node_t *tmp; tmp = drm_mm_search_free(mm, size, alignment, 1); if (!tmp) { return NULL; } tmp = drm_mm_get_block(tmp, size, alignment); return tmp; } static void drm_sman_mm_free(void *private, void *ref) { drm_mm_node_t *node = (drm_mm_node_t *) ref; drm_mm_put_block(node); } static void drm_sman_mm_destroy(void *private) { drm_mm_t *mm = (drm_mm_t *) private; drm_mm_takedown(mm); drm_free(mm, sizeof(*mm), DRM_MEM_MM); } static unsigned long drm_sman_mm_offset(void *private, void *ref) { drm_mm_node_t *node = (drm_mm_node_t *) ref; return node->start; } int drm_sman_set_range(drm_sman_t * sman, unsigned int manager, unsigned long start, unsigned long size) { drm_sman_mm_t *sman_mm; drm_mm_t *mm; int ret; BUG_ON(manager >= sman->num_managers); sman_mm = &sman->mm[manager]; mm = drm_calloc(1, sizeof(*mm), DRM_MEM_MM); if (!mm) { return -ENOMEM; } sman_mm->private = mm; ret = drm_mm_init(mm, start, size); if (ret) { drm_free(mm, sizeof(*mm), DRM_MEM_MM); return ret; } sman_mm->allocate = drm_sman_mm_allocate; sman_mm->free = drm_sman_mm_free; sman_mm->destroy = drm_sman_mm_destroy; sman_mm->offset = drm_sman_mm_offset; return 0; } EXPORT_SYMBOL(drm_sman_set_range); int drm_sman_set_manager(drm_sman_t * sman, unsigned int manager, drm_sman_mm_t * allocator) { BUG_ON(manager >= sman->num_managers); sman->mm[manager] = *allocator; return 0; } EXPORT_SYMBOL(drm_sman_set_manager); static drm_owner_item_t *drm_sman_get_owner_item(drm_sman_t * sman, unsigned long owner) { int ret; drm_hash_item_t *owner_hash_item; drm_owner_item_t *owner_item; ret = drm_ht_find_item(&sman->owner_hash_tab, owner, &owner_hash_item); if (!ret) { return drm_hash_entry(owner_hash_item, drm_owner_item_t, owner_hash); } owner_item = drm_calloc(1, sizeof(*owner_item), DRM_MEM_MM); if (!owner_item) goto out; INIT_LIST_HEAD(&owner_item->mem_blocks); owner_item->owner_hash.key = owner; if (drm_ht_insert_item(&sman->owner_hash_tab, &owner_item->owner_hash)) goto out1; list_add_tail(&owner_item->sman_list, &sman->owner_items); return owner_item; out1: drm_free(owner_item, sizeof(*owner_item), DRM_MEM_MM); out: return NULL; } drm_memblock_item_t *drm_sman_alloc(drm_sman_t *sman, unsigned int manager, unsigned long size, unsigned alignment, unsigned long owner) { void *tmp; drm_sman_mm_t *sman_mm; drm_owner_item_t *owner_item; drm_memblock_item_t *memblock; BUG_ON(manager >= sman->num_managers); sman_mm = &sman->mm[manager]; tmp = sman_mm->allocate(sman_mm->private, size, alignment); if (!tmp) { return NULL; } memblock = drm_calloc(1, sizeof(*memblock), DRM_MEM_MM); if (!memblock) goto out; memblock->mm_info = tmp; memblock->mm = sman_mm; memblock->sman = sman; if (drm_ht_just_insert_please (&sman->user_hash_tab, &memblock->user_hash, (unsigned long)memblock, 32, 0, 0)) goto out1; owner_item = drm_sman_get_owner_item(sman, owner); if (!owner_item) goto out2; list_add_tail(&memblock->owner_list, &owner_item->mem_blocks); return memblock; out2: drm_ht_remove_item(&sman->user_hash_tab, &memblock->user_hash); out1: drm_free(memblock, sizeof(*memblock), DRM_MEM_MM); out: sman_mm->free(sman_mm->private, tmp); return NULL; } EXPORT_SYMBOL(drm_sman_alloc); static void drm_sman_free(drm_memblock_item_t *item) { drm_sman_t *sman = item->sman; list_del(&item->owner_list); drm_ht_remove_item(&sman->user_hash_tab, &item->user_hash); item->mm->free(item->mm->private, item->mm_info); drm_free(item, sizeof(*item), DRM_MEM_MM); } int drm_sman_free_key(drm_sman_t *sman, unsigned int key) { drm_hash_item_t *hash_item; drm_memblock_item_t *memblock_item; if (drm_ht_find_item(&sman->user_hash_tab, key, &hash_item)) return -EINVAL; memblock_item = drm_hash_entry(hash_item, drm_memblock_item_t, user_hash); drm_sman_free(memblock_item); return 0; } EXPORT_SYMBOL(drm_sman_free_key); static void drm_sman_remove_owner(drm_sman_t *sman, drm_owner_item_t *owner_item) { list_del(&owner_item->sman_list); drm_ht_remove_item(&sman->owner_hash_tab, &owner_item->owner_hash); drm_free(owner_item, sizeof(*owner_item), DRM_MEM_MM); } int drm_sman_owner_clean(drm_sman_t *sman, unsigned long owner) { drm_hash_item_t *hash_item; drm_owner_item_t *owner_item; if (drm_ht_find_item(&sman->owner_hash_tab, owner, &hash_item)) { return -1; } owner_item = drm_hash_entry(hash_item, drm_owner_item_t, owner_hash); if (owner_item->mem_blocks.next == &owner_item->mem_blocks) { drm_sman_remove_owner(sman, owner_item); return -1; } return 0; } EXPORT_SYMBOL(drm_sman_owner_clean); static void drm_sman_do_owner_cleanup(drm_sman_t *sman, drm_owner_item_t *owner_item) { drm_memblock_item_t *entry, *next; list_for_each_entry_safe(entry, next, &owner_item->mem_blocks, owner_list) { drm_sman_free(entry); } drm_sman_remove_owner(sman, owner_item); } void drm_sman_owner_cleanup(drm_sman_t *sman, unsigned long owner) { drm_hash_item_t *hash_item; drm_owner_item_t *owner_item; if (drm_ht_find_item(&sman->owner_hash_tab, owner, &hash_item)) { return; } owner_item = drm_hash_entry(hash_item, drm_owner_item_t, owner_hash); drm_sman_do_owner_cleanup(sman, owner_item); } EXPORT_SYMBOL(drm_sman_owner_cleanup); void drm_sman_cleanup(drm_sman_t *sman) { drm_owner_item_t *entry, *next; unsigned int i; drm_sman_mm_t *sman_mm; list_for_each_entry_safe(entry, next, &sman->owner_items, sman_list) { drm_sman_do_owner_cleanup(sman, entry); } if (sman->mm) { for (i = 0; i < sman->num_managers; ++i) { sman_mm = &sman->mm[i]; if (sman_mm->private) { sman_mm->destroy(sman_mm->private); sman_mm->private = NULL; } } } } EXPORT_SYMBOL(drm_sman_cleanup);