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

drm/nouveau/nvif: give every object a human-readable identifier



Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
parent 6db25fb1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -92,8 +92,8 @@ int corec37d_caps_init(struct nouveau_drm *drm, struct nv50_disp *disp)
{
	int ret;

	ret = nvif_object_init(&disp->disp->object, 0, GV100_DISP_CAPS,
			       NULL, 0, &disp->caps);
	ret = nvif_object_ctor(&disp->disp->object, "dispCaps", 0,
			       GV100_DISP_CAPS, NULL, 0, &disp->caps);
	if (ret) {
		NV_ERROR(drm,
			 "Failed to init notifier caps region: %d\n",
+2 −2
Original line number Diff line number Diff line
@@ -514,7 +514,7 @@ nv50_crc_ctx_init(struct nv50_head *head, struct nvif_mmu *mmu,
	if (ret)
		return ret;

	ret = nvif_object_init(&core->chan.base.user,
	ret = nvif_object_ctor(&core->chan.base.user, "kmsCrcNtfyCtxDma",
			       NV50_DISP_HANDLE_CRC_CTX(head, idx),
			       NV_DMA_IN_MEMORY,
			       &(struct nv_dma_v0) {
@@ -538,7 +538,7 @@ fail_fini:
static inline void
nv50_crc_ctx_fini(struct nv50_crc_notifier_ctx *ctx)
{
	nvif_object_fini(&ctx->ntfy);
	nvif_object_dtor(&ctx->ntfy);
	nvif_mem_fini(&ctx->mem);
}

+2 −2
Original line number Diff line number Diff line
@@ -138,8 +138,8 @@ curs507a_new_(const struct nv50_wimm_func *func, struct nouveau_drm *drm,
	if (*pwndw = wndw, ret)
		return ret;

	ret = nvif_object_init(&disp->disp->object, 0, oclass, &args,
			       sizeof(args), &wndw->wimm.base.user);
	ret = nvif_object_ctor(&disp->disp->object, "kmsCurs", 0, oclass,
			       &args, sizeof(args), &wndw->wimm.base.user);
	if (ret) {
		NV_ERROR(drm, "curs%04x allocation failed: %d\n", oclass, ret);
		return ret;
+9 −8
Original line number Diff line number Diff line
@@ -79,8 +79,9 @@ nv50_chan_create(struct nvif_device *device, struct nvif_object *disp,
	while (oclass[0]) {
		for (i = 0; i < n; i++) {
			if (sclass[i].oclass == oclass[0]) {
				ret = nvif_object_init(disp, 0, oclass[0],
						       data, size, &chan->user);
				ret = nvif_object_ctor(disp, "kmsChan", 0,
						       oclass[0], data, size,
						       &chan->user);
				if (ret == 0)
					nvif_object_map(&chan->user, NULL, 0);
				nvif_object_sclass_put(&sclass);
@@ -97,7 +98,7 @@ nv50_chan_create(struct nvif_device *device, struct nvif_object *disp,
static void
nv50_chan_destroy(struct nv50_chan *chan)
{
	nvif_object_fini(&chan->user);
	nvif_object_dtor(&chan->user);
}

/******************************************************************************
@@ -107,8 +108,8 @@ nv50_chan_destroy(struct nv50_chan *chan)
void
nv50_dmac_destroy(struct nv50_dmac *dmac)
{
	nvif_object_fini(&dmac->vram);
	nvif_object_fini(&dmac->sync);
	nvif_object_dtor(&dmac->vram);
	nvif_object_dtor(&dmac->sync);

	nv50_chan_destroy(&dmac->base);

@@ -155,7 +156,7 @@ nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,
	if (!syncbuf)
		return 0;

	ret = nvif_object_init(&dmac->base.user, NV50_DISP_HANDLE_SYNCBUF,
	ret = nvif_object_ctor(&dmac->base.user, "kmsSyncCtxDma", NV50_DISP_HANDLE_SYNCBUF,
			       NV_DMA_IN_MEMORY,
			       &(struct nv_dma_v0) {
					.target = NV_DMA_V0_TARGET_VRAM,
@@ -167,7 +168,7 @@ nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,
	if (ret)
		return ret;

	ret = nvif_object_init(&dmac->base.user, NV50_DISP_HANDLE_VRAM,
	ret = nvif_object_ctor(&dmac->base.user, "kmsVramCtxDma", NV50_DISP_HANDLE_VRAM,
			       NV_DMA_IN_MEMORY,
			       &(struct nv_dma_v0) {
					.target = NV_DMA_V0_TARGET_VRAM,
@@ -2465,7 +2466,7 @@ nv50_display_destroy(struct drm_device *dev)
	nv50_audio_component_fini(nouveau_drm(dev));

	nvif_object_unmap(&disp->caps);
	nvif_object_fini(&disp->caps);
	nvif_object_dtor(&disp->caps);
	nv50_core_del(&disp->core);

	nouveau_bo_unmap(disp->sync);
+2 −2
Original line number Diff line number Diff line
@@ -33,8 +33,8 @@ oimm507b_init_(const struct nv50_wimm_func *func, struct nouveau_drm *drm,
	struct nv50_disp *disp = nv50_disp(drm->dev);
	int ret;

	ret = nvif_object_init(&disp->disp->object, 0, oclass, &args,
			       sizeof(args), &wndw->wimm.base.user);
	ret = nvif_object_ctor(&disp->disp->object, "kmsOvim", 0, oclass,
			       &args, sizeof(args), &wndw->wimm.base.user);
	if (ret) {
		NV_ERROR(drm, "oimm%04x allocation failed: %d\n", oclass, ret);
		return ret;
Loading