diff options
author | Dave Airlie <airlied@linux.ie> | 2007-07-11 20:21:05 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-07-11 20:21:05 -0400 |
commit | 9698b4dba42eb758ad98012c21e5fbdb372fe2d9 (patch) | |
tree | 5be810137553bd3885f34f89f2386aa32c3a9fa4 /drivers/char/drm/drm_sman.h | |
parent | 55910517af381eba4f978740e5e46e23eb269326 (diff) |
drm: de-typedef sman
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drm_sman.h')
-rw-r--r-- | drivers/char/drm/drm_sman.h | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/char/drm/drm_sman.h b/drivers/char/drm/drm_sman.h index ddc732a1bf27..2fef3b2bb613 100644 --- a/drivers/char/drm/drm_sman.h +++ b/drivers/char/drm/drm_sman.h | |||
@@ -50,7 +50,7 @@ | |||
50 | * for memory management. | 50 | * for memory management. |
51 | */ | 51 | */ |
52 | 52 | ||
53 | typedef struct drm_sman_mm { | 53 | struct drm_sman_mm { |
54 | /* private info. If allocated, needs to be destroyed by the destroy | 54 | /* private info. If allocated, needs to be destroyed by the destroy |
55 | function */ | 55 | function */ |
56 | void *private; | 56 | void *private; |
@@ -74,30 +74,30 @@ typedef struct drm_sman_mm { | |||
74 | "alloc" function */ | 74 | "alloc" function */ |
75 | 75 | ||
76 | unsigned long (*offset) (void *private, void *ref); | 76 | unsigned long (*offset) (void *private, void *ref); |
77 | } drm_sman_mm_t; | 77 | }; |
78 | 78 | ||
79 | typedef struct drm_memblock_item { | 79 | struct drm_memblock_item { |
80 | struct list_head owner_list; | 80 | struct list_head owner_list; |
81 | drm_hash_item_t user_hash; | 81 | drm_hash_item_t user_hash; |
82 | void *mm_info; | 82 | void *mm_info; |
83 | drm_sman_mm_t *mm; | 83 | struct drm_sman_mm *mm; |
84 | struct drm_sman *sman; | 84 | struct drm_sman *sman; |
85 | } drm_memblock_item_t; | 85 | }; |
86 | 86 | ||
87 | typedef struct drm_sman { | 87 | struct drm_sman { |
88 | drm_sman_mm_t *mm; | 88 | struct drm_sman_mm *mm; |
89 | int num_managers; | 89 | int num_managers; |
90 | drm_open_hash_t owner_hash_tab; | 90 | drm_open_hash_t owner_hash_tab; |
91 | drm_open_hash_t user_hash_tab; | 91 | drm_open_hash_t user_hash_tab; |
92 | struct list_head owner_items; | 92 | struct list_head owner_items; |
93 | } drm_sman_t; | 93 | }; |
94 | 94 | ||
95 | /* | 95 | /* |
96 | * Take down a memory manager. This function should only be called after a | 96 | * Take down a memory manager. This function should only be called after a |
97 | * successful init and after a call to drm_sman_cleanup. | 97 | * successful init and after a call to drm_sman_cleanup. |
98 | */ | 98 | */ |
99 | 99 | ||
100 | extern void drm_sman_takedown(drm_sman_t * sman); | 100 | extern void drm_sman_takedown(struct drm_sman * sman); |
101 | 101 | ||
102 | /* | 102 | /* |
103 | * Allocate structures for a manager. | 103 | * Allocate structures for a manager. |
@@ -112,7 +112,7 @@ extern void drm_sman_takedown(drm_sman_t * sman); | |||
112 | * | 112 | * |
113 | */ | 113 | */ |
114 | 114 | ||
115 | extern int drm_sman_init(drm_sman_t * sman, unsigned int num_managers, | 115 | extern int drm_sman_init(struct drm_sman * sman, unsigned int num_managers, |
116 | unsigned int user_order, unsigned int owner_order); | 116 | unsigned int user_order, unsigned int owner_order); |
117 | 117 | ||
118 | /* | 118 | /* |
@@ -120,7 +120,7 @@ extern int drm_sman_init(drm_sman_t * sman, unsigned int num_managers, | |||
120 | * manager unless a customized allogator is used. | 120 | * manager unless a customized allogator is used. |
121 | */ | 121 | */ |
122 | 122 | ||
123 | extern int drm_sman_set_range(drm_sman_t * sman, unsigned int manager, | 123 | extern int drm_sman_set_range(struct drm_sman * sman, unsigned int manager, |
124 | unsigned long start, unsigned long size); | 124 | unsigned long start, unsigned long size); |
125 | 125 | ||
126 | /* | 126 | /* |
@@ -129,23 +129,23 @@ extern int drm_sman_set_range(drm_sman_t * sman, unsigned int manager, | |||
129 | * so it can be destroyed after this call. | 129 | * so it can be destroyed after this call. |
130 | */ | 130 | */ |
131 | 131 | ||
132 | extern int drm_sman_set_manager(drm_sman_t * sman, unsigned int mananger, | 132 | extern int drm_sman_set_manager(struct drm_sman * sman, unsigned int mananger, |
133 | drm_sman_mm_t * allocator); | 133 | struct drm_sman_mm * allocator); |
134 | 134 | ||
135 | /* | 135 | /* |
136 | * Allocate a memory block. Aligment is not implemented yet. | 136 | * Allocate a memory block. Aligment is not implemented yet. |
137 | */ | 137 | */ |
138 | 138 | ||
139 | extern drm_memblock_item_t *drm_sman_alloc(drm_sman_t * sman, | 139 | extern struct drm_memblock_item *drm_sman_alloc(struct drm_sman * sman, |
140 | unsigned int manager, | 140 | unsigned int manager, |
141 | unsigned long size, | 141 | unsigned long size, |
142 | unsigned alignment, | 142 | unsigned alignment, |
143 | unsigned long owner); | 143 | unsigned long owner); |
144 | /* | 144 | /* |
145 | * Free a memory block identified by its user hash key. | 145 | * Free a memory block identified by its user hash key. |
146 | */ | 146 | */ |
147 | 147 | ||
148 | extern int drm_sman_free_key(drm_sman_t * sman, unsigned int key); | 148 | extern int drm_sman_free_key(struct drm_sman * sman, unsigned int key); |
149 | 149 | ||
150 | /* | 150 | /* |
151 | * returns 1 iff there are no stale memory blocks associated with this owner. | 151 | * returns 1 iff there are no stale memory blocks associated with this owner. |
@@ -154,7 +154,7 @@ extern int drm_sman_free_key(drm_sman_t * sman, unsigned int key); | |||
154 | * resources associated with owner. | 154 | * resources associated with owner. |
155 | */ | 155 | */ |
156 | 156 | ||
157 | extern int drm_sman_owner_clean(drm_sman_t * sman, unsigned long owner); | 157 | extern int drm_sman_owner_clean(struct drm_sman * sman, unsigned long owner); |
158 | 158 | ||
159 | /* | 159 | /* |
160 | * Frees all stale memory blocks associated with this owner. Note that this | 160 | * Frees all stale memory blocks associated with this owner. Note that this |
@@ -164,13 +164,13 @@ extern int drm_sman_owner_clean(drm_sman_t * sman, unsigned long owner); | |||
164 | * is not going to be referenced anymore. | 164 | * is not going to be referenced anymore. |
165 | */ | 165 | */ |
166 | 166 | ||
167 | extern void drm_sman_owner_cleanup(drm_sman_t * sman, unsigned long owner); | 167 | extern void drm_sman_owner_cleanup(struct drm_sman * sman, unsigned long owner); |
168 | 168 | ||
169 | /* | 169 | /* |
170 | * Frees all stale memory blocks associated with the memory manager. | 170 | * Frees all stale memory blocks associated with the memory manager. |
171 | * See idling above. | 171 | * See idling above. |
172 | */ | 172 | */ |
173 | 173 | ||
174 | extern void drm_sman_cleanup(drm_sman_t * sman); | 174 | extern void drm_sman_cleanup(struct drm_sman * sman); |
175 | 175 | ||
176 | #endif | 176 | #endif |