Commit 353108a4 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/mmu: index engref by subdev type

None of the chipsets we use this on have instanced engines, so this is fine.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
parent 6dd123ba
......@@ -118,7 +118,7 @@ nvkm_fifo_chan_child_del(struct nvkm_oproxy *base)
chan->func->engine_dtor(chan, engine);
nvkm_object_del(&engn->object);
if (chan->vmm)
atomic_dec(&chan->vmm->engref[engine->subdev.index]);
atomic_dec(&chan->vmm->engref[engine->subdev.type]);
}
}
......@@ -152,7 +152,7 @@ nvkm_fifo_chan_child_new(const struct nvkm_oclass *oclass, void *data, u32 size,
};
if (chan->vmm)
atomic_inc(&chan->vmm->engref[engine->subdev.index]);
atomic_inc(&chan->vmm->engref[engine->subdev.type]);
if (engine->func->fifo.cclass) {
ret = engine->func->fifo.cclass(chan, &cclass,
......
......@@ -207,7 +207,7 @@ nv50_vmm_flush(struct nvkm_vmm *vmm, int level)
case NVKM_ENGINE_MSVLD : id = 0x09; break;
case NVKM_ENGINE_CIPHER:
case NVKM_ENGINE_SEC : id = 0x0a; break;
case NVKM_ENGINE_CE0 : id = 0x0d; break;
case NVKM_ENGINE_CE : id = 0x0d; break;
default:
continue;
}
......
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