aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2014-08-09 14:10:22 -0400
committerBen Skeggs <bskeggs@redhat.com>2014-08-09 15:13:10 -0400
commitfa2bade99a6fb24c3847d48ba3cad9a70dbb5364 (patch)
tree6bffa2d52f3f7d9056bd9ba3a26d0de56406ef9c
parenta04d04231b490a2dca427a0f04603ed47fdb9cee (diff)
drm/nouveau: fix some usages of the wrong print function
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/dispnv04/overlay.c10
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_abi16.c3
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_agp.c9
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bo.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_chan.c8
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drm.h14
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_gem.c56
-rw-r--r--drivers/gpu/drm/nouveau/nv50_display.c2
8 files changed, 54 insertions, 50 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv04/overlay.c b/drivers/gpu/drm/nouveau/dispnv04/overlay.c
index ab03f7719d2d..fa69ef011992 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/overlay.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/overlay.c
@@ -256,7 +256,7 @@ static const struct drm_plane_funcs nv10_plane_funcs = {
256static void 256static void
257nv10_overlay_init(struct drm_device *device) 257nv10_overlay_init(struct drm_device *device)
258{ 258{
259 struct nouveau_device *dev = nouveau_dev(device); 259 struct nouveau_drm *drm = nouveau_drm(device);
260 struct nouveau_plane *plane = kzalloc(sizeof(struct nouveau_plane), GFP_KERNEL); 260 struct nouveau_plane *plane = kzalloc(sizeof(struct nouveau_plane), GFP_KERNEL);
261 int num_formats = ARRAY_SIZE(formats); 261 int num_formats = ARRAY_SIZE(formats);
262 int ret; 262 int ret;
@@ -264,7 +264,7 @@ nv10_overlay_init(struct drm_device *device)
264 if (!plane) 264 if (!plane)
265 return; 265 return;
266 266
267 switch (dev->chipset) { 267 switch (nv_device(drm->device)->chipset) {
268 case 0x10: 268 case 0x10:
269 case 0x11: 269 case 0x11:
270 case 0x15: 270 case 0x15:
@@ -333,7 +333,7 @@ cleanup:
333 drm_plane_cleanup(&plane->base); 333 drm_plane_cleanup(&plane->base);
334err: 334err:
335 kfree(plane); 335 kfree(plane);
336 nv_error(dev, "Failed to create plane\n"); 336 NV_ERROR(drm, "Failed to create plane\n");
337} 337}
338 338
339static int 339static int
@@ -447,7 +447,7 @@ static const struct drm_plane_funcs nv04_plane_funcs = {
447static void 447static void
448nv04_overlay_init(struct drm_device *device) 448nv04_overlay_init(struct drm_device *device)
449{ 449{
450 struct nouveau_device *dev = nouveau_dev(device); 450 struct nouveau_drm *drm = nouveau_drm(device);
451 struct nouveau_plane *plane = kzalloc(sizeof(struct nouveau_plane), GFP_KERNEL); 451 struct nouveau_plane *plane = kzalloc(sizeof(struct nouveau_plane), GFP_KERNEL);
452 int ret; 452 int ret;
453 453
@@ -483,7 +483,7 @@ cleanup:
483 drm_plane_cleanup(&plane->base); 483 drm_plane_cleanup(&plane->base);
484err: 484err:
485 kfree(plane); 485 kfree(plane);
486 nv_error(dev, "Failed to create plane\n"); 486 NV_ERROR(drm, "Failed to create plane\n");
487} 487}
488 488
489void 489void
diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c
index b0437783002e..397256758c5b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_abi16.c
+++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c
@@ -168,6 +168,7 @@ nouveau_abi16_fini(struct nouveau_abi16 *abi16)
168int 168int
169nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS) 169nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)
170{ 170{
171 struct nouveau_cli *cli = nouveau_cli(file_priv);
171 struct nouveau_drm *drm = nouveau_drm(dev); 172 struct nouveau_drm *drm = nouveau_drm(dev);
172 struct nouveau_device *device = nv_device(drm->device); 173 struct nouveau_device *device = nv_device(drm->device);
173 struct nouveau_timer *ptimer = nouveau_timer(device); 174 struct nouveau_timer *ptimer = nouveau_timer(device);
@@ -224,7 +225,7 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)
224 getparam->value = graph->units ? graph->units(graph) : 0; 225 getparam->value = graph->units ? graph->units(graph) : 0;
225 break; 226 break;
226 default: 227 default:
227 nv_debug(device, "unknown parameter %lld\n", getparam->param); 228 NV_PRINTK(debug, cli, "unknown parameter %lld\n", getparam->param);
228 return -EINVAL; 229 return -EINVAL;
229 } 230 }
230 231
diff --git a/drivers/gpu/drm/nouveau/nouveau_agp.c b/drivers/gpu/drm/nouveau/nouveau_agp.c
index 51666daddb94..bf6f7fb1b5a2 100644
--- a/drivers/gpu/drm/nouveau/nouveau_agp.c
+++ b/drivers/gpu/drm/nouveau/nouveau_agp.c
@@ -50,7 +50,7 @@ get_agp_mode(struct nouveau_drm *drm, const struct drm_agp_info *info)
50 device->pdev->vendor == quirk->chip_vendor && 50 device->pdev->vendor == quirk->chip_vendor &&
51 device->pdev->device == quirk->chip_device) { 51 device->pdev->device == quirk->chip_device) {
52 agpmode = quirk->mode; 52 agpmode = quirk->mode;
53 nv_info(device, "Forcing agp mode to %dX. Use agpmode to override.\n", 53 NV_INFO(drm, "Forcing agp mode to %dX. Use agpmode to override.\n",
54 agpmode); 54 agpmode);
55 break; 55 break;
56 } 56 }
@@ -150,7 +150,6 @@ void
150nouveau_agp_init(struct nouveau_drm *drm) 150nouveau_agp_init(struct nouveau_drm *drm)
151{ 151{
152#if __OS_HAS_AGP 152#if __OS_HAS_AGP
153 struct nouveau_device *device = nv_device(drm->device);
154 struct drm_device *dev = drm->dev; 153 struct drm_device *dev = drm->dev;
155 struct drm_agp_info info; 154 struct drm_agp_info info;
156 struct drm_agp_mode mode; 155 struct drm_agp_mode mode;
@@ -162,13 +161,13 @@ nouveau_agp_init(struct nouveau_drm *drm)
162 161
163 ret = drm_agp_acquire(dev); 162 ret = drm_agp_acquire(dev);
164 if (ret) { 163 if (ret) {
165 nv_error(device, "unable to acquire AGP: %d\n", ret); 164 NV_ERROR(drm, "unable to acquire AGP: %d\n", ret);
166 return; 165 return;
167 } 166 }
168 167
169 ret = drm_agp_info(dev, &info); 168 ret = drm_agp_info(dev, &info);
170 if (ret) { 169 if (ret) {
171 nv_error(device, "unable to get AGP info: %d\n", ret); 170 NV_ERROR(drm, "unable to get AGP info: %d\n", ret);
172 return; 171 return;
173 } 172 }
174 173
@@ -177,7 +176,7 @@ nouveau_agp_init(struct nouveau_drm *drm)
177 176
178 ret = drm_agp_enable(dev, mode); 177 ret = drm_agp_enable(dev, mode);
179 if (ret) { 178 if (ret) {
180 nv_error(device, "unable to enable AGP: %d\n", ret); 179 NV_ERROR(drm, "unable to enable AGP: %d\n", ret);
181 return; 180 return;
182 } 181 }
183 182
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index d9e7c4023677..51db52f10ad1 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -201,7 +201,7 @@ nouveau_bo_new(struct drm_device *dev, int size, int align,
201 max_size = INT_MAX & ~((1 << lpg_shift) - 1); 201 max_size = INT_MAX & ~((1 << lpg_shift) - 1);
202 202
203 if (size <= 0 || size > max_size) { 203 if (size <= 0 || size > max_size) {
204 nv_warn(drm, "skipped size %x\n", (u32)size); 204 NV_WARN(drm, "skipped size %x\n", (u32)size);
205 return -EINVAL; 205 return -EINVAL;
206 } 206 }
207 207
diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c b/drivers/gpu/drm/nouveau/nouveau_chan.c
index ccb6b452d6d0..938df47a592e 100644
--- a/drivers/gpu/drm/nouveau/nouveau_chan.c
+++ b/drivers/gpu/drm/nouveau/nouveau_chan.c
@@ -58,7 +58,7 @@ nouveau_channel_idle(struct nouveau_channel *chan)
58 } 58 }
59 59
60 if (ret) 60 if (ret)
61 NV_ERROR(cli, "failed to idle channel 0x%08x [%s]\n", 61 NV_PRINTK(error, cli, "failed to idle channel 0x%08x [%s]\n",
62 chan->handle, cli->base.name); 62 chan->handle, cli->base.name);
63 return ret; 63 return ret;
64} 64}
@@ -379,17 +379,17 @@ nouveau_channel_new(struct nouveau_drm *drm, struct nouveau_cli *cli,
379 379
380 ret = nouveau_channel_ind(drm, cli, parent, handle, arg0, pchan); 380 ret = nouveau_channel_ind(drm, cli, parent, handle, arg0, pchan);
381 if (ret) { 381 if (ret) {
382 NV_DEBUG(cli, "ib channel create, %d\n", ret); 382 NV_PRINTK(debug, cli, "ib channel create, %d\n", ret);
383 ret = nouveau_channel_dma(drm, cli, parent, handle, pchan); 383 ret = nouveau_channel_dma(drm, cli, parent, handle, pchan);
384 if (ret) { 384 if (ret) {
385 NV_DEBUG(cli, "dma channel create, %d\n", ret); 385 NV_PRINTK(debug, cli, "dma channel create, %d\n", ret);
386 return ret; 386 return ret;
387 } 387 }
388 } 388 }
389 389
390 ret = nouveau_channel_init(*pchan, arg0, arg1); 390 ret = nouveau_channel_init(*pchan, arg0, arg1);
391 if (ret) { 391 if (ret) {
392 NV_ERROR(cli, "channel failed to initialise, %d\n", ret); 392 NV_PRINTK(error, cli, "channel failed to initialise, %d\n", ret);
393 nouveau_channel_del(pchan); 393 nouveau_channel_del(pchan);
394 return ret; 394 return ret;
395 } 395 }
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.h b/drivers/gpu/drm/nouveau/nouveau_drm.h
index ab2060767ba9..de8055220266 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.h
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.h
@@ -168,11 +168,15 @@ nouveau_platform_device_create_(struct platform_device *pdev,
168 int size, void **pobject); 168 int size, void **pobject);
169void nouveau_drm_device_remove(struct drm_device *dev); 169void nouveau_drm_device_remove(struct drm_device *dev);
170 170
171#define NV_FATAL(cli, fmt, args...) nv_fatal((cli), fmt, ##args) 171#define NV_PRINTK(l,c,f,a...) do { \
172#define NV_ERROR(cli, fmt, args...) nv_error((cli), fmt, ##args) 172 struct nouveau_cli *_cli = (c); \
173#define NV_WARN(cli, fmt, args...) nv_warn((cli), fmt, ##args) 173 nv_##l(_cli, f, ##a); \
174#define NV_INFO(cli, fmt, args...) nv_info((cli), fmt, ##args) 174} while(0)
175#define NV_DEBUG(cli, fmt, args...) nv_debug((cli), fmt, ##args) 175#define NV_FATAL(drm,f,a...) NV_PRINTK(fatal, &(drm)->client, f, ##a)
176#define NV_ERROR(drm,f,a...) NV_PRINTK(error, &(drm)->client, f, ##a)
177#define NV_WARN(drm,f,a...) NV_PRINTK(warn, &(drm)->client, f, ##a)
178#define NV_INFO(drm,f,a...) NV_PRINTK(info, &(drm)->client, f, ##a)
179#define NV_DEBUG(drm,f,a...) NV_PRINTK(debug, &(drm)->client, f, ##a)
176 180
177extern int nouveau_modeset; 181extern int nouveau_modeset;
178 182
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index abb7321b35c8..04ebb22a101d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -229,7 +229,7 @@ nouveau_gem_ioctl_new(struct drm_device *dev, void *data,
229 int ret = 0; 229 int ret = 0;
230 230
231 if (!pfb->memtype_valid(pfb, req->info.tile_flags)) { 231 if (!pfb->memtype_valid(pfb, req->info.tile_flags)) {
232 NV_ERROR(cli, "bad page flags: 0x%08x\n", req->info.tile_flags); 232 NV_PRINTK(error, cli, "bad page flags: 0x%08x\n", req->info.tile_flags);
233 return -EINVAL; 233 return -EINVAL;
234 } 234 }
235 235
@@ -350,7 +350,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
350 ww_acquire_init(&op->ticket, &reservation_ww_class); 350 ww_acquire_init(&op->ticket, &reservation_ww_class);
351retry: 351retry:
352 if (++trycnt > 100000) { 352 if (++trycnt > 100000) {
353 NV_ERROR(cli, "%s failed and gave up.\n", __func__); 353 NV_PRINTK(error, cli, "%s failed and gave up.\n", __func__);
354 return -EINVAL; 354 return -EINVAL;
355 } 355 }
356 356
@@ -361,7 +361,7 @@ retry:
361 361
362 gem = drm_gem_object_lookup(dev, file_priv, b->handle); 362 gem = drm_gem_object_lookup(dev, file_priv, b->handle);
363 if (!gem) { 363 if (!gem) {
364 NV_ERROR(cli, "Unknown handle 0x%08x\n", b->handle); 364 NV_PRINTK(error, cli, "Unknown handle 0x%08x\n", b->handle);
365 ww_acquire_done(&op->ticket); 365 ww_acquire_done(&op->ticket);
366 validate_fini(op, NULL); 366 validate_fini(op, NULL);
367 return -ENOENT; 367 return -ENOENT;
@@ -374,7 +374,7 @@ retry:
374 } 374 }
375 375
376 if (nvbo->reserved_by && nvbo->reserved_by == file_priv) { 376 if (nvbo->reserved_by && nvbo->reserved_by == file_priv) {
377 NV_ERROR(cli, "multiple instances of buffer %d on " 377 NV_PRINTK(error, cli, "multiple instances of buffer %d on "
378 "validation list\n", b->handle); 378 "validation list\n", b->handle);
379 drm_gem_object_unreference_unlocked(gem); 379 drm_gem_object_unreference_unlocked(gem);
380 ww_acquire_done(&op->ticket); 380 ww_acquire_done(&op->ticket);
@@ -396,7 +396,7 @@ retry:
396 ww_acquire_fini(&op->ticket); 396 ww_acquire_fini(&op->ticket);
397 drm_gem_object_unreference_unlocked(gem); 397 drm_gem_object_unreference_unlocked(gem);
398 if (ret != -ERESTARTSYS) 398 if (ret != -ERESTARTSYS)
399 NV_ERROR(cli, "fail reserve\n"); 399 NV_PRINTK(error, cli, "fail reserve\n");
400 return ret; 400 return ret;
401 } 401 }
402 } 402 }
@@ -414,7 +414,7 @@ retry:
414 if (b->valid_domains & NOUVEAU_GEM_DOMAIN_GART) 414 if (b->valid_domains & NOUVEAU_GEM_DOMAIN_GART)
415 list_add_tail(&nvbo->entry, &op->gart_list); 415 list_add_tail(&nvbo->entry, &op->gart_list);
416 else { 416 else {
417 NV_ERROR(cli, "invalid valid domains: 0x%08x\n", 417 NV_PRINTK(error, cli, "invalid valid domains: 0x%08x\n",
418 b->valid_domains); 418 b->valid_domains);
419 list_add_tail(&nvbo->entry, &op->both_list); 419 list_add_tail(&nvbo->entry, &op->both_list);
420 ww_acquire_done(&op->ticket); 420 ww_acquire_done(&op->ticket);
@@ -465,20 +465,20 @@ validate_list(struct nouveau_channel *chan, struct nouveau_cli *cli,
465 b->write_domains, 465 b->write_domains,
466 b->valid_domains); 466 b->valid_domains);
467 if (unlikely(ret)) { 467 if (unlikely(ret)) {
468 NV_ERROR(cli, "fail set_domain\n"); 468 NV_PRINTK(error, cli, "fail set_domain\n");
469 return ret; 469 return ret;
470 } 470 }
471 471
472 ret = nouveau_bo_validate(nvbo, true, false); 472 ret = nouveau_bo_validate(nvbo, true, false);
473 if (unlikely(ret)) { 473 if (unlikely(ret)) {
474 if (ret != -ERESTARTSYS) 474 if (ret != -ERESTARTSYS)
475 NV_ERROR(cli, "fail ttm_validate\n"); 475 NV_PRINTK(error, cli, "fail ttm_validate\n");
476 return ret; 476 return ret;
477 } 477 }
478 478
479 ret = validate_sync(chan, nvbo); 479 ret = validate_sync(chan, nvbo);
480 if (unlikely(ret)) { 480 if (unlikely(ret)) {
481 NV_ERROR(cli, "fail post-validate sync\n"); 481 NV_PRINTK(error, cli, "fail post-validate sync\n");
482 return ret; 482 return ret;
483 } 483 }
484 484
@@ -527,14 +527,14 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan,
527 ret = validate_init(chan, file_priv, pbbo, nr_buffers, op); 527 ret = validate_init(chan, file_priv, pbbo, nr_buffers, op);
528 if (unlikely(ret)) { 528 if (unlikely(ret)) {
529 if (ret != -ERESTARTSYS) 529 if (ret != -ERESTARTSYS)
530 NV_ERROR(cli, "validate_init\n"); 530 NV_PRINTK(error, cli, "validate_init\n");
531 return ret; 531 return ret;
532 } 532 }
533 533
534 ret = validate_list(chan, cli, &op->vram_list, pbbo, user_buffers); 534 ret = validate_list(chan, cli, &op->vram_list, pbbo, user_buffers);
535 if (unlikely(ret < 0)) { 535 if (unlikely(ret < 0)) {
536 if (ret != -ERESTARTSYS) 536 if (ret != -ERESTARTSYS)
537 NV_ERROR(cli, "validate vram_list\n"); 537 NV_PRINTK(error, cli, "validate vram_list\n");
538 validate_fini(op, NULL); 538 validate_fini(op, NULL);
539 return ret; 539 return ret;
540 } 540 }
@@ -543,7 +543,7 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan,
543 ret = validate_list(chan, cli, &op->gart_list, pbbo, user_buffers); 543 ret = validate_list(chan, cli, &op->gart_list, pbbo, user_buffers);
544 if (unlikely(ret < 0)) { 544 if (unlikely(ret < 0)) {
545 if (ret != -ERESTARTSYS) 545 if (ret != -ERESTARTSYS)
546 NV_ERROR(cli, "validate gart_list\n"); 546 NV_PRINTK(error, cli, "validate gart_list\n");
547 validate_fini(op, NULL); 547 validate_fini(op, NULL);
548 return ret; 548 return ret;
549 } 549 }
@@ -552,7 +552,7 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan,
552 ret = validate_list(chan, cli, &op->both_list, pbbo, user_buffers); 552 ret = validate_list(chan, cli, &op->both_list, pbbo, user_buffers);
553 if (unlikely(ret < 0)) { 553 if (unlikely(ret < 0)) {
554 if (ret != -ERESTARTSYS) 554 if (ret != -ERESTARTSYS)
555 NV_ERROR(cli, "validate both_list\n"); 555 NV_PRINTK(error, cli, "validate both_list\n");
556 validate_fini(op, NULL); 556 validate_fini(op, NULL);
557 return ret; 557 return ret;
558 } 558 }
@@ -613,7 +613,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
613 uint32_t data; 613 uint32_t data;
614 614
615 if (unlikely(r->bo_index > req->nr_buffers)) { 615 if (unlikely(r->bo_index > req->nr_buffers)) {
616 NV_ERROR(cli, "reloc bo index invalid\n"); 616 NV_PRINTK(error, cli, "reloc bo index invalid\n");
617 ret = -EINVAL; 617 ret = -EINVAL;
618 break; 618 break;
619 } 619 }
@@ -623,7 +623,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
623 continue; 623 continue;
624 624
625 if (unlikely(r->reloc_bo_index > req->nr_buffers)) { 625 if (unlikely(r->reloc_bo_index > req->nr_buffers)) {
626 NV_ERROR(cli, "reloc container bo index invalid\n"); 626 NV_PRINTK(error, cli, "reloc container bo index invalid\n");
627 ret = -EINVAL; 627 ret = -EINVAL;
628 break; 628 break;
629 } 629 }
@@ -631,7 +631,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
631 631
632 if (unlikely(r->reloc_bo_offset + 4 > 632 if (unlikely(r->reloc_bo_offset + 4 >
633 nvbo->bo.mem.num_pages << PAGE_SHIFT)) { 633 nvbo->bo.mem.num_pages << PAGE_SHIFT)) {
634 NV_ERROR(cli, "reloc outside of bo\n"); 634 NV_PRINTK(error, cli, "reloc outside of bo\n");
635 ret = -EINVAL; 635 ret = -EINVAL;
636 break; 636 break;
637 } 637 }
@@ -640,7 +640,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
640 ret = ttm_bo_kmap(&nvbo->bo, 0, nvbo->bo.mem.num_pages, 640 ret = ttm_bo_kmap(&nvbo->bo, 0, nvbo->bo.mem.num_pages,
641 &nvbo->kmap); 641 &nvbo->kmap);
642 if (ret) { 642 if (ret) {
643 NV_ERROR(cli, "failed kmap for reloc\n"); 643 NV_PRINTK(error, cli, "failed kmap for reloc\n");
644 break; 644 break;
645 } 645 }
646 nvbo->validate_mapped = true; 646 nvbo->validate_mapped = true;
@@ -665,7 +665,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
665 ret = ttm_bo_wait(&nvbo->bo, false, false, false); 665 ret = ttm_bo_wait(&nvbo->bo, false, false, false);
666 spin_unlock(&nvbo->bo.bdev->fence_lock); 666 spin_unlock(&nvbo->bo.bdev->fence_lock);
667 if (ret) { 667 if (ret) {
668 NV_ERROR(cli, "reloc wait_idle failed: %d\n", ret); 668 NV_PRINTK(error, cli, "reloc wait_idle failed: %d\n", ret);
669 break; 669 break;
670 } 670 }
671 671
@@ -711,19 +711,19 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
711 goto out_next; 711 goto out_next;
712 712
713 if (unlikely(req->nr_push > NOUVEAU_GEM_MAX_PUSH)) { 713 if (unlikely(req->nr_push > NOUVEAU_GEM_MAX_PUSH)) {
714 NV_ERROR(cli, "pushbuf push count exceeds limit: %d max %d\n", 714 NV_PRINTK(error, cli, "pushbuf push count exceeds limit: %d max %d\n",
715 req->nr_push, NOUVEAU_GEM_MAX_PUSH); 715 req->nr_push, NOUVEAU_GEM_MAX_PUSH);
716 return nouveau_abi16_put(abi16, -EINVAL); 716 return nouveau_abi16_put(abi16, -EINVAL);
717 } 717 }
718 718
719 if (unlikely(req->nr_buffers > NOUVEAU_GEM_MAX_BUFFERS)) { 719 if (unlikely(req->nr_buffers > NOUVEAU_GEM_MAX_BUFFERS)) {
720 NV_ERROR(cli, "pushbuf bo count exceeds limit: %d max %d\n", 720 NV_PRINTK(error, cli, "pushbuf bo count exceeds limit: %d max %d\n",
721 req->nr_buffers, NOUVEAU_GEM_MAX_BUFFERS); 721 req->nr_buffers, NOUVEAU_GEM_MAX_BUFFERS);
722 return nouveau_abi16_put(abi16, -EINVAL); 722 return nouveau_abi16_put(abi16, -EINVAL);
723 } 723 }
724 724
725 if (unlikely(req->nr_relocs > NOUVEAU_GEM_MAX_RELOCS)) { 725 if (unlikely(req->nr_relocs > NOUVEAU_GEM_MAX_RELOCS)) {
726 NV_ERROR(cli, "pushbuf reloc count exceeds limit: %d max %d\n", 726 NV_PRINTK(error, cli, "pushbuf reloc count exceeds limit: %d max %d\n",
727 req->nr_relocs, NOUVEAU_GEM_MAX_RELOCS); 727 req->nr_relocs, NOUVEAU_GEM_MAX_RELOCS);
728 return nouveau_abi16_put(abi16, -EINVAL); 728 return nouveau_abi16_put(abi16, -EINVAL);
729 } 729 }
@@ -741,7 +741,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
741 /* Ensure all push buffers are on validate list */ 741 /* Ensure all push buffers are on validate list */
742 for (i = 0; i < req->nr_push; i++) { 742 for (i = 0; i < req->nr_push; i++) {
743 if (push[i].bo_index >= req->nr_buffers) { 743 if (push[i].bo_index >= req->nr_buffers) {
744 NV_ERROR(cli, "push %d buffer not in list\n", i); 744 NV_PRINTK(error, cli, "push %d buffer not in list\n", i);
745 ret = -EINVAL; 745 ret = -EINVAL;
746 goto out_prevalid; 746 goto out_prevalid;
747 } 747 }
@@ -752,7 +752,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
752 req->nr_buffers, &op, &do_reloc); 752 req->nr_buffers, &op, &do_reloc);
753 if (ret) { 753 if (ret) {
754 if (ret != -ERESTARTSYS) 754 if (ret != -ERESTARTSYS)
755 NV_ERROR(cli, "validate: %d\n", ret); 755 NV_PRINTK(error, cli, "validate: %d\n", ret);
756 goto out_prevalid; 756 goto out_prevalid;
757 } 757 }
758 758
@@ -760,7 +760,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
760 if (do_reloc) { 760 if (do_reloc) {
761 ret = nouveau_gem_pushbuf_reloc_apply(cli, req, bo); 761 ret = nouveau_gem_pushbuf_reloc_apply(cli, req, bo);
762 if (ret) { 762 if (ret) {
763 NV_ERROR(cli, "reloc apply: %d\n", ret); 763 NV_PRINTK(error, cli, "reloc apply: %d\n", ret);
764 goto out; 764 goto out;
765 } 765 }
766 } 766 }
@@ -768,7 +768,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
768 if (chan->dma.ib_max) { 768 if (chan->dma.ib_max) {
769 ret = nouveau_dma_wait(chan, req->nr_push + 1, 16); 769 ret = nouveau_dma_wait(chan, req->nr_push + 1, 16);
770 if (ret) { 770 if (ret) {
771 NV_ERROR(cli, "nv50cal_space: %d\n", ret); 771 NV_PRINTK(error, cli, "nv50cal_space: %d\n", ret);
772 goto out; 772 goto out;
773 } 773 }
774 774
@@ -783,7 +783,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
783 if (nv_device(drm->device)->chipset >= 0x25) { 783 if (nv_device(drm->device)->chipset >= 0x25) {
784 ret = RING_SPACE(chan, req->nr_push * 2); 784 ret = RING_SPACE(chan, req->nr_push * 2);
785 if (ret) { 785 if (ret) {
786 NV_ERROR(cli, "cal_space: %d\n", ret); 786 NV_PRINTK(error, cli, "cal_space: %d\n", ret);
787 goto out; 787 goto out;
788 } 788 }
789 789
@@ -797,7 +797,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
797 } else { 797 } else {
798 ret = RING_SPACE(chan, req->nr_push * (2 + NOUVEAU_DMA_SKIPS)); 798 ret = RING_SPACE(chan, req->nr_push * (2 + NOUVEAU_DMA_SKIPS));
799 if (ret) { 799 if (ret) {
800 NV_ERROR(cli, "jmp_space: %d\n", ret); 800 NV_PRINTK(error, cli, "jmp_space: %d\n", ret);
801 goto out; 801 goto out;
802 } 802 }
803 803
@@ -835,7 +835,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
835 835
836 ret = nouveau_fence_new(chan, false, &fence); 836 ret = nouveau_fence_new(chan, false, &fence);
837 if (ret) { 837 if (ret) {
838 NV_ERROR(cli, "error fencing pushbuf: %d\n", ret); 838 NV_PRINTK(error, cli, "error fencing pushbuf: %d\n", ret);
839 WIND_RING(chan); 839 WIND_RING(chan);
840 goto out; 840 goto out;
841 } 841 }
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
index 61fc682accdd..03152add9baa 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -284,7 +284,7 @@ evo_wait(void *evoc, int nr)
284 nv_wo32(dmac->base.user, 0x0000, 0x00000000); 284 nv_wo32(dmac->base.user, 0x0000, 0x00000000);
285 if (!nv_wait(dmac->base.user, 0x0004, ~0, 0x00000000)) { 285 if (!nv_wait(dmac->base.user, 0x0004, ~0, 0x00000000)) {
286 mutex_unlock(&dmac->lock); 286 mutex_unlock(&dmac->lock);
287 NV_ERROR(dmac->base.user, "channel stalled\n"); 287 nv_error(dmac->base.user, "channel stalled\n");
288 return NULL; 288 return NULL;
289 } 289 }
290 290