summaryrefslogtreecommitdiff
path: root/linux-core/drmP.h
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-09-01 15:41:55 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-09-01 15:41:55 +0200
commit11f51a9a877d1231551e8c6482a6f70daf380cdd (patch)
treed3e6731ca1641ed0107336d8c41e1620cfe80b4f /linux-core/drmP.h
parent4edb95d6e0a00a9a8885603cab2c99e3c6daa705 (diff)
Bugfixes,
Memory allocation optimizations. Buffer manager takedown.
Diffstat (limited to 'linux-core/drmP.h')
-rw-r--r--linux-core/drmP.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index 5242b287..c6646212 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -84,6 +84,7 @@
#include <linux/poll.h>
#include <asm/pgalloc.h>
#include "drm.h"
+#include <linux/slab.h>
#define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE)))
#define __OS_HAS_MTRR (defined(CONFIG_MTRR))
@@ -779,6 +780,8 @@ typedef struct drm_buffer_manager{
int initialized;
int has_vram;
int has_tt;
+ int use_vram;
+ int use_tt;
drm_mm_t tt_manager;
struct list_head tt_lru;
drm_mm_t vram_manager;
@@ -922,6 +925,12 @@ typedef struct drm_device {
drm_fence_manager_t fm;
drm_buffer_manager_t bm;
+
+ /*
+ * Memory caches
+ */
+ kmem_cache_t *mm_cache;
+ kmem_cache_t *fence_object_cache;
} drm_device_t;
@@ -1293,7 +1302,8 @@ extern drm_mm_node_t *drm_mm_search_free(const drm_mm_t *mm, unsigned long size,
unsigned alignment, int best_match);
extern int drm_mm_init(drm_mm_t *mm, unsigned long start, unsigned long size);
extern void drm_mm_takedown(drm_mm_t *mm);
-
+extern void drm_mm_set_cache(kmem_cache_t *cache);
+extern int drm_mm_clean(drm_mm_t *mm);
/*
* User space object bookkeeping (drm_object.c)
@@ -1377,6 +1387,7 @@ extern int drm_fence_ioctl(DRM_IOCTL_ARGS);
extern int drm_bo_ioctl(DRM_IOCTL_ARGS);
extern int drm_mm_init_ioctl(DRM_IOCTL_ARGS);
+extern int drm_bo_clean_mm(drm_device_t *dev);
/* Inline replacements for DRM_IOREMAP macros */