diff options
Diffstat (limited to 'drivers/char/drm/drmP.h')
-rw-r--r-- | drivers/char/drm/drmP.h | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index 6dcdceb81203..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 | /** |
@@ -843,9 +845,6 @@ extern void drm_mem_init(void); | |||
843 | extern int drm_mem_info(char *buf, char **start, off_t offset, | 845 | extern int drm_mem_info(char *buf, char **start, off_t offset, |
844 | int request, int *eof, void *data); | 846 | int request, int *eof, void *data); |
845 | extern void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area); | 847 | extern void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area); |
846 | extern void *drm_ioremap(unsigned long offset, unsigned long size, | ||
847 | drm_device_t * dev); | ||
848 | extern void drm_ioremapfree(void *pt, unsigned long size, drm_device_t * dev); | ||
849 | 848 | ||
850 | extern DRM_AGP_MEM *drm_alloc_agp(drm_device_t * dev, int pages, u32 type); | 849 | extern DRM_AGP_MEM *drm_alloc_agp(drm_device_t * dev, int pages, u32 type); |
851 | extern int drm_free_agp(DRM_AGP_MEM * handle, int pages); | 850 | extern int drm_free_agp(DRM_AGP_MEM * handle, int pages); |
@@ -1053,33 +1052,18 @@ extern void drm_sysfs_device_remove(struct class_device *class_dev); | |||
1053 | 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, |
1054 | unsigned long size, | 1053 | unsigned long size, |
1055 | unsigned alignment); | 1054 | unsigned alignment); |
1056 | 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); |
1057 | 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, |
1058 | unsigned alignment, int best_match); | 1057 | unsigned alignment, int best_match); |
1059 | 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); |
1060 | 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); | ||
1061 | 1064 | ||
1062 | /* Inline replacements for DRM_IOREMAP macros */ | 1065 | extern void drm_core_ioremap(struct drm_map *map, struct drm_device *dev); |
1063 | static __inline__ void drm_core_ioremap(struct drm_map *map, | 1066 | extern void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev); |
1064 | struct drm_device *dev) | ||
1065 | { | ||
1066 | map->handle = drm_ioremap(map->offset, map->size, dev); | ||
1067 | } | ||
1068 | |||
1069 | #if 0 | ||
1070 | static __inline__ void drm_core_ioremap_nocache(struct drm_map *map, | ||
1071 | struct drm_device *dev) | ||
1072 | { | ||
1073 | map->handle = drm_ioremap_nocache(map->offset, map->size, dev); | ||
1074 | } | ||
1075 | #endif /* 0 */ | ||
1076 | |||
1077 | static __inline__ void drm_core_ioremapfree(struct drm_map *map, | ||
1078 | struct drm_device *dev) | ||
1079 | { | ||
1080 | if (map->handle && map->size) | ||
1081 | drm_ioremapfree(map->handle, map->size, dev); | ||
1082 | } | ||
1083 | 1067 | ||
1084 | static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev, | 1068 | static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev, |
1085 | unsigned int token) | 1069 | unsigned int token) |