aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_gem.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-03-24 15:23:04 -0400
committerEric Anholt <eric@anholt.net>2009-06-18 16:00:33 -0400
commit9a298b2acd771d8a5c0004d8f8e4156c65b11f6b (patch)
treef8bf6cfe675492cb881abb50d9aa9aa8f38733d6 /drivers/gpu/drm/drm_gem.c
parent52dc7d32b88156248167864f77a9026abe27b432 (diff)
drm: Remove memory debugging infrastructure.
It hasn't been used in ages, and having the user tell your how much memory is being freed at free time is a recipe for disaster even if it was ever used. Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/drm_gem.c')
-rw-r--r--drivers/gpu/drm/drm_gem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index ec43005100d9..8104ecaea26f 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -89,7 +89,7 @@ drm_gem_init(struct drm_device *dev)
89 atomic_set(&dev->gtt_count, 0); 89 atomic_set(&dev->gtt_count, 0);
90 atomic_set(&dev->gtt_memory, 0); 90 atomic_set(&dev->gtt_memory, 0);
91 91
92 mm = drm_calloc(1, sizeof(struct drm_gem_mm), DRM_MEM_MM); 92 mm = kzalloc(sizeof(struct drm_gem_mm), GFP_KERNEL);
93 if (!mm) { 93 if (!mm) {
94 DRM_ERROR("out of memory\n"); 94 DRM_ERROR("out of memory\n");
95 return -ENOMEM; 95 return -ENOMEM;
@@ -98,14 +98,14 @@ drm_gem_init(struct drm_device *dev)
98 dev->mm_private = mm; 98 dev->mm_private = mm;
99 99
100 if (drm_ht_create(&mm->offset_hash, 19)) { 100 if (drm_ht_create(&mm->offset_hash, 19)) {
101 drm_free(mm, sizeof(struct drm_gem_mm), DRM_MEM_MM); 101 kfree(mm);
102 return -ENOMEM; 102 return -ENOMEM;
103 } 103 }
104 104
105 if (drm_mm_init(&mm->offset_manager, DRM_FILE_PAGE_OFFSET_START, 105 if (drm_mm_init(&mm->offset_manager, DRM_FILE_PAGE_OFFSET_START,
106 DRM_FILE_PAGE_OFFSET_SIZE)) { 106 DRM_FILE_PAGE_OFFSET_SIZE)) {
107 drm_ht_remove(&mm->offset_hash); 107 drm_ht_remove(&mm->offset_hash);
108 drm_free(mm, sizeof(struct drm_gem_mm), DRM_MEM_MM); 108 kfree(mm);
109 return -ENOMEM; 109 return -ENOMEM;
110 } 110 }
111 111
@@ -119,7 +119,7 @@ drm_gem_destroy(struct drm_device *dev)
119 119
120 drm_mm_takedown(&mm->offset_manager); 120 drm_mm_takedown(&mm->offset_manager);
121 drm_ht_remove(&mm->offset_hash); 121 drm_ht_remove(&mm->offset_hash);
122 drm_free(mm, sizeof(struct drm_gem_mm), DRM_MEM_MM); 122 kfree(mm);
123 dev->mm_private = NULL; 123 dev->mm_private = NULL;
124} 124}
125 125