示例#1
0
文件: nv10.c 项目: 168519/linux
static int
nv10_fifo_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
	       struct nvkm_oclass *oclass, void *data, u32 size,
	       struct nvkm_object **pobject)
{
	struct nv04_instmem_priv *imem = nv04_instmem(parent);
	struct nv04_fifo_priv *priv;
	int ret;

	ret = nvkm_fifo_create(parent, engine, oclass, 0, 31, &priv);
	*pobject = nv_object(priv);
	if (ret)
		return ret;

	nvkm_ramht_ref(imem->ramht, &priv->ramht);
	nvkm_gpuobj_ref(imem->ramro, &priv->ramro);
	nvkm_gpuobj_ref(imem->ramfc, &priv->ramfc);

	nv_subdev(priv)->unit = 0x00000100;
	nv_subdev(priv)->intr = nv04_fifo_intr;
	nv_engine(priv)->cclass = &nv10_fifo_cclass;
	nv_engine(priv)->sclass = nv10_fifo_sclass;
	priv->base.pause = nv04_fifo_pause;
	priv->base.start = nv04_fifo_start;
	priv->ramfc_desc = nv10_ramfc;
	return 0;
}
示例#2
0
static void
nouveau_accel_fini(struct nouveau_drm *drm)
{
    nouveau_channel_del(&drm->channel);
    nvif_object_fini(&drm->ntfy);
    nvkm_gpuobj_ref(NULL, &drm->notify);
    nvif_object_fini(&drm->nvsw);
    nouveau_channel_del(&drm->cechan);
    nvif_object_fini(&drm->ttm.copy);
    if (drm->fence)
        nouveau_fence(drm)->dtor(drm);
}