struct nouveau_pushbuf *pushbuf;
+ struct nouveau_grobj *nullobj;
struct nouveau_grobj *vram;
struct nouveau_grobj *gart;
return ret;
}
+ ret = nouveau_grobj_alloc(&nvchan->base, 0x00000000, 0x0030,
+ &nvchan->base.nullobj);
+ if (ret) {
+ nouveau_channel_free((void *)&nvchan);
+ return ret;
+ }
+
nouveau_dma_channel_init(&nvchan->base);
nouveau_pushbuf_init(&nvchan->base);
nouveau_grobj_free(&nvchan->base.vram);
nouveau_grobj_free(&nvchan->base.gart);
+ nouveau_grobj_free(&nvchan->base.nullobj);
cf.channel = nvchan->drm.channel;
drmCommandWrite(nvdev->fd, DRM_NOUVEAU_CHANNEL_FREE, &cf, sizeof(cf));
static void
nouveau_channel_context_destroy(struct nouveau_channel_context *nvc)
{
- nouveau_grobj_free(&nvc->NvNull);
nouveau_grobj_free(&nvc->NvCtxSurf2D);
nouveau_grobj_free(&nvc->NvImageBlit);
nouveau_grobj_free(&nvc->NvGdiRect);
return NULL;
}
- if ((ret = nouveau_grobj_alloc(nvc->channel, 0x00000000, 0x30,
- &nvc->NvNull))) {
- NOUVEAU_ERR("Error creating NULL object: %d\n", ret);
- nouveau_channel_context_destroy(nvc);
- return NULL;
- }
nvc->next_handle = 0x80000000;
if ((ret = nouveau_notifier_alloc(nvc->channel, nvc->next_handle++, 1,
struct nouveau_notifier *sync_notifier;
/* Common */
- struct nouveau_grobj *NvNull;
struct nouveau_grobj *NvM2MF;
/* NV04-NV40 */
struct nouveau_grobj *NvCtxSurf2D;
ret = drmCommandWrite(nvdev->fd, DRM_NOUVEAU_GROBJ_ALLOC,
&g, sizeof(g));
if (ret) {
- nouveau_grobj_free((void *)&grobj);
+ nouveau_grobj_free((void *)&nvgrobj);
return ret;
}