21 nv20_graph_sclass[] = {
56 *pobject = nv_object(chan);
62 nv_wo32(chan, 0x0000, 0x00000001 | (chan->
chid << 24));
63 nv_wo32(chan, 0x033c, 0xffff0000);
64 nv_wo32(chan, 0x03a0, 0x0fff0000);
65 nv_wo32(chan, 0x03a4, 0x0fff0000);
66 nv_wo32(chan, 0x047c, 0x00000101);
67 nv_wo32(chan, 0x0490, 0x00000111);
68 nv_wo32(chan, 0x04a8, 0x44400000);
69 for (i = 0x04d4; i <= 0x04e0; i += 4)
70 nv_wo32(chan, i, 0x00030303);
71 for (i = 0x04f4; i <= 0x0500; i += 4)
72 nv_wo32(chan, i, 0x00080000);
73 for (i = 0x050c; i <= 0x0518; i += 4)
74 nv_wo32(chan, i, 0x01012000);
75 for (i = 0x051c; i <= 0x0528; i += 4)
76 nv_wo32(chan, i, 0x000105b8);
77 for (i = 0x052c; i <= 0x0538; i += 4)
78 nv_wo32(chan, i, 0x00080008);
79 for (i = 0x055c; i <= 0x0598; i += 4)
80 nv_wo32(chan, i, 0x07ff0000);
81 nv_wo32(chan, 0x05a4, 0x4b7fffff);
82 nv_wo32(chan, 0x05fc, 0x00000001);
83 nv_wo32(chan, 0x0604, 0x00004000);
84 nv_wo32(chan, 0x0610, 0x00000001);
85 nv_wo32(chan, 0x0618, 0x00040000);
86 nv_wo32(chan, 0x061c, 0x00010000);
87 for (i = 0x1c1c; i <= 0x248c; i += 16) {
88 nv_wo32(chan, (i + 0), 0x10700ff9);
89 nv_wo32(chan, (i + 4), 0x0436086c);
90 nv_wo32(chan, (i + 8), 0x000c001b);
92 nv_wo32(chan, 0x281c, 0x3f800000);
93 nv_wo32(chan, 0x2830, 0x3f800000);
94 nv_wo32(chan, 0x285c, 0x40000000);
95 nv_wo32(chan, 0x2860, 0x3f800000);
96 nv_wo32(chan, 0x2864, 0x3f000000);
97 nv_wo32(chan, 0x286c, 0x40000000);
98 nv_wo32(chan, 0x2870, 0x3f800000);
99 nv_wo32(chan, 0x2878, 0xbf800000);
100 nv_wo32(chan, 0x2880, 0xbf800000);
101 nv_wo32(chan, 0x34a4, 0x000fe000);
102 nv_wo32(chan, 0x3530, 0x000003f8);
103 nv_wo32(chan, 0x3540, 0x002fe000);
104 for (i = 0x355c; i <= 0x3578; i += 4)
105 nv_wo32(chan, i, 0x001c527c);
120 nv_wo32(priv->
ctxtab, chan->
chid * 4, nv_gpuobj(chan)->
addr >> 4);
131 nv_mask(priv, 0x400720, 0x00000001, 0x00000000);
132 if (nv_rd32(priv, 0x400144) & 0x00010000)
133 chid = (nv_rd32(priv, 0x400148) & 0x1f000000) >> 24;
134 if (chan->
chid == chid) {
135 nv_wr32(priv, 0x400784, nv_gpuobj(chan)->
addr >> 4);
136 nv_wr32(priv, 0x400788, 0x00000002);
137 nv_wait(priv, 0x400700, 0xffffffff, 0x00000000);
138 nv_wr32(priv, 0x400144, 0x10000000);
139 nv_mask(priv, 0x400148, 0xff000000, 0x1f000000);
141 nv_mask(priv, 0x400720, 0x00000001, 0x00000001);
143 nv_wo32(priv->
ctxtab, chan->
chid * 4, 0x00000000);
148 nv20_graph_cclass = {
151 .ctor = nv20_graph_context_ctor,
172 pfifo->
pause(pfifo, &flags);
186 if (nv_device(engine)->
card_type == NV_20) {
192 pfifo->
start(pfifo, &flags);
206 u32 chid = (addr & 0x01f00000) >> 20;
207 u32 subc = (addr & 0x00070000) >> 16;
208 u32 mthd = (addr & 0x00001ffc);
210 u32 class = nv_rd32(priv, 0x400160 + subc * 4) & 0xfff;
217 if (handle && !nv_call(handle->
object, mthd, data))
218 show &= ~NV_PGRAPH_INTR_ERROR;
234 nv_info(priv,
"ch %d/%d class 0x%04x mthd 0x%04x data 0x%08x\n",
235 chid, subc,
class, mthd, data);
250 *pobject = nv_object(priv);
259 nv_subdev(priv)->unit = 0x00001000;
261 nv_engine(priv)->cclass = &nv20_graph_cclass;
262 nv_engine(priv)->sclass = nv20_graph_sclass;
290 if (nv_device(priv)->
chipset == 0x20) {
292 for (i = 0; i < 15; i++)
294 nv_wait(priv, 0x400700, 0xffffffff, 0x00000000);
297 for (i = 0; i < 32; i++)
299 nv_wait(priv, 0x400700, 0xffffffff, 0x00000000);
310 nv_wr32(priv, 0x40009C , 0x00000040);
312 if (nv_device(priv)->
chipset >= 0x25) {
313 nv_wr32(priv, 0x400890, 0x00a8cfff);
314 nv_wr32(priv, 0x400610, 0x304B1FB6);
315 nv_wr32(priv, 0x400B80, 0x1cbd3883);
316 nv_wr32(priv, 0x400B84, 0x44000000);
317 nv_wr32(priv, 0x400098, 0x40000080);
318 nv_wr32(priv, 0x400B88, 0x000000ff);
321 nv_wr32(priv, 0x400880, 0x0008c7df);
322 nv_wr32(priv, 0x400094, 0x00000005);
323 nv_wr32(priv, 0x400B80, 0x45eae20e);
324 nv_wr32(priv, 0x400B84, 0x24000000);
325 nv_wr32(priv, 0x400098, 0x00000040);
333 for (i = 0; i < pfb->
tile.regions; i++)
336 nv_wr32(priv, 0x4009a0, nv_rd32(priv, 0x100324));
350 nv_wr32(priv, 0x4009A4, nv_rd32(priv, 0x100200));
351 nv_wr32(priv, 0x4009A8, nv_rd32(priv, 0x100204));
356 nv_wr32(priv, 0x400820, 0);
357 nv_wr32(priv, 0x400824, 0);
358 nv_wr32(priv, 0x400864, vramsz - 1);
359 nv_wr32(priv, 0x400868, vramsz - 1);
362 nv_wr32(priv, 0x400B20, 0x00000000);
363 nv_wr32(priv, 0x400B04, 0xFFFFFFFF);
376 .ctor = nv20_graph_ctor,