47 { 2, 28, 0x18, 28, 0x002058 },
57 { 32, 0, 0x40, 0, 0x0032e4 },
58 { 32, 0, 0x44, 0, 0x0032e8 },
59 { 32, 0, 0x4c, 0, 0x002088 },
60 { 32, 0, 0x50, 0, 0x003300 },
61 { 32, 0, 0x54, 0, 0x00330c },
79 context = nv_gpuobj(
object)->addr >> 4;
83 switch (nv_engidx(object->
engine)) {
86 context |= 0x00000000;
89 context |= 0x00100000;
92 context |= 0x00200000;
98 context |= chid << 23;
115 switch (nv_engidx(engctx->
engine)) {
131 nv_engctx(engctx)->addr = nv_gpuobj(engctx)->addr >> 4;
132 nv_mask(priv, 0x002500, 0x00000001, 0x00000000);
134 if ((nv_rd32(priv, 0x003204) & priv->
base.max) ==
chan->base.chid)
135 nv_wr32(priv, reg, nv_engctx(engctx)->
addr);
136 nv_wo32(priv->
ramfc,
chan->ramfc + ctx, nv_engctx(engctx)->
addr);
138 nv_mask(priv, 0x002500, 0x00000001, 0x00000001);
139 spin_unlock_irqrestore(&priv->
base.lock, flags);
152 switch (nv_engidx(engctx->
engine)) {
168 nv_mask(priv, 0x002500, 0x00000001, 0x00000000);
170 if ((nv_rd32(priv, 0x003204) & priv->
base.max) ==
chan->base.chid)
171 nv_wr32(priv, reg, 0x00000000);
172 nv_wo32(priv->
ramfc,
chan->ramfc + ctx, 0x00000000);
174 nv_mask(priv, 0x002500, 0x00000001, 0x00000001);
175 spin_unlock_irqrestore(&priv->
base.lock, flags);
190 if (size <
sizeof(*args))
199 *pobject = nv_object(chan);
203 nv_parent(chan)->context_attach = nv40_fifo_context_attach;
204 nv_parent(chan)->context_detach = nv40_fifo_context_detach;
205 nv_parent(chan)->object_attach = nv40_fifo_object_attach;
211 nv_wo32(priv->
ramfc, chan->
ramfc + 0x0c, chan->
base.pushgpu->addr >> 4);
212 nv_wo32(priv->
ramfc, chan->
ramfc + 0x18, 0x30000000 |
219 nv_wo32(priv->
ramfc, chan->
ramfc + 0x3c, 0x0001ffff);
225 .ctor = nv40_fifo_chan_ctor,
234 nv40_fifo_sclass[] = {
270 *pobject = nv_object(priv);
275 nouveau_gpuobj_ref(imem->
ramro, &priv->
ramro);
276 nouveau_gpuobj_ref(imem->
ramfc, &priv->
ramfc);
278 nv_subdev(priv)->unit = 0x00000100;
280 nv_engine(priv)->cclass = &nv40_fifo_cclass;
281 nv_engine(priv)->sclass = nv40_fifo_sclass;
299 nv_wr32(priv, 0x002040, 0x000000ff);
300 nv_wr32(priv, 0x002044, 0x2101ffff);
301 nv_wr32(priv, 0x002058, 0x00000001);
304 ((priv->
ramht->bits - 9) << 16) |
305 (priv->
ramht->base.addr >> 8));
308 switch (nv_device(priv)->
chipset) {
312 nv_wr32(priv, 0x002230, 0x00000001);
319 nv_wr32(priv, 0x002220, 0x00030002);
322 nv_wr32(priv, 0x002230, 0x00000000);
323 nv_wr32(priv, 0x002220, ((pfb->
ram.size - 512 * 1024 +
324 priv->
ramfc->addr) >> 16) |
344 .ctor = nv40_fifo_ctor,
346 .init = nv40_fifo_init,