blob: e3bee59ef6c32af5bfb150c7b097fb464706b1fa [file] [log] [blame]
Jerome Glisse771fe6b2009-06-05 14:42:42 +02001/*
2 * Copyright 2008 Advanced Micro Devices, Inc.
3 * Copyright 2008 Red Hat Inc.
4 * Copyright 2009 Jerome Glisse.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
23 *
24 * Authors: Dave Airlie
25 * Alex Deucher
26 * Jerome Glisse
27 */
28#include <linux/seq_file.h>
29#include "drmP.h"
30#include "radeon_drm.h"
31#include "radeon_reg.h"
32#include "radeon.h"
33#include "atom.h"
34
35int radeon_debugfs_ib_init(struct radeon_device *rdev);
36
Jerome Glisse9f93ed32010-01-28 18:22:31 +010037void radeon_ib_bogus_cleanup(struct radeon_device *rdev)
38{
39 struct radeon_ib *ib, *n;
40
41 list_for_each_entry_safe(ib, n, &rdev->ib_pool.bogus_ib, list) {
42 list_del(&ib->list);
43 vfree(ib->ptr);
44 kfree(ib);
45 }
46}
47
48void radeon_ib_bogus_add(struct radeon_device *rdev, struct radeon_ib *ib)
49{
50 struct radeon_ib *bib;
51
52 bib = kmalloc(sizeof(*bib), GFP_KERNEL);
53 if (bib == NULL)
54 return;
55 bib->ptr = vmalloc(ib->length_dw * 4);
56 if (bib->ptr == NULL) {
57 kfree(bib);
58 return;
59 }
60 memcpy(bib->ptr, ib->ptr, ib->length_dw * 4);
61 bib->length_dw = ib->length_dw;
62 mutex_lock(&rdev->ib_pool.mutex);
63 list_add_tail(&bib->list, &rdev->ib_pool.bogus_ib);
64 mutex_unlock(&rdev->ib_pool.mutex);
65}
66
Jerome Glisse771fe6b2009-06-05 14:42:42 +020067/*
68 * IB.
69 */
70int radeon_ib_get(struct radeon_device *rdev, struct radeon_ib **ib)
71{
72 struct radeon_fence *fence;
73 struct radeon_ib *nib;
74 unsigned long i;
75 int r = 0;
76
77 *ib = NULL;
78 r = radeon_fence_create(rdev, &fence);
79 if (r) {
80 DRM_ERROR("failed to create fence for new IB\n");
81 return r;
82 }
83 mutex_lock(&rdev->ib_pool.mutex);
84 i = find_first_zero_bit(rdev->ib_pool.alloc_bm, RADEON_IB_POOL_SIZE);
85 if (i < RADEON_IB_POOL_SIZE) {
86 set_bit(i, rdev->ib_pool.alloc_bm);
87 rdev->ib_pool.ibs[i].length_dw = 0;
88 *ib = &rdev->ib_pool.ibs[i];
Dave Airlieecb114a2009-09-15 11:12:56 +100089 mutex_unlock(&rdev->ib_pool.mutex);
Jerome Glisse771fe6b2009-06-05 14:42:42 +020090 goto out;
91 }
92 if (list_empty(&rdev->ib_pool.scheduled_ibs)) {
93 /* we go do nothings here */
Dave Airlieecb114a2009-09-15 11:12:56 +100094 mutex_unlock(&rdev->ib_pool.mutex);
Jerome Glisse771fe6b2009-06-05 14:42:42 +020095 DRM_ERROR("all IB allocated none scheduled.\n");
96 r = -EINVAL;
97 goto out;
98 }
99 /* get the first ib on the scheduled list */
100 nib = list_entry(rdev->ib_pool.scheduled_ibs.next,
101 struct radeon_ib, list);
102 if (nib->fence == NULL) {
103 /* we go do nothings here */
Dave Airlieecb114a2009-09-15 11:12:56 +1000104 mutex_unlock(&rdev->ib_pool.mutex);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200105 DRM_ERROR("IB %lu scheduled without a fence.\n", nib->idx);
106 r = -EINVAL;
107 goto out;
108 }
Dave Airlieecb114a2009-09-15 11:12:56 +1000109 mutex_unlock(&rdev->ib_pool.mutex);
110
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200111 r = radeon_fence_wait(nib->fence, false);
112 if (r) {
113 DRM_ERROR("radeon: IB(%lu:0x%016lX:%u)\n", nib->idx,
114 (unsigned long)nib->gpu_addr, nib->length_dw);
115 DRM_ERROR("radeon: GPU lockup detected, fail to get a IB\n");
116 goto out;
117 }
118 radeon_fence_unref(&nib->fence);
Dave Airlieecb114a2009-09-15 11:12:56 +1000119
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200120 nib->length_dw = 0;
Dave Airlieecb114a2009-09-15 11:12:56 +1000121
122 /* scheduled list is accessed here */
123 mutex_lock(&rdev->ib_pool.mutex);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200124 list_del(&nib->list);
125 INIT_LIST_HEAD(&nib->list);
Dave Airlieecb114a2009-09-15 11:12:56 +1000126 mutex_unlock(&rdev->ib_pool.mutex);
127
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200128 *ib = nib;
129out:
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200130 if (r) {
131 radeon_fence_unref(&fence);
132 } else {
133 (*ib)->fence = fence;
134 }
135 return r;
136}
137
138void radeon_ib_free(struct radeon_device *rdev, struct radeon_ib **ib)
139{
140 struct radeon_ib *tmp = *ib;
141
142 *ib = NULL;
143 if (tmp == NULL) {
144 return;
145 }
146 mutex_lock(&rdev->ib_pool.mutex);
147 if (!list_empty(&tmp->list) && !radeon_fence_signaled(tmp->fence)) {
148 /* IB is scheduled & not signaled don't do anythings */
149 mutex_unlock(&rdev->ib_pool.mutex);
150 return;
151 }
152 list_del(&tmp->list);
Dave Airlieecb114a2009-09-15 11:12:56 +1000153 INIT_LIST_HEAD(&tmp->list);
154 if (tmp->fence)
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200155 radeon_fence_unref(&tmp->fence);
Dave Airlieecb114a2009-09-15 11:12:56 +1000156
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200157 tmp->length_dw = 0;
158 clear_bit(tmp->idx, rdev->ib_pool.alloc_bm);
159 mutex_unlock(&rdev->ib_pool.mutex);
160}
161
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200162int radeon_ib_schedule(struct radeon_device *rdev, struct radeon_ib *ib)
163{
164 int r = 0;
165
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200166 if (!ib->length_dw || !rdev->cp.ready) {
167 /* TODO: Nothings in the ib we should report. */
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200168 DRM_ERROR("radeon: couldn't schedule IB(%lu).\n", ib->idx);
169 return -EINVAL;
170 }
Dave Airlieecb114a2009-09-15 11:12:56 +1000171
Dave Airlie6cdf6582009-06-29 18:29:13 +1000172 /* 64 dwords should be enough for fence too */
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200173 r = radeon_ring_lock(rdev, 64);
174 if (r) {
175 DRM_ERROR("radeon: scheduling IB failled (%d).\n", r);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200176 return r;
177 }
Jerome Glisse3ce0a232009-09-08 10:10:24 +1000178 radeon_ring_ib_execute(rdev, ib);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200179 radeon_fence_emit(rdev, ib->fence);
Dave Airlieecb114a2009-09-15 11:12:56 +1000180 mutex_lock(&rdev->ib_pool.mutex);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200181 list_add_tail(&ib->list, &rdev->ib_pool.scheduled_ibs);
182 mutex_unlock(&rdev->ib_pool.mutex);
Dave Airlieecb114a2009-09-15 11:12:56 +1000183 radeon_ring_unlock_commit(rdev);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200184 return 0;
185}
186
187int radeon_ib_pool_init(struct radeon_device *rdev)
188{
189 void *ptr;
190 uint64_t gpu_addr;
191 int i;
192 int r = 0;
193
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200194 if (rdev->ib_pool.robj)
195 return 0;
Jerome Glisse9f93ed32010-01-28 18:22:31 +0100196 INIT_LIST_HEAD(&rdev->ib_pool.bogus_ib);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200197 /* Allocate 1M object buffer */
198 INIT_LIST_HEAD(&rdev->ib_pool.scheduled_ibs);
Jerome Glisse4c788672009-11-20 14:29:23 +0100199 r = radeon_bo_create(rdev, NULL, RADEON_IB_POOL_SIZE*64*1024,
200 true, RADEON_GEM_DOMAIN_GTT,
201 &rdev->ib_pool.robj);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200202 if (r) {
203 DRM_ERROR("radeon: failed to ib pool (%d).\n", r);
204 return r;
205 }
Jerome Glisse4c788672009-11-20 14:29:23 +0100206 r = radeon_bo_reserve(rdev->ib_pool.robj, false);
207 if (unlikely(r != 0))
208 return r;
209 r = radeon_bo_pin(rdev->ib_pool.robj, RADEON_GEM_DOMAIN_GTT, &gpu_addr);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200210 if (r) {
Jerome Glisse4c788672009-11-20 14:29:23 +0100211 radeon_bo_unreserve(rdev->ib_pool.robj);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200212 DRM_ERROR("radeon: failed to pin ib pool (%d).\n", r);
213 return r;
214 }
Jerome Glisse4c788672009-11-20 14:29:23 +0100215 r = radeon_bo_kmap(rdev->ib_pool.robj, &ptr);
216 radeon_bo_unreserve(rdev->ib_pool.robj);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200217 if (r) {
218 DRM_ERROR("radeon: failed to map ib poll (%d).\n", r);
219 return r;
220 }
221 for (i = 0; i < RADEON_IB_POOL_SIZE; i++) {
222 unsigned offset;
223
224 offset = i * 64 * 1024;
225 rdev->ib_pool.ibs[i].gpu_addr = gpu_addr + offset;
226 rdev->ib_pool.ibs[i].ptr = ptr + offset;
227 rdev->ib_pool.ibs[i].idx = i;
228 rdev->ib_pool.ibs[i].length_dw = 0;
229 INIT_LIST_HEAD(&rdev->ib_pool.ibs[i].list);
230 }
231 bitmap_zero(rdev->ib_pool.alloc_bm, RADEON_IB_POOL_SIZE);
232 rdev->ib_pool.ready = true;
233 DRM_INFO("radeon: ib pool ready.\n");
234 if (radeon_debugfs_ib_init(rdev)) {
235 DRM_ERROR("Failed to register debugfs file for IB !\n");
236 }
237 return r;
238}
239
240void radeon_ib_pool_fini(struct radeon_device *rdev)
241{
Jerome Glisse4c788672009-11-20 14:29:23 +0100242 int r;
243
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200244 if (!rdev->ib_pool.ready) {
245 return;
246 }
247 mutex_lock(&rdev->ib_pool.mutex);
Jerome Glisse9f93ed32010-01-28 18:22:31 +0100248 radeon_ib_bogus_cleanup(rdev);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200249 bitmap_zero(rdev->ib_pool.alloc_bm, RADEON_IB_POOL_SIZE);
250 if (rdev->ib_pool.robj) {
Jerome Glisse4c788672009-11-20 14:29:23 +0100251 r = radeon_bo_reserve(rdev->ib_pool.robj, false);
252 if (likely(r == 0)) {
253 radeon_bo_kunmap(rdev->ib_pool.robj);
254 radeon_bo_unpin(rdev->ib_pool.robj);
255 radeon_bo_unreserve(rdev->ib_pool.robj);
256 }
257 radeon_bo_unref(&rdev->ib_pool.robj);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200258 rdev->ib_pool.robj = NULL;
259 }
260 mutex_unlock(&rdev->ib_pool.mutex);
261}
262
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200263
264/*
265 * Ring.
266 */
267void radeon_ring_free_size(struct radeon_device *rdev)
268{
Jerome Glisse3ce0a232009-09-08 10:10:24 +1000269 if (rdev->family >= CHIP_R600)
270 rdev->cp.rptr = RREG32(R600_CP_RB_RPTR);
271 else
272 rdev->cp.rptr = RREG32(RADEON_CP_RB_RPTR);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200273 /* This works because ring_size is a power of 2 */
274 rdev->cp.ring_free_dw = (rdev->cp.rptr + (rdev->cp.ring_size / 4));
275 rdev->cp.ring_free_dw -= rdev->cp.wptr;
276 rdev->cp.ring_free_dw &= rdev->cp.ptr_mask;
277 if (!rdev->cp.ring_free_dw) {
278 rdev->cp.ring_free_dw = rdev->cp.ring_size / 4;
279 }
280}
281
282int radeon_ring_lock(struct radeon_device *rdev, unsigned ndw)
283{
284 int r;
285
286 /* Align requested size with padding so unlock_commit can
287 * pad safely */
288 ndw = (ndw + rdev->cp.align_mask) & ~rdev->cp.align_mask;
289 mutex_lock(&rdev->cp.mutex);
290 while (ndw > (rdev->cp.ring_free_dw - 1)) {
291 radeon_ring_free_size(rdev);
292 if (ndw < rdev->cp.ring_free_dw) {
293 break;
294 }
295 r = radeon_fence_wait_next(rdev);
296 if (r) {
297 mutex_unlock(&rdev->cp.mutex);
298 return r;
299 }
300 }
301 rdev->cp.count_dw = ndw;
302 rdev->cp.wptr_old = rdev->cp.wptr;
303 return 0;
304}
305
306void radeon_ring_unlock_commit(struct radeon_device *rdev)
307{
308 unsigned count_dw_pad;
309 unsigned i;
310
311 /* We pad to match fetch size */
312 count_dw_pad = (rdev->cp.align_mask + 1) -
313 (rdev->cp.wptr & rdev->cp.align_mask);
314 for (i = 0; i < count_dw_pad; i++) {
Jerome Glisse3ce0a232009-09-08 10:10:24 +1000315 radeon_ring_write(rdev, 2 << 30);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200316 }
317 DRM_MEMORYBARRIER();
Jerome Glisse3ce0a232009-09-08 10:10:24 +1000318 radeon_cp_commit(rdev);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200319 mutex_unlock(&rdev->cp.mutex);
320}
321
322void radeon_ring_unlock_undo(struct radeon_device *rdev)
323{
324 rdev->cp.wptr = rdev->cp.wptr_old;
325 mutex_unlock(&rdev->cp.mutex);
326}
327
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200328int radeon_ring_init(struct radeon_device *rdev, unsigned ring_size)
329{
330 int r;
331
332 rdev->cp.ring_size = ring_size;
333 /* Allocate ring buffer */
334 if (rdev->cp.ring_obj == NULL) {
Jerome Glisse4c788672009-11-20 14:29:23 +0100335 r = radeon_bo_create(rdev, NULL, rdev->cp.ring_size, true,
336 RADEON_GEM_DOMAIN_GTT,
337 &rdev->cp.ring_obj);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200338 if (r) {
Jerome Glisse4c788672009-11-20 14:29:23 +0100339 dev_err(rdev->dev, "(%d) ring create failed\n", r);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200340 return r;
341 }
Jerome Glisse4c788672009-11-20 14:29:23 +0100342 r = radeon_bo_reserve(rdev->cp.ring_obj, false);
343 if (unlikely(r != 0))
344 return r;
345 r = radeon_bo_pin(rdev->cp.ring_obj, RADEON_GEM_DOMAIN_GTT,
346 &rdev->cp.gpu_addr);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200347 if (r) {
Jerome Glisse4c788672009-11-20 14:29:23 +0100348 radeon_bo_unreserve(rdev->cp.ring_obj);
349 dev_err(rdev->dev, "(%d) ring pin failed\n", r);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200350 return r;
351 }
Jerome Glisse4c788672009-11-20 14:29:23 +0100352 r = radeon_bo_kmap(rdev->cp.ring_obj,
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200353 (void **)&rdev->cp.ring);
Jerome Glisse4c788672009-11-20 14:29:23 +0100354 radeon_bo_unreserve(rdev->cp.ring_obj);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200355 if (r) {
Jerome Glisse4c788672009-11-20 14:29:23 +0100356 dev_err(rdev->dev, "(%d) ring map failed\n", r);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200357 return r;
358 }
359 }
360 rdev->cp.ptr_mask = (rdev->cp.ring_size / 4) - 1;
361 rdev->cp.ring_free_dw = rdev->cp.ring_size / 4;
362 return 0;
363}
364
365void radeon_ring_fini(struct radeon_device *rdev)
366{
Jerome Glisse4c788672009-11-20 14:29:23 +0100367 int r;
368
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200369 mutex_lock(&rdev->cp.mutex);
370 if (rdev->cp.ring_obj) {
Jerome Glisse4c788672009-11-20 14:29:23 +0100371 r = radeon_bo_reserve(rdev->cp.ring_obj, false);
372 if (likely(r == 0)) {
373 radeon_bo_kunmap(rdev->cp.ring_obj);
374 radeon_bo_unpin(rdev->cp.ring_obj);
375 radeon_bo_unreserve(rdev->cp.ring_obj);
376 }
377 radeon_bo_unref(&rdev->cp.ring_obj);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200378 rdev->cp.ring = NULL;
379 rdev->cp.ring_obj = NULL;
380 }
381 mutex_unlock(&rdev->cp.mutex);
382}
383
384
385/*
386 * Debugfs info
387 */
388#if defined(CONFIG_DEBUG_FS)
389static int radeon_debugfs_ib_info(struct seq_file *m, void *data)
390{
391 struct drm_info_node *node = (struct drm_info_node *) m->private;
392 struct radeon_ib *ib = node->info_ent->data;
393 unsigned i;
394
395 if (ib == NULL) {
396 return 0;
397 }
398 seq_printf(m, "IB %04lu\n", ib->idx);
399 seq_printf(m, "IB fence %p\n", ib->fence);
400 seq_printf(m, "IB size %05u dwords\n", ib->length_dw);
401 for (i = 0; i < ib->length_dw; i++) {
402 seq_printf(m, "[%05u]=0x%08X\n", i, ib->ptr[i]);
403 }
404 return 0;
405}
406
Jerome Glisse9f93ed32010-01-28 18:22:31 +0100407static int radeon_debugfs_ib_bogus_info(struct seq_file *m, void *data)
408{
409 struct drm_info_node *node = (struct drm_info_node *) m->private;
410 struct radeon_device *rdev = node->info_ent->data;
411 struct radeon_ib *ib;
412 unsigned i;
413
414 mutex_lock(&rdev->ib_pool.mutex);
415 if (list_empty(&rdev->ib_pool.bogus_ib)) {
416 mutex_unlock(&rdev->ib_pool.mutex);
417 seq_printf(m, "no bogus IB recorded\n");
418 return 0;
419 }
420 ib = list_first_entry(&rdev->ib_pool.bogus_ib, struct radeon_ib, list);
421 list_del_init(&ib->list);
422 mutex_unlock(&rdev->ib_pool.mutex);
423 seq_printf(m, "IB size %05u dwords\n", ib->length_dw);
424 for (i = 0; i < ib->length_dw; i++) {
425 seq_printf(m, "[%05u]=0x%08X\n", i, ib->ptr[i]);
426 }
427 vfree(ib->ptr);
428 kfree(ib);
429 return 0;
430}
431
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200432static struct drm_info_list radeon_debugfs_ib_list[RADEON_IB_POOL_SIZE];
433static char radeon_debugfs_ib_names[RADEON_IB_POOL_SIZE][32];
Jerome Glisse9f93ed32010-01-28 18:22:31 +0100434
435static struct drm_info_list radeon_debugfs_ib_bogus_info_list[] = {
436 {"radeon_ib_bogus", radeon_debugfs_ib_bogus_info, 0, NULL},
437};
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200438#endif
439
440int radeon_debugfs_ib_init(struct radeon_device *rdev)
441{
442#if defined(CONFIG_DEBUG_FS)
443 unsigned i;
Jerome Glisse9f93ed32010-01-28 18:22:31 +0100444 int r;
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200445
Jerome Glisse9f93ed32010-01-28 18:22:31 +0100446 radeon_debugfs_ib_bogus_info_list[0].data = rdev;
447 r = radeon_debugfs_add_files(rdev, radeon_debugfs_ib_bogus_info_list, 1);
448 if (r)
449 return r;
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200450 for (i = 0; i < RADEON_IB_POOL_SIZE; i++) {
451 sprintf(radeon_debugfs_ib_names[i], "radeon_ib_%04u", i);
452 radeon_debugfs_ib_list[i].name = radeon_debugfs_ib_names[i];
453 radeon_debugfs_ib_list[i].show = &radeon_debugfs_ib_info;
454 radeon_debugfs_ib_list[i].driver_features = 0;
455 radeon_debugfs_ib_list[i].data = &rdev->ib_pool.ibs[i];
456 }
457 return radeon_debugfs_add_files(rdev, radeon_debugfs_ib_list,
458 RADEON_IB_POOL_SIZE);
459#else
460 return 0;
461#endif
462}