Commit 9ad97ede authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau: use dev_* for logging



Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 9e3911e5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -217,7 +217,7 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)
		getparam->value = gr->units ? gr->units(gr) : 0;
		break;
	default:
		NV_PRINTK(debug, cli, "unknown parameter %lld\n", getparam->param);
		NV_PRINTK(dbg, cli, "unknown parameter %lld\n", getparam->param);
		return -EINVAL;
	}

+4 −3
Original line number Diff line number Diff line
@@ -1891,11 +1891,12 @@ parse_dcb_table(struct drm_device *dev, struct nvbios *bios)
	idx = -1;
	while ((conn = olddcb_conn(dev, ++idx))) {
		if (conn[0] != 0xff) {
			NV_INFO(drm, "DCB conn %02d: ", idx);
			if (olddcb_conntab(dev)[3] < 4)
				pr_cont("%04x\n", ROM16(conn[0]));
				NV_INFO(drm, "DCB conn %02d: %04x\n",
					idx, ROM16(conn[0]));
			else
				pr_cont("%08x\n", ROM32(conn[0]));
				NV_INFO(drm, "DCB conn %02d: %08x\n",
					idx, ROM32(conn[0]));
		}
	}
	dcb_fake_connectors(bios);
+4 −4
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ nouveau_channel_idle(struct nouveau_channel *chan)
	}

	if (ret)
		NV_PRINTK(error, cli, "failed to idle channel 0x%08x [%s]\n",
		NV_PRINTK(err, cli, "failed to idle channel 0x%08x [%s]\n",
			  chan->object->handle, nvxx_client(&cli->base)->name);
	return ret;
}
@@ -405,17 +405,17 @@ nouveau_channel_new(struct nouveau_drm *drm, struct nvif_device *device,

	ret = nouveau_channel_ind(drm, device, handle, arg0, pchan);
	if (ret) {
		NV_PRINTK(debug, cli, "ib channel create, %d\n", ret);
		NV_PRINTK(dbg, cli, "ib channel create, %d\n", ret);
		ret = nouveau_channel_dma(drm, device, handle, pchan);
		if (ret) {
			NV_PRINTK(debug, cli, "dma channel create, %d\n", ret);
			NV_PRINTK(dbg, cli, "dma channel create, %d\n", ret);
			goto done;
		}
	}

	ret = nouveau_channel_init(*pchan, arg0, arg1);
	if (ret) {
		NV_PRINTK(error, cli, "channel failed to initialise, %d\n", ret);
		NV_PRINTK(err, cli, "channel failed to initialise, %d\n", ret);
		nouveau_channel_del(pchan);
	}

+10 −8
Original line number Diff line number Diff line
@@ -105,12 +105,16 @@ nouveau_name(struct drm_device *dev)
}

static int
nouveau_cli_create(u64 name, const char *sname,
nouveau_cli_create(struct drm_device *dev, const char *sname,
		   int size, void **pcli)
{
	struct nouveau_cli *cli = *pcli = kzalloc(size, GFP_KERNEL);
	int ret;
	if (cli) {
		int ret = nvif_client_init(NULL, NULL, sname, name,
		snprintf(cli->name, sizeof(cli->name), "%s", sname);
		cli->dev = dev;

		ret = nvif_client_init(NULL, NULL, cli->name, nouveau_name(dev),
				       nouveau_config, nouveau_debug,
				       &cli->base);
		if (ret == 0) {
@@ -375,8 +379,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags)
	struct nouveau_drm *drm;
	int ret;

	ret = nouveau_cli_create(nouveau_name(dev), "DRM", sizeof(*drm),
				 (void **)&drm);
	ret = nouveau_cli_create(dev, "DRM", sizeof(*drm), (void **)&drm);
	if (ret)
		return ret;

@@ -826,8 +829,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)
	get_task_comm(tmpname, current);
	snprintf(name, sizeof(name), "%s[%d]", tmpname, pid_nr(fpriv->pid));

	ret = nouveau_cli_create(nouveau_name(dev), name, sizeof(*cli),
			(void **)&cli);
	ret = nouveau_cli_create(dev, name, sizeof(*cli), (void **)&cli);

	if (ret)
		goto out_suspend;
+9 −4
Original line number Diff line number Diff line
@@ -88,6 +88,8 @@ struct nouveau_cli {
	void *abi16;
	struct list_head objects;
	struct list_head notifys;
	char name[32];
	struct drm_device *dev;
};

static inline struct nouveau_cli *
@@ -189,13 +191,16 @@ void nouveau_drm_device_remove(struct drm_device *dev);

#define NV_PRINTK(l,c,f,a...) do {                                             \
	struct nouveau_cli *_cli = (c);                                        \
	nv_##l(_cli->base.base.priv, f, ##a);                                  \
	dev_##l(_cli->dev->dev, "%s: "f, _cli->name, ##a);                     \
} while(0)
#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_FATAL(drm,f,a...) NV_PRINTK(crit, &(drm)->client, f, ##a)
#define NV_ERROR(drm,f,a...) NV_PRINTK(err, &(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)
#define NV_DEBUG(drm,f,a...) do {                                              \
	if (unlikely(drm_debug & DRM_UT_DRIVER))                               \
		NV_PRINTK(info, &(drm)->client, f, ##a);                       \
} while(0)

extern int nouveau_modeset;

Loading