diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-02-05 00:25:52 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-02-05 00:25:52 +0000 |
commit | 48ebf84cb1cf60450fb5790980135ca5b130f99c (patch) | |
tree | 943303f793368fefc00aaf0150bba2f429e58907 /sys/dev/pci/drm/drmP.h | |
parent | 9f999dadd4b348d0252c59054ddcc0c0e62a97ff (diff) |
Merge the static block allocation code from {i915,radeon}_mem.c into
non-static code that's shared between both. While i'm here convert them
to TAILQ.
Eventually, both of these will die, but until then I'd rather shave the
space in the kernel.
Tested on radeon and intel.
Diffstat (limited to 'sys/dev/pci/drm/drmP.h')
-rw-r--r-- | sys/dev/pci/drm/drmP.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h index 6996284f636..7b50ea58ab5 100644 --- a/sys/dev/pci/drm/drmP.h +++ b/sys/dev/pci/drm/drmP.h @@ -417,6 +417,16 @@ struct drm_vblank { int vbl_inmodeset; /* is the DDX currently modesetting */ }; +/* Heap implementation for radeon and i915 legacy */ +TAILQ_HEAD(drm_heap, drm_mem); + +struct drm_mem { + TAILQ_ENTRY(drm_mem) link; + struct drm_file *file_priv; /* NULL: free, other: real files */ + int start; + int size; +}; + /* location of GART table */ #define DRM_ATI_GART_MAIN 1 #define DRM_ATI_GART_FB 2 @@ -581,6 +591,15 @@ void drm_ioremapfree(drm_local_map_t *); int drm_mtrr_add(unsigned long, size_t, int); int drm_mtrr_del(int, unsigned long, size_t, int); +/* Heap interface (DEPRECATED) */ +int drm_init_heap(struct drm_heap *, int, int); +struct drm_mem * + drm_alloc_block(struct drm_heap *, int, int, struct drm_file *); +struct drm_mem * + drm_find_block(struct drm_heap *, int); +void drm_free_block(struct drm_heap *, struct drm_mem *); + + int drm_ctxbitmap_init(struct drm_device *); void drm_ctxbitmap_cleanup(struct drm_device *); void drm_ctxbitmap_free(struct drm_device *, int); |