Commit fa2bade9 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau: fix some usages of the wrong print function

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent a04d0423
...@@ -256,7 +256,7 @@ static const struct drm_plane_funcs nv10_plane_funcs = { ...@@ -256,7 +256,7 @@ static const struct drm_plane_funcs nv10_plane_funcs = {
static void static void
nv10_overlay_init(struct drm_device *device) nv10_overlay_init(struct drm_device *device)
{ {
struct nouveau_device *dev = nouveau_dev(device); struct nouveau_drm *drm = nouveau_drm(device);
struct nouveau_plane *plane = kzalloc(sizeof(struct nouveau_plane), GFP_KERNEL); struct nouveau_plane *plane = kzalloc(sizeof(struct nouveau_plane), GFP_KERNEL);
int num_formats = ARRAY_SIZE(formats); int num_formats = ARRAY_SIZE(formats);
int ret; int ret;
...@@ -264,7 +264,7 @@ nv10_overlay_init(struct drm_device *device) ...@@ -264,7 +264,7 @@ nv10_overlay_init(struct drm_device *device)
if (!plane) if (!plane)
return; return;
switch (dev->chipset) { switch (nv_device(drm->device)->chipset) {
case 0x10: case 0x10:
case 0x11: case 0x11:
case 0x15: case 0x15:
...@@ -333,7 +333,7 @@ nv10_overlay_init(struct drm_device *device) ...@@ -333,7 +333,7 @@ nv10_overlay_init(struct drm_device *device)
drm_plane_cleanup(&plane->base); drm_plane_cleanup(&plane->base);
err: err:
kfree(plane); kfree(plane);
nv_error(dev, "Failed to create plane\n"); NV_ERROR(drm, "Failed to create plane\n");
} }
static int static int
...@@ -447,7 +447,7 @@ static const struct drm_plane_funcs nv04_plane_funcs = { ...@@ -447,7 +447,7 @@ static const struct drm_plane_funcs nv04_plane_funcs = {
static void static void
nv04_overlay_init(struct drm_device *device) nv04_overlay_init(struct drm_device *device)
{ {
struct nouveau_device *dev = nouveau_dev(device); struct nouveau_drm *drm = nouveau_drm(device);
struct nouveau_plane *plane = kzalloc(sizeof(struct nouveau_plane), GFP_KERNEL); struct nouveau_plane *plane = kzalloc(sizeof(struct nouveau_plane), GFP_KERNEL);
int ret; int ret;
...@@ -483,7 +483,7 @@ nv04_overlay_init(struct drm_device *device) ...@@ -483,7 +483,7 @@ nv04_overlay_init(struct drm_device *device)
drm_plane_cleanup(&plane->base); drm_plane_cleanup(&plane->base);
err: err:
kfree(plane); kfree(plane);
nv_error(dev, "Failed to create plane\n"); NV_ERROR(drm, "Failed to create plane\n");
} }
void void
......
...@@ -168,6 +168,7 @@ nouveau_abi16_fini(struct nouveau_abi16 *abi16) ...@@ -168,6 +168,7 @@ nouveau_abi16_fini(struct nouveau_abi16 *abi16)
int int
nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS) nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)
{ {
struct nouveau_cli *cli = nouveau_cli(file_priv);
struct nouveau_drm *drm = nouveau_drm(dev); struct nouveau_drm *drm = nouveau_drm(dev);
struct nouveau_device *device = nv_device(drm->device); struct nouveau_device *device = nv_device(drm->device);
struct nouveau_timer *ptimer = nouveau_timer(device); struct nouveau_timer *ptimer = nouveau_timer(device);
...@@ -224,7 +225,7 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS) ...@@ -224,7 +225,7 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)
getparam->value = graph->units ? graph->units(graph) : 0; getparam->value = graph->units ? graph->units(graph) : 0;
break; break;
default: default:
nv_debug(device, "unknown parameter %lld\n", getparam->param); NV_PRINTK(debug, cli, "unknown parameter %lld\n", getparam->param);
return -EINVAL; return -EINVAL;
} }
......
...@@ -50,7 +50,7 @@ get_agp_mode(struct nouveau_drm *drm, const struct drm_agp_info *info) ...@@ -50,7 +50,7 @@ get_agp_mode(struct nouveau_drm *drm, const struct drm_agp_info *info)
device->pdev->vendor == quirk->chip_vendor && device->pdev->vendor == quirk->chip_vendor &&
device->pdev->device == quirk->chip_device) { device->pdev->device == quirk->chip_device) {
agpmode = quirk->mode; agpmode = quirk->mode;
nv_info(device, "Forcing agp mode to %dX. Use agpmode to override.\n", NV_INFO(drm, "Forcing agp mode to %dX. Use agpmode to override.\n",
agpmode); agpmode);
break; break;
} }
...@@ -150,7 +150,6 @@ void ...@@ -150,7 +150,6 @@ void
nouveau_agp_init(struct nouveau_drm *drm) nouveau_agp_init(struct nouveau_drm *drm)
{ {
#if __OS_HAS_AGP #if __OS_HAS_AGP
struct nouveau_device *device = nv_device(drm->device);
struct drm_device *dev = drm->dev; struct drm_device *dev = drm->dev;
struct drm_agp_info info; struct drm_agp_info info;
struct drm_agp_mode mode; struct drm_agp_mode mode;
...@@ -162,13 +161,13 @@ nouveau_agp_init(struct nouveau_drm *drm) ...@@ -162,13 +161,13 @@ nouveau_agp_init(struct nouveau_drm *drm)
ret = drm_agp_acquire(dev); ret = drm_agp_acquire(dev);
if (ret) { if (ret) {
nv_error(device, "unable to acquire AGP: %d\n", ret); NV_ERROR(drm, "unable to acquire AGP: %d\n", ret);
return; return;
} }
ret = drm_agp_info(dev, &info); ret = drm_agp_info(dev, &info);
if (ret) { if (ret) {
nv_error(device, "unable to get AGP info: %d\n", ret); NV_ERROR(drm, "unable to get AGP info: %d\n", ret);
return; return;
} }
...@@ -177,7 +176,7 @@ nouveau_agp_init(struct nouveau_drm *drm) ...@@ -177,7 +176,7 @@ nouveau_agp_init(struct nouveau_drm *drm)
ret = drm_agp_enable(dev, mode); ret = drm_agp_enable(dev, mode);
if (ret) { if (ret) {
nv_error(device, "unable to enable AGP: %d\n", ret); NV_ERROR(drm, "unable to enable AGP: %d\n", ret);
return; return;
} }
......
...@@ -201,7 +201,7 @@ nouveau_bo_new(struct drm_device *dev, int size, int align, ...@@ -201,7 +201,7 @@ nouveau_bo_new(struct drm_device *dev, int size, int align,
max_size = INT_MAX & ~((1 << lpg_shift) - 1); max_size = INT_MAX & ~((1 << lpg_shift) - 1);
if (size <= 0 || size > max_size) { if (size <= 0 || size > max_size) {
nv_warn(drm, "skipped size %x\n", (u32)size); NV_WARN(drm, "skipped size %x\n", (u32)size);
return -EINVAL; return -EINVAL;
} }
......
...@@ -58,7 +58,7 @@ nouveau_channel_idle(struct nouveau_channel *chan) ...@@ -58,7 +58,7 @@ nouveau_channel_idle(struct nouveau_channel *chan)
} }
if (ret) if (ret)
NV_ERROR(cli, "failed to idle channel 0x%08x [%s]\n", NV_PRINTK(error, cli, "failed to idle channel 0x%08x [%s]\n",
chan->handle, cli->base.name); chan->handle, cli->base.name);
return ret; return ret;
} }
...@@ -379,17 +379,17 @@ nouveau_channel_new(struct nouveau_drm *drm, struct nouveau_cli *cli, ...@@ -379,17 +379,17 @@ nouveau_channel_new(struct nouveau_drm *drm, struct nouveau_cli *cli,
ret = nouveau_channel_ind(drm, cli, parent, handle, arg0, pchan); ret = nouveau_channel_ind(drm, cli, parent, handle, arg0, pchan);
if (ret) { if (ret) {
NV_DEBUG(cli, "ib channel create, %d\n", ret); NV_PRINTK(debug, cli, "ib channel create, %d\n", ret);
ret = nouveau_channel_dma(drm, cli, parent, handle, pchan); ret = nouveau_channel_dma(drm, cli, parent, handle, pchan);
if (ret) { if (ret) {
NV_DEBUG(cli, "dma channel create, %d\n", ret); NV_PRINTK(debug, cli, "dma channel create, %d\n", ret);
return ret; return ret;
} }
} }
ret = nouveau_channel_init(*pchan, arg0, arg1); ret = nouveau_channel_init(*pchan, arg0, arg1);
if (ret) { if (ret) {
NV_ERROR(cli, "channel failed to initialise, %d\n", ret); NV_PRINTK(error, cli, "channel failed to initialise, %d\n", ret);
nouveau_channel_del(pchan); nouveau_channel_del(pchan);
return ret; return ret;
} }
......
...@@ -168,11 +168,15 @@ nouveau_platform_device_create_(struct platform_device *pdev, ...@@ -168,11 +168,15 @@ nouveau_platform_device_create_(struct platform_device *pdev,
int size, void **pobject); int size, void **pobject);
void nouveau_drm_device_remove(struct drm_device *dev); void nouveau_drm_device_remove(struct drm_device *dev);
#define NV_FATAL(cli, fmt, args...) nv_fatal((cli), fmt, ##args) #define NV_PRINTK(l,c,f,a...) do { \
#define NV_ERROR(cli, fmt, args...) nv_error((cli), fmt, ##args) struct nouveau_cli *_cli = (c); \
#define NV_WARN(cli, fmt, args...) nv_warn((cli), fmt, ##args) nv_##l(_cli, f, ##a); \
#define NV_INFO(cli, fmt, args...) nv_info((cli), fmt, ##args) } while(0)
#define NV_DEBUG(cli, fmt, args...) nv_debug((cli), fmt, ##args) #define NV_FATAL(drm,f,a...) NV_PRINTK(fatal, &(drm)->client, f, ##a)
#define NV_ERROR(drm,f,a...) NV_PRINTK(error, &(drm)->client, f, ##a)
#define NV_WARN(drm,f,a...) NV_PRINTK(warn, &(drm)->client, f, ##a)
#define NV_INFO(drm,f,a...) NV_PRINTK(info, &(drm)->client, f, ##a)
#define NV_DEBUG(drm,f,a...) NV_PRINTK(debug, &(drm)->client, f, ##a)
extern int nouveau_modeset; extern int nouveau_modeset;
......
...@@ -229,7 +229,7 @@ nouveau_gem_ioctl_new(struct drm_device *dev, void *data, ...@@ -229,7 +229,7 @@ nouveau_gem_ioctl_new(struct drm_device *dev, void *data,
int ret = 0; int ret = 0;
if (!pfb->memtype_valid(pfb, req->info.tile_flags)) { if (!pfb->memtype_valid(pfb, req->info.tile_flags)) {
NV_ERROR(cli, "bad page flags: 0x%08x\n", req->info.tile_flags); NV_PRINTK(error, cli, "bad page flags: 0x%08x\n", req->info.tile_flags);
return -EINVAL; return -EINVAL;
} }
...@@ -350,7 +350,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv, ...@@ -350,7 +350,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
ww_acquire_init(&op->ticket, &reservation_ww_class); ww_acquire_init(&op->ticket, &reservation_ww_class);
retry: retry:
if (++trycnt > 100000) { if (++trycnt > 100000) {
NV_ERROR(cli, "%s failed and gave up.\n", __func__); NV_PRINTK(error, cli, "%s failed and gave up.\n", __func__);
return -EINVAL; return -EINVAL;
} }
...@@ -361,7 +361,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv, ...@@ -361,7 +361,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
gem = drm_gem_object_lookup(dev, file_priv, b->handle); gem = drm_gem_object_lookup(dev, file_priv, b->handle);
if (!gem) { if (!gem) {
NV_ERROR(cli, "Unknown handle 0x%08x\n", b->handle); NV_PRINTK(error, cli, "Unknown handle 0x%08x\n", b->handle);
ww_acquire_done(&op->ticket); ww_acquire_done(&op->ticket);
validate_fini(op, NULL); validate_fini(op, NULL);
return -ENOENT; return -ENOENT;
...@@ -374,7 +374,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv, ...@@ -374,7 +374,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
} }
if (nvbo->reserved_by && nvbo->reserved_by == file_priv) { if (nvbo->reserved_by && nvbo->reserved_by == file_priv) {
NV_ERROR(cli, "multiple instances of buffer %d on " NV_PRINTK(error, cli, "multiple instances of buffer %d on "
"validation list\n", b->handle); "validation list\n", b->handle);
drm_gem_object_unreference_unlocked(gem); drm_gem_object_unreference_unlocked(gem);
ww_acquire_done(&op->ticket); ww_acquire_done(&op->ticket);
...@@ -396,7 +396,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv, ...@@ -396,7 +396,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
ww_acquire_fini(&op->ticket); ww_acquire_fini(&op->ticket);
drm_gem_object_unreference_unlocked(gem); drm_gem_object_unreference_unlocked(gem);
if (ret != -ERESTARTSYS) if (ret != -ERESTARTSYS)
NV_ERROR(cli, "fail reserve\n"); NV_PRINTK(error, cli, "fail reserve\n");
return ret; return ret;
} }
} }
...@@ -414,7 +414,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv, ...@@ -414,7 +414,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
if (b->valid_domains & NOUVEAU_GEM_DOMAIN_GART) if (b->valid_domains & NOUVEAU_GEM_DOMAIN_GART)
list_add_tail(&nvbo->entry, &op->gart_list); list_add_tail(&nvbo->entry, &op->gart_list);
else { else {
NV_ERROR(cli, "invalid valid domains: 0x%08x\n", NV_PRINTK(error, cli, "invalid valid domains: 0x%08x\n",
b->valid_domains); b->valid_domains);
list_add_tail(&nvbo->entry, &op->both_list); list_add_tail(&nvbo->entry, &op->both_list);
ww_acquire_done(&op->ticket); ww_acquire_done(&op->ticket);
...@@ -465,20 +465,20 @@ validate_list(struct nouveau_channel *chan, struct nouveau_cli *cli, ...@@ -465,20 +465,20 @@ validate_list(struct nouveau_channel *chan, struct nouveau_cli *cli,
b->write_domains, b->write_domains,
b->valid_domains); b->valid_domains);
if (unlikely(ret)) { if (unlikely(ret)) {
NV_ERROR(cli, "fail set_domain\n"); NV_PRINTK(error, cli, "fail set_domain\n");
return ret; return ret;
} }
ret = nouveau_bo_validate(nvbo, true, false); ret = nouveau_bo_validate(nvbo, true, false);
if (unlikely(ret)) { if (unlikely(ret)) {
if (ret != -ERESTARTSYS) if (ret != -ERESTARTSYS)
NV_ERROR(cli, "fail ttm_validate\n"); NV_PRINTK(error, cli, "fail ttm_validate\n");
return ret; return ret;
} }
ret = validate_sync(chan, nvbo); ret = validate_sync(chan, nvbo);
if (unlikely(ret)) { if (unlikely(ret)) {
NV_ERROR(cli, "fail post-validate sync\n"); NV_PRINTK(error, cli, "fail post-validate sync\n");
return ret; return ret;
} }
...@@ -527,14 +527,14 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan, ...@@ -527,14 +527,14 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan,
ret = validate_init(chan, file_priv, pbbo, nr_buffers, op); ret = validate_init(chan, file_priv, pbbo, nr_buffers, op);
if (unlikely(ret)) { if (unlikely(ret)) {
if (ret != -ERESTARTSYS) if (ret != -ERESTARTSYS)
NV_ERROR(cli, "validate_init\n"); NV_PRINTK(error, cli, "validate_init\n");
return ret; return ret;
} }
ret = validate_list(chan, cli, &op->vram_list, pbbo, user_buffers); ret = validate_list(chan, cli, &op->vram_list, pbbo, user_buffers);
if (unlikely(ret < 0)) { if (unlikely(ret < 0)) {
if (ret != -ERESTARTSYS) if (ret != -ERESTARTSYS)
NV_ERROR(cli, "validate vram_list\n"); NV_PRINTK(error, cli, "validate vram_list\n");
validate_fini(op, NULL); validate_fini(op, NULL);
return ret; return ret;
} }
...@@ -543,7 +543,7 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan, ...@@ -543,7 +543,7 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan,
ret = validate_list(chan, cli, &op->gart_list, pbbo, user_buffers); ret = validate_list(chan, cli, &op->gart_list, pbbo, user_buffers);
if (unlikely(ret < 0)) { if (unlikely(ret < 0)) {
if (ret != -ERESTARTSYS) if (ret != -ERESTARTSYS)
NV_ERROR(cli, "validate gart_list\n"); NV_PRINTK(error, cli, "validate gart_list\n");
validate_fini(op, NULL); validate_fini(op, NULL);
return ret; return ret;
} }
...@@ -552,7 +552,7 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan, ...@@ -552,7 +552,7 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan,
ret = validate_list(chan, cli, &op->both_list, pbbo, user_buffers); ret = validate_list(chan, cli, &op->both_list, pbbo, user_buffers);
if (unlikely(ret < 0)) { if (unlikely(ret < 0)) {
if (ret != -ERESTARTSYS) if (ret != -ERESTARTSYS)
NV_ERROR(cli, "validate both_list\n"); NV_PRINTK(error, cli, "validate both_list\n");
validate_fini(op, NULL); validate_fini(op, NULL);
return ret; return ret;
} }
...@@ -613,7 +613,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli, ...@@ -613,7 +613,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
uint32_t data; uint32_t data;
if (unlikely(r->bo_index > req->nr_buffers)) { if (unlikely(r->bo_index > req->nr_buffers)) {
NV_ERROR(cli, "reloc bo index invalid\n"); NV_PRINTK(error, cli, "reloc bo index invalid\n");
ret = -EINVAL; ret = -EINVAL;
break; break;
} }
...@@ -623,7 +623,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli, ...@@ -623,7 +623,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
continue; continue;
if (unlikely(r->reloc_bo_index > req->nr_buffers)) { if (unlikely(r->reloc_bo_index > req->nr_buffers)) {
NV_ERROR(cli, "reloc container bo index invalid\n"); NV_PRINTK(error, cli, "reloc container bo index invalid\n");
ret = -EINVAL; ret = -EINVAL;
break; break;
} }
...@@ -631,7 +631,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli, ...@@ -631,7 +631,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
if (unlikely(r->reloc_bo_offset + 4 > if (unlikely(r->reloc_bo_offset + 4 >
nvbo->bo.mem.num_pages << PAGE_SHIFT)) { nvbo->bo.mem.num_pages << PAGE_SHIFT)) {
NV_ERROR(cli, "reloc outside of bo\n"); NV_PRINTK(error, cli, "reloc outside of bo\n");
ret = -EINVAL; ret = -EINVAL;
break; break;
} }
...@@ -640,7 +640,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli, ...@@ -640,7 +640,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
ret = ttm_bo_kmap(&nvbo->bo, 0, nvbo->bo.mem.num_pages, ret = ttm_bo_kmap(&nvbo->bo, 0, nvbo->bo.mem.num_pages,
&nvbo->kmap); &nvbo->kmap);
if (ret) { if (ret) {
NV_ERROR(cli, "failed kmap for reloc\n"); NV_PRINTK(error, cli, "failed kmap for reloc\n");
break; break;
} }
nvbo->validate_mapped = true; nvbo->validate_mapped = true;
...@@ -665,7 +665,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli, ...@@ -665,7 +665,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
ret = ttm_bo_wait(&nvbo->bo, false, false, false); ret = ttm_bo_wait(&nvbo->bo, false, false, false);
spin_unlock(&nvbo->bo.bdev->fence_lock); spin_unlock(&nvbo->bo.bdev->fence_lock);
if (ret) { if (ret) {
NV_ERROR(cli, "reloc wait_idle failed: %d\n", ret); NV_PRINTK(error, cli, "reloc wait_idle failed: %d\n", ret);
break; break;
} }
...@@ -711,19 +711,19 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data, ...@@ -711,19 +711,19 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
goto out_next; goto out_next;
if (unlikely(req->nr_push > NOUVEAU_GEM_MAX_PUSH)) { if (unlikely(req->nr_push > NOUVEAU_GEM_MAX_PUSH)) {
NV_ERROR(cli, "pushbuf push count exceeds limit: %d max %d\n", NV_PRINTK(error, cli, "pushbuf push count exceeds limit: %d max %d\n",
req->nr_push, NOUVEAU_GEM_MAX_PUSH); req->nr_push, NOUVEAU_GEM_MAX_PUSH);
return nouveau_abi16_put(abi16, -EINVAL); return nouveau_abi16_put(abi16, -EINVAL);
} }
if (unlikely(req->nr_buffers > NOUVEAU_GEM_MAX_BUFFERS)) { if (unlikely(req->nr_buffers > NOUVEAU_GEM_MAX_BUFFERS)) {
NV_ERROR(cli, "pushbuf bo count exceeds limit: %d max %d\n", NV_PRINTK(error, cli, "pushbuf bo count exceeds limit: %d max %d\n",
req->nr_buffers, NOUVEAU_GEM_MAX_BUFFERS); req->nr_buffers, NOUVEAU_GEM_MAX_BUFFERS);
return nouveau_abi16_put(abi16, -EINVAL); return nouveau_abi16_put(abi16, -EINVAL);
} }
if (unlikely(req->nr_relocs > NOUVEAU_GEM_MAX_RELOCS)) { if (unlikely(req->nr_relocs > NOUVEAU_GEM_MAX_RELOCS)) {
NV_ERROR(cli, "pushbuf reloc count exceeds limit: %d max %d\n", NV_PRINTK(error, cli, "pushbuf reloc count exceeds limit: %d max %d\n",
req->nr_relocs, NOUVEAU_GEM_MAX_RELOCS); req->nr_relocs, NOUVEAU_GEM_MAX_RELOCS);
return nouveau_abi16_put(abi16, -EINVAL); return nouveau_abi16_put(abi16, -EINVAL);
} }
...@@ -741,7 +741,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data, ...@@ -741,7 +741,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
/* Ensure all push buffers are on validate list */ /* Ensure all push buffers are on validate list */
for (i = 0; i < req->nr_push; i++) { for (i = 0; i < req->nr_push; i++) {
if (push[i].bo_index >= req->nr_buffers) { if (push[i].bo_index >= req->nr_buffers) {
NV_ERROR(cli, "push %d buffer not in list\n", i); NV_PRINTK(error, cli, "push %d buffer not in list\n", i);
ret = -EINVAL; ret = -EINVAL;
goto out_prevalid; goto out_prevalid;
} }
...@@ -752,7 +752,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data, ...@@ -752,7 +752,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
req->nr_buffers, &op, &do_reloc); req->nr_buffers, &op, &do_reloc);
if (ret) { if (ret) {
if (ret != -ERESTARTSYS) if (ret != -ERESTARTSYS)
NV_ERROR(cli, "validate: %d\n", ret); NV_PRINTK(error, cli, "validate: %d\n", ret);
goto out_prevalid; goto out_prevalid;
} }
...@@ -760,7 +760,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data, ...@@ -760,7 +760,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
if (do_reloc) { if (do_reloc) {
ret = nouveau_gem_pushbuf_reloc_apply(cli, req, bo); ret = nouveau_gem_pushbuf_reloc_apply(cli, req, bo);
if (ret) { if (ret) {
NV_ERROR(cli, "reloc apply: %d\n", ret); NV_PRINTK(error, cli, "reloc apply: %d\n", ret);
goto out; goto out;
} }
} }
...@@ -768,7 +768,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data, ...@@ -768,7 +768,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
if (chan->dma.ib_max) { if (chan->dma.ib_max) {
ret = nouveau_dma_wait(chan, req->nr_push + 1, 16); ret = nouveau_dma_wait(chan, req->nr_push + 1, 16);
if (ret) { if (ret) {
NV_ERROR(cli, "nv50cal_space: %d\n", ret); NV_PRINTK(error, cli, "nv50cal_space: %d\n", ret);
goto out; goto out;
} }
...@@ -783,7 +783,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data, ...@@ -783,7 +783,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
if (nv_device(drm->device)->chipset >= 0x25) { if (nv_device(drm->device)->chipset >= 0x25) {
ret = RING_SPACE(chan, req->nr_push * 2); ret = RING_SPACE(chan, req->nr_push * 2);
if (ret) { if (ret) {
NV_ERROR(cli, "cal_space: %d\n", ret); NV_PRINTK(error, cli, "cal_space: %d\n", ret);
goto out; goto out;
} }
...@@ -797,7 +797,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data, ...@@ -797,7 +797,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
} else { } else {
ret = RING_SPACE(chan, req->nr_push * (2 + NOUVEAU_DMA_SKIPS)); ret = RING_SPACE(chan, req->nr_push * (2 + NOUVEAU_DMA_SKIPS));
if (ret) { if (ret) {
NV_ERROR(cli, "jmp_space: %d\n", ret); NV_PRINTK(error, cli, "jmp_space: %d\n", ret);
goto out; goto out;
} }
...@@ -835,7 +835,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data, ...@@ -835,7 +835,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
ret = nouveau_fence_new(chan, false, &fence); ret = nouveau_fence_new(chan, false, &fence);
if (ret) { if (ret) {
NV_ERROR(cli, "error fencing pushbuf: %d\n", ret); NV_PRINTK(error, cli, "error fencing pushbuf: %d\n", ret);
WIND_RING(chan); WIND_RING(chan);
goto out; goto out;
} }
......
...@@ -284,7 +284,7 @@ evo_wait(void *evoc, int nr) ...@@ -284,7 +284,7 @@ evo_wait(void *evoc, int nr)
nv_wo32(dmac->base.user, 0x0000, 0x00000000); nv_wo32(dmac->base.user, 0x0000, 0x00000000);
if (!nv_wait(dmac->base.user, 0x0004, ~0, 0x00000000)) { if (!nv_wait(dmac->base.user, 0x0004, ~0, 0x00000000)) {
mutex_unlock(&dmac->lock); mutex_unlock(&dmac->lock);
NV_ERROR(dmac->base.user, "channel stalled\n"); nv_error(dmac->base.user, "channel stalled\n");
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment