diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-01-08 06:25:47 -0500 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-02-07 21:24:26 -0500 |
commit | 1d58420bad15d08f93bf1e0342c1b1d1234d69b7 (patch) | |
tree | 0894a496155dd8cda01427fce9f5351f1981d7ea /drivers/char/drm/drmP.h | |
parent | 004a7727421fd202bbdfcc0231a3359085199a52 (diff) |
drm: update core memory manager from git drm tree
Remove the memory manager parameter from the put_block function, as this
makes the client code a lot cleaner. Prepare buffer manager for lock and
unlock calls.
Fix buggy aligned allocations.
Remove the stupid root_node field from the core memory manager.
Support multi-page buffer offset alignments
Add improved alignment functionality to the core memory manager.
This makes an allocated block actually align itself and returns any
wasted space to the manager.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drmP.h')
-rw-r--r-- | drivers/char/drm/drmP.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index 63042ca9fffe..85d99e21e188 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h | |||
@@ -532,11 +532,13 @@ typedef struct drm_mm_node { | |||
532 | int free; | 532 | int free; |
533 | unsigned long start; | 533 | unsigned long start; |
534 | unsigned long size; | 534 | unsigned long size; |
535 | struct drm_mm *mm; | ||
535 | void *private; | 536 | void *private; |
536 | } drm_mm_node_t; | 537 | } drm_mm_node_t; |
537 | 538 | ||
538 | typedef struct drm_mm { | 539 | typedef struct drm_mm { |
539 | drm_mm_node_t root_node; | 540 | struct list_head fl_entry; |
541 | struct list_head ml_entry; | ||
540 | } drm_mm_t; | 542 | } drm_mm_t; |
541 | 543 | ||
542 | /** | 544 | /** |
@@ -1050,11 +1052,15 @@ extern void drm_sysfs_device_remove(struct class_device *class_dev); | |||
1050 | extern drm_mm_node_t *drm_mm_get_block(drm_mm_node_t * parent, | 1052 | extern drm_mm_node_t *drm_mm_get_block(drm_mm_node_t * parent, |
1051 | unsigned long size, | 1053 | unsigned long size, |
1052 | unsigned alignment); | 1054 | unsigned alignment); |
1053 | extern void drm_mm_put_block(drm_mm_t *mm, drm_mm_node_t *cur); | 1055 | void drm_mm_put_block(drm_mm_node_t * cur); |
1054 | extern drm_mm_node_t *drm_mm_search_free(const drm_mm_t *mm, unsigned long size, | 1056 | extern drm_mm_node_t *drm_mm_search_free(const drm_mm_t *mm, unsigned long size, |
1055 | unsigned alignment, int best_match); | 1057 | unsigned alignment, int best_match); |
1056 | extern int drm_mm_init(drm_mm_t *mm, unsigned long start, unsigned long size); | 1058 | extern int drm_mm_init(drm_mm_t *mm, unsigned long start, unsigned long size); |
1057 | extern void drm_mm_takedown(drm_mm_t *mm); | 1059 | extern void drm_mm_takedown(drm_mm_t *mm); |
1060 | extern int drm_mm_clean(drm_mm_t *mm); | ||
1061 | extern unsigned long drm_mm_tail_space(drm_mm_t *mm); | ||
1062 | extern int drm_mm_remove_space_from_tail(drm_mm_t *mm, unsigned long size); | ||
1063 | extern int drm_mm_add_space_to_tail(drm_mm_t *mm, unsigned long size); | ||
1058 | 1064 | ||
1059 | extern void drm_core_ioremap(struct drm_map *map, struct drm_device *dev); | 1065 | extern void drm_core_ioremap(struct drm_map *map, struct drm_device *dev); |
1060 | extern void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev); | 1066 | extern void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev); |