aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_irq.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_irq.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_irq.c')
-rw-r--r--drivers/gpu/drm/drm_irq.c44
1 files changed, 16 insertions, 28 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index fc8e5acd9d9a..b4a3dbcebe9b 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -104,21 +104,13 @@ void drm_vblank_cleanup(struct drm_device *dev)
104 104
105 vblank_disable_fn((unsigned long)dev); 105 vblank_disable_fn((unsigned long)dev);
106 106
107 drm_free(dev->vbl_queue, sizeof(*dev->vbl_queue) * dev->num_crtcs, 107 kfree(dev->vbl_queue);
108 DRM_MEM_DRIVER); 108 kfree(dev->_vblank_count);
109 drm_free(dev->_vblank_count, sizeof(*dev->_vblank_count) * 109 kfree(dev->vblank_refcount);
110 dev->num_crtcs, DRM_MEM_DRIVER); 110 kfree(dev->vblank_enabled);
111 drm_free(dev->vblank_refcount, sizeof(*dev->vblank_refcount) * 111 kfree(dev->last_vblank);
112 dev->num_crtcs, DRM_MEM_DRIVER); 112 kfree(dev->last_vblank_wait);
113 drm_free(dev->vblank_enabled, sizeof(*dev->vblank_enabled) * 113 kfree(dev->vblank_inmodeset);
114 dev->num_crtcs, DRM_MEM_DRIVER);
115 drm_free(dev->last_vblank, sizeof(*dev->last_vblank) * dev->num_crtcs,
116 DRM_MEM_DRIVER);
117 drm_free(dev->last_vblank_wait,
118 sizeof(*dev->last_vblank_wait) * dev->num_crtcs,
119 DRM_MEM_DRIVER);
120 drm_free(dev->vblank_inmodeset, sizeof(*dev->vblank_inmodeset) *
121 dev->num_crtcs, DRM_MEM_DRIVER);
122 114
123 dev->num_crtcs = 0; 115 dev->num_crtcs = 0;
124} 116}
@@ -132,37 +124,33 @@ int drm_vblank_init(struct drm_device *dev, int num_crtcs)
132 spin_lock_init(&dev->vbl_lock); 124 spin_lock_init(&dev->vbl_lock);
133 dev->num_crtcs = num_crtcs; 125 dev->num_crtcs = num_crtcs;
134 126
135 dev->vbl_queue = drm_alloc(sizeof(wait_queue_head_t) * num_crtcs, 127 dev->vbl_queue = kmalloc(sizeof(wait_queue_head_t) * num_crtcs,
136 DRM_MEM_DRIVER); 128 GFP_KERNEL);
137 if (!dev->vbl_queue) 129 if (!dev->vbl_queue)
138 goto err; 130 goto err;
139 131
140 dev->_vblank_count = drm_alloc(sizeof(atomic_t) * num_crtcs, 132 dev->_vblank_count = kmalloc(sizeof(atomic_t) * num_crtcs, GFP_KERNEL);
141 DRM_MEM_DRIVER);
142 if (!dev->_vblank_count) 133 if (!dev->_vblank_count)
143 goto err; 134 goto err;
144 135
145 dev->vblank_refcount = drm_alloc(sizeof(atomic_t) * num_crtcs, 136 dev->vblank_refcount = kmalloc(sizeof(atomic_t) * num_crtcs,
146 DRM_MEM_DRIVER); 137 GFP_KERNEL);
147 if (!dev->vblank_refcount) 138 if (!dev->vblank_refcount)
148 goto err; 139 goto err;
149 140
150 dev->vblank_enabled = drm_calloc(num_crtcs, sizeof(int), 141 dev->vblank_enabled = kcalloc(num_crtcs, sizeof(int), GFP_KERNEL);
151 DRM_MEM_DRIVER);
152 if (!dev->vblank_enabled) 142 if (!dev->vblank_enabled)
153 goto err; 143 goto err;
154 144
155 dev->last_vblank = drm_calloc(num_crtcs, sizeof(u32), DRM_MEM_DRIVER); 145 dev->last_vblank = kcalloc(num_crtcs, sizeof(u32), GFP_KERNEL);
156 if (!dev->last_vblank) 146 if (!dev->last_vblank)
157 goto err; 147 goto err;
158 148
159 dev->last_vblank_wait = drm_calloc(num_crtcs, sizeof(u32), 149 dev->last_vblank_wait = kcalloc(num_crtcs, sizeof(u32), GFP_KERNEL);
160 DRM_MEM_DRIVER);
161 if (!dev->last_vblank_wait) 150 if (!dev->last_vblank_wait)
162 goto err; 151 goto err;
163 152
164 dev->vblank_inmodeset = drm_calloc(num_crtcs, sizeof(int), 153 dev->vblank_inmodeset = kcalloc(num_crtcs, sizeof(int), GFP_KERNEL);
165 DRM_MEM_DRIVER);
166 if (!dev->vblank_inmodeset) 154 if (!dev->vblank_inmodeset)
167 goto err; 155 goto err;
168 156