@@ -1119,8 +1119,13 @@ EXPORT_SYMBOL(ttm_bo_validate);
int ttm_bo_check_placement(struct ttm_buffer_object *bo,
struct ttm_placement *placement)
{
- BUG_ON((placement->fpfn || placement->lpfn) &&
- (bo->mem.num_pages > (placement->lpfn - placement->fpfn)));
+ if (((placement->fpfn || placement->lpfn) &&
+ (bo->mem.num_pages > (placement->lpfn - placement->fpfn)))) {
+ printk(KERN_ALERT "bo->mem.num_pages = %d, placement->lpfn =%d,
placement->fpfn = %d\n",
+ bo->mem.num_pages, placement->lpfn,
placement->fpfn);
+ WARN_ON(1);
+ return -ENOMEM;
+ }