aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-08-13 21:35:15 -0400
committerDave Airlie <airlied@linux.ie>2006-09-21 15:32:32 -0400
commita1d0fcf5a1cf56ae4711c7e0f857832724a67e8b (patch)
tree2773f67ec366cecdf18de83a0df867ce7164fe93 /drivers/char/drm
parentc29b669caae4ed1630ef479e54bdde126a0378ec (diff)
drm: remove FALSE/TRUE that snuck in with simple memory manager changes.
Thanks to Andrew Morton for pointing these out, I've fixed a few his patch missed. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm')
-rw-r--r--drivers/char/drm/drm_bufs.c2
-rw-r--r--drivers/char/drm/drm_mm.c14
-rw-r--r--drivers/char/drm/drm_sman.c2
-rw-r--r--drivers/char/drm/drm_sman.h2
-rw-r--r--drivers/char/drm/sis_mm.c12
-rw-r--r--drivers/char/drm/via_mm.c6
6 files changed, 19 insertions, 19 deletions
diff --git a/drivers/char/drm/drm_bufs.c b/drivers/char/drm/drm_bufs.c
index dde612091005..71d2e0917636 100644
--- a/drivers/char/drm/drm_bufs.c
+++ b/drivers/char/drm/drm_bufs.c
@@ -248,7 +248,7 @@ static int drm_addmap_core(drm_device_t * dev, unsigned int offset,
248 /* We do it here so that dev->struct_mutex protects the increment */ 248 /* We do it here so that dev->struct_mutex protects the increment */
249 user_token = (map->type == _DRM_SHM) ? (unsigned long)map->handle : 249 user_token = (map->type == _DRM_SHM) ? (unsigned long)map->handle :
250 map->offset; 250 map->offset;
251 ret = drm_map_handle(dev, &list->hash, user_token, FALSE); 251 ret = drm_map_handle(dev, &list->hash, user_token, 0);
252 if (ret) { 252 if (ret) {
253 drm_free(map, sizeof(*map), DRM_MEM_MAPS); 253 drm_free(map, sizeof(*map), DRM_MEM_MAPS);
254 drm_free(list, sizeof(*list), DRM_MEM_MAPS); 254 drm_free(list, sizeof(*list), DRM_MEM_MAPS);
diff --git a/drivers/char/drm/drm_mm.c b/drivers/char/drm/drm_mm.c
index c55ed45a8944..617526bd5b0c 100644
--- a/drivers/char/drm/drm_mm.c
+++ b/drivers/char/drm/drm_mm.c
@@ -54,7 +54,7 @@ drm_mm_node_t *drm_mm_get_block(drm_mm_node_t * parent,
54 54
55 if (parent->size == size) { 55 if (parent->size == size) {
56 list_del_init(&parent->fl_entry); 56 list_del_init(&parent->fl_entry);
57 parent->free = FALSE; 57 parent->free = 0;
58 return parent; 58 return parent;
59 } else { 59 } else {
60 child = (drm_mm_node_t *) drm_alloc(sizeof(*child), DRM_MEM_MM); 60 child = (drm_mm_node_t *) drm_alloc(sizeof(*child), DRM_MEM_MM);
@@ -64,7 +64,7 @@ drm_mm_node_t *drm_mm_get_block(drm_mm_node_t * parent,
64 INIT_LIST_HEAD(&child->ml_entry); 64 INIT_LIST_HEAD(&child->ml_entry);
65 INIT_LIST_HEAD(&child->fl_entry); 65 INIT_LIST_HEAD(&child->fl_entry);
66 66
67 child->free = FALSE; 67 child->free = 0;
68 child->size = size; 68 child->size = size;
69 child->start = parent->start; 69 child->start = parent->start;
70 70
@@ -89,13 +89,13 @@ void drm_mm_put_block(drm_mm_t * mm, drm_mm_node_t * cur)
89 drm_mm_node_t *prev_node = NULL; 89 drm_mm_node_t *prev_node = NULL;
90 drm_mm_node_t *next_node; 90 drm_mm_node_t *next_node;
91 91
92 int merged = FALSE; 92 int merged = 0;
93 93
94 if (cur_head->prev != root_head) { 94 if (cur_head->prev != root_head) {
95 prev_node = list_entry(cur_head->prev, drm_mm_node_t, ml_entry); 95 prev_node = list_entry(cur_head->prev, drm_mm_node_t, ml_entry);
96 if (prev_node->free) { 96 if (prev_node->free) {
97 prev_node->size += cur->size; 97 prev_node->size += cur->size;
98 merged = TRUE; 98 merged = 1;
99 } 99 }
100 } 100 }
101 if (cur_head->next != root_head) { 101 if (cur_head->next != root_head) {
@@ -110,12 +110,12 @@ void drm_mm_put_block(drm_mm_t * mm, drm_mm_node_t * cur)
110 } else { 110 } else {
111 next_node->size += cur->size; 111 next_node->size += cur->size;
112 next_node->start = cur->start; 112 next_node->start = cur->start;
113 merged = TRUE; 113 merged = 1;
114 } 114 }
115 } 115 }
116 } 116 }
117 if (!merged) { 117 if (!merged) {
118 cur->free = TRUE; 118 cur->free = 1;
119 list_add(&cur->fl_entry, &list_root->fl_entry); 119 list_add(&cur->fl_entry, &list_root->fl_entry);
120 } else { 120 } else {
121 list_del(&cur->ml_entry); 121 list_del(&cur->ml_entry);
@@ -169,7 +169,7 @@ int drm_mm_init(drm_mm_t * mm, unsigned long start, unsigned long size)
169 169
170 child->start = start; 170 child->start = start;
171 child->size = size; 171 child->size = size;
172 child->free = TRUE; 172 child->free = 1;
173 173
174 list_add(&child->fl_entry, &mm->root_node.fl_entry); 174 list_add(&child->fl_entry, &mm->root_node.fl_entry);
175 list_add(&child->ml_entry, &mm->root_node.ml_entry); 175 list_add(&child->ml_entry, &mm->root_node.ml_entry);
diff --git a/drivers/char/drm/drm_sman.c b/drivers/char/drm/drm_sman.c
index baba91398911..b92f0ee74b39 100644
--- a/drivers/char/drm/drm_sman.c
+++ b/drivers/char/drm/drm_sman.c
@@ -91,7 +91,7 @@ static void *drm_sman_mm_allocate(void *private, unsigned long size,
91 drm_mm_t *mm = (drm_mm_t *) private; 91 drm_mm_t *mm = (drm_mm_t *) private;
92 drm_mm_node_t *tmp; 92 drm_mm_node_t *tmp;
93 93
94 tmp = drm_mm_search_free(mm, size, alignment, TRUE); 94 tmp = drm_mm_search_free(mm, size, alignment, 1);
95 if (!tmp) { 95 if (!tmp) {
96 return NULL; 96 return NULL;
97 } 97 }
diff --git a/drivers/char/drm/drm_sman.h b/drivers/char/drm/drm_sman.h
index 7c48360f114e..ddc732a1bf27 100644
--- a/drivers/char/drm/drm_sman.h
+++ b/drivers/char/drm/drm_sman.h
@@ -148,7 +148,7 @@ extern drm_memblock_item_t *drm_sman_alloc(drm_sman_t * sman,
148extern int drm_sman_free_key(drm_sman_t * sman, unsigned int key); 148extern int drm_sman_free_key(drm_sman_t * sman, unsigned int key);
149 149
150/* 150/*
151 * returns TRUE 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.
152 * Typically called to determine if we need to idle the hardware and call 152 * Typically called to determine if we need to idle the hardware and call
153 * drm_sman_owner_cleanup. If there are no stale memory blocks, it removes all 153 * drm_sman_owner_cleanup. If there are no stale memory blocks, it removes all
154 * resources associated with owner. 154 * resources associated with owner.
diff --git a/drivers/char/drm/sis_mm.c b/drivers/char/drm/sis_mm.c
index 3041c5b42d56..1b21e324d04e 100644
--- a/drivers/char/drm/sis_mm.c
+++ b/drivers/char/drm/sis_mm.c
@@ -111,7 +111,7 @@ static int sis_fb_init(DRM_IOCTL_ARGS)
111 return ret; 111 return ret;
112 } 112 }
113 113
114 dev_priv->vram_initialized = TRUE; 114 dev_priv->vram_initialized = 1;
115 dev_priv->vram_offset = fb.offset; 115 dev_priv->vram_offset = fb.offset;
116 116
117 mutex_unlock(&dev->struct_mutex); 117 mutex_unlock(&dev->struct_mutex);
@@ -133,7 +133,7 @@ static int sis_drm_alloc(drm_device_t * dev, drm_file_t * priv,
133 133
134 mutex_lock(&dev->struct_mutex); 134 mutex_lock(&dev->struct_mutex);
135 135
136 if (FALSE == ((pool == 0) ? dev_priv->vram_initialized : 136 if (0 == ((pool == 0) ? dev_priv->vram_initialized :
137 dev_priv->agp_initialized)) { 137 dev_priv->agp_initialized)) {
138 DRM_ERROR 138 DRM_ERROR
139 ("Attempt to allocate from uninitialized memory manager.\n"); 139 ("Attempt to allocate from uninitialized memory manager.\n");
@@ -211,7 +211,7 @@ static int sis_ioctl_agp_init(DRM_IOCTL_ARGS)
211 return ret; 211 return ret;
212 } 212 }
213 213
214 dev_priv->agp_initialized = TRUE; 214 dev_priv->agp_initialized = 1;
215 dev_priv->agp_offset = agp.offset; 215 dev_priv->agp_offset = agp.offset;
216 mutex_unlock(&dev->struct_mutex); 216 mutex_unlock(&dev->struct_mutex);
217 217
@@ -284,7 +284,7 @@ int sis_idle(drm_device_t *dev)
284 if (time_after_eq(jiffies, end)) { 284 if (time_after_eq(jiffies, end)) {
285 DRM_ERROR("Graphics engine idle timeout. " 285 DRM_ERROR("Graphics engine idle timeout. "
286 "Disabling idle check\n"); 286 "Disabling idle check\n");
287 dev_priv->idle_fault = TRUE; 287 dev_priv->idle_fault = 1;
288 } 288 }
289 289
290 /* 290 /*
@@ -305,8 +305,8 @@ void sis_lastclose(struct drm_device *dev)
305 305
306 mutex_lock(&dev->struct_mutex); 306 mutex_lock(&dev->struct_mutex);
307 drm_sman_cleanup(&dev_priv->sman); 307 drm_sman_cleanup(&dev_priv->sman);
308 dev_priv->vram_initialized = FALSE; 308 dev_priv->vram_initialized = 0;
309 dev_priv->agp_initialized = FALSE; 309 dev_priv->agp_initialized = 0;
310 dev_priv->mmio = NULL; 310 dev_priv->mmio = NULL;
311 mutex_unlock(&dev->struct_mutex); 311 mutex_unlock(&dev->struct_mutex);
312} 312}
diff --git a/drivers/char/drm/via_mm.c b/drivers/char/drm/via_mm.c
index 9d9237ef9448..d6c08e1d768f 100644
--- a/drivers/char/drm/via_mm.c
+++ b/drivers/char/drm/via_mm.c
@@ -116,8 +116,8 @@ void via_lastclose(struct drm_device *dev)
116 116
117 mutex_lock(&dev->struct_mutex); 117 mutex_lock(&dev->struct_mutex);
118 drm_sman_cleanup(&dev_priv->sman); 118 drm_sman_cleanup(&dev_priv->sman);
119 dev_priv->vram_initialized = FALSE; 119 dev_priv->vram_initialized = 0;
120 dev_priv->agp_initialized = FALSE; 120 dev_priv->agp_initialized = 0;
121 mutex_unlock(&dev->struct_mutex); 121 mutex_unlock(&dev->struct_mutex);
122} 122}
123 123
@@ -139,7 +139,7 @@ int via_mem_alloc(DRM_IOCTL_ARGS)
139 return DRM_ERR(EINVAL); 139 return DRM_ERR(EINVAL);
140 } 140 }
141 mutex_lock(&dev->struct_mutex); 141 mutex_lock(&dev->struct_mutex);
142 if (FALSE == ((mem.type == VIA_MEM_VIDEO) ? dev_priv->vram_initialized : 142 if (0 == ((mem.type == VIA_MEM_VIDEO) ? dev_priv->vram_initialized :
143 dev_priv->agp_initialized)) { 143 dev_priv->agp_initialized)) {
144 DRM_ERROR 144 DRM_ERROR
145 ("Attempt to allocate from uninitialized memory manager.\n"); 145 ("Attempt to allocate from uninitialized memory manager.\n");