aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm/ttm_bo.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2010-10-29 04:46:47 -0400
committerDave Airlie <airlied@redhat.com>2010-11-08 22:33:42 -0500
commitdbc4a5b83585e89a6bce650d32426f61c8d4bca5 (patch)
tree8b15b17b56b207bccf156ddd02305a80c642544c /drivers/gpu/drm/ttm/ttm_bo.c
parent6e4c55db120b03d411e0eff7cd35f3edabbefe14 (diff)
drm/ttm: Remove mm init error printouts and checks
Replace with BUG_ON(). These error messages remained from the time when TTM was initialized from user-space. Nowadays hitting one of those is really a kernel bug. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_bo.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index e6cedf43c2db..f561eead057d 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -1354,18 +1354,9 @@ int ttm_bo_init_mm(struct ttm_bo_device *bdev, unsigned type,
1354 int ret = -EINVAL; 1354 int ret = -EINVAL;
1355 struct ttm_mem_type_manager *man; 1355 struct ttm_mem_type_manager *man;
1356 1356
1357 if (type >= TTM_NUM_MEM_TYPES) { 1357 BUG_ON(type >= TTM_NUM_MEM_TYPES);
1358 printk(KERN_ERR TTM_PFX "Illegal memory type %d\n", type);
1359 return ret;
1360 }
1361
1362 man = &bdev->man[type]; 1358 man = &bdev->man[type];
1363 if (man->has_type) { 1359 BUG_ON(man->has_type);
1364 printk(KERN_ERR TTM_PFX
1365 "Memory manager already initialized for type %d\n",
1366 type);
1367 return ret;
1368 }
1369 1360
1370 ret = bdev->driver->init_mem_type(bdev, type, man); 1361 ret = bdev->driver->init_mem_type(bdev, type, man);
1371 if (ret) 1362 if (ret)
@@ -1374,13 +1365,6 @@ int ttm_bo_init_mm(struct ttm_bo_device *bdev, unsigned type,
1374 1365
1375 ret = 0; 1366 ret = 0;
1376 if (type != TTM_PL_SYSTEM) { 1367 if (type != TTM_PL_SYSTEM) {
1377 if (!p_size) {
1378 printk(KERN_ERR TTM_PFX
1379 "Zero size memory manager type %d\n",
1380 type);
1381 return ret;
1382 }
1383
1384 ret = (*man->func->init)(man, p_size); 1368 ret = (*man->func->init)(man, p_size);
1385 if (ret) 1369 if (ret)
1386 return ret; 1370 return ret;