44 static int nouveau_vram_pushbuf;
79 nouveau_bo_ref(
NULL, &chan->
push.buffer);
101 chan = *pchan = kzalloc(
sizeof(*chan),
GFP_KERNEL);
111 if (nouveau_vram_pushbuf)
131 chan->
push.vma.offset = chan->
push.buffer->bo.offset;
144 args.
limit = client->
vm->vmm->limit - 1;
166 chan->
drm->agp.size - 1;
175 chan->
push.handle, 0x0002,
176 &args,
sizeof(args), &push);
201 ret = nouveau_channel_prep(drm, cli, parent, handle, 0x12000, &chan);
207 args.pushbuf = chan->
push.handle;
208 args.ioffset = 0x10000 + chan->
push.vma.offset;
209 args.ilength = 0x02000;
210 args.engine = engine;
214 *oclass++, &args,
sizeof(args),
233 const u16 *oclass = oclasses;
239 ret = nouveau_channel_prep(drm, cli, parent, handle, 0x10000, &chan);
245 args.pushbuf = chan->
push.handle;
246 args.offset = chan->
push.vma.offset;
250 *oclass++, &args,
sizeof(args),
254 }
while (ret && *oclass);
278 args.
limit = client->
vm->vmm->limit - 1;
286 0x003d, &args,
sizeof(args), &
object);
293 args.
limit = client->
vm->vmm->limit - 1;
299 chan->
drm->agp.size - 1;
307 0x003d, &args,
sizeof(args), &
object);
321 chan->
dma.max = (0x10000 / 4) - 2;
327 chan->
dma.ib_base = 0x10000 / 4;
328 chan->
dma.ib_max = (0x02000 / 8) - 1;
329 chan->
dma.ib_put = 0;
330 chan->
dma.ib_free = chan->
dma.ib_max - chan->
dma.ib_put;
331 chan->
dma.max = chan->
dma.ib_base;
336 chan->
dma.cur = chan->
dma.put;
337 chan->
dma.free = chan->
dma.max - chan->
dma.cur;
349 if (chan != chan->
drm->cechan) {
356 swch = (
void *)object->
parent;
362 ret = RING_SPACE(chan, 2);
366 BEGIN_NV04(chan,
NvSubSw, 0x0000, 1);
382 ret = nouveau_channel_ind(drm, cli, parent, handle, arg0, pchan);
384 NV_DEBUG(cli,
"ib channel create, %d\n", ret);
385 ret = nouveau_channel_dma(drm, cli, parent, handle, pchan);
387 NV_DEBUG(cli,
"dma channel create, %d\n", ret);
392 ret = nouveau_channel_init(*pchan, arg0, arg1);
394 NV_ERROR(cli,
"channel failed to initialise, %d\n", ret);