2 * Copyright 2012 Red Hat Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
25 #include <core/client.h>
26 #include <nvif/unpack.h>
27 #include <nvif/class.h>
28 #include <core/engctx.h>
29 #include <core/namedb.h>
30 #include <core/handle.h>
31 #include <core/ramht.h>
32 #include <core/event.h>
34 #include <subdev/instmem.h>
35 #include <subdev/instmem/nv04.h>
36 #include <subdev/timer.h>
37 #include <subdev/fb.h>
39 #include <engine/fifo.h>
43 static struct ramfc_desc
45 { 32, 0, 0x00, 0, NV04_PFIFO_CACHE1_DMA_PUT },
46 { 32, 0, 0x04, 0, NV04_PFIFO_CACHE1_DMA_GET },
47 { 16, 0, 0x08, 0, NV04_PFIFO_CACHE1_DMA_INSTANCE },
48 { 16, 16, 0x08, 0, NV04_PFIFO_CACHE1_DMA_DCOUNT },
49 { 32, 0, 0x0c, 0, NV04_PFIFO_CACHE1_DMA_STATE },
50 { 32, 0, 0x10, 0, NV04_PFIFO_CACHE1_DMA_FETCH },
51 { 32, 0, 0x14, 0, NV04_PFIFO_CACHE1_ENGINE },
52 { 32, 0, 0x18, 0, NV04_PFIFO_CACHE1_PULL1 },
56 /*******************************************************************************
57 * FIFO channel objects
58 ******************************************************************************/
61 nv04_fifo_object_attach(struct nouveau_object *parent,
62 struct nouveau_object *object, u32 handle)
64 struct nv04_fifo_priv *priv = (void *)parent->engine;
65 struct nv04_fifo_chan *chan = (void *)parent;
66 u32 context, chid = chan->base.chid;
69 if (nv_iclass(object, NV_GPUOBJ_CLASS))
70 context = nv_gpuobj(object)->addr >> 4;
72 context = 0x00000004; /* just non-zero */
74 switch (nv_engidx(object->engine)) {
75 case NVDEV_ENGINE_DMAOBJ:
77 context |= 0x00000000;
80 context |= 0x00010000;
82 case NVDEV_ENGINE_MPEG:
83 context |= 0x00020000;
89 context |= 0x80000000; /* valid */
90 context |= chid << 24;
92 mutex_lock(&nv_subdev(priv)->mutex);
93 ret = nouveau_ramht_insert(priv->ramht, chid, handle, context);
94 mutex_unlock(&nv_subdev(priv)->mutex);
99 nv04_fifo_object_detach(struct nouveau_object *parent, int cookie)
101 struct nv04_fifo_priv *priv = (void *)parent->engine;
102 mutex_lock(&nv_subdev(priv)->mutex);
103 nouveau_ramht_remove(priv->ramht, cookie);
104 mutex_unlock(&nv_subdev(priv)->mutex);
108 nv04_fifo_context_attach(struct nouveau_object *parent,
109 struct nouveau_object *object)
111 nv_engctx(object)->addr = nouveau_fifo_chan(parent)->chid;
116 nv04_fifo_chan_ctor(struct nouveau_object *parent,
117 struct nouveau_object *engine,
118 struct nouveau_oclass *oclass, void *data, u32 size,
119 struct nouveau_object **pobject)
122 struct nv03_channel_dma_v0 v0;
124 struct nv04_fifo_priv *priv = (void *)engine;
125 struct nv04_fifo_chan *chan;
128 nv_ioctl(parent, "create channel dma size %d\n", size);
129 if (nvif_unpack(args->v0, 0, 0, false)) {
130 nv_ioctl(parent, "create channel dma vers %d pushbuf %08x "
131 "offset %016llx\n", args->v0.version,
132 args->v0.pushbuf, args->v0.offset);
136 ret = nouveau_fifo_channel_create(parent, engine, oclass, 0, 0x800000,
137 0x10000, args->v0.pushbuf,
138 (1ULL << NVDEV_ENGINE_DMAOBJ) |
139 (1ULL << NVDEV_ENGINE_SW) |
140 (1ULL << NVDEV_ENGINE_GR), &chan);
141 *pobject = nv_object(chan);
145 args->v0.chid = chan->base.chid;
147 nv_parent(chan)->object_attach = nv04_fifo_object_attach;
148 nv_parent(chan)->object_detach = nv04_fifo_object_detach;
149 nv_parent(chan)->context_attach = nv04_fifo_context_attach;
150 chan->ramfc = chan->base.chid * 32;
152 nv_wo32(priv->ramfc, chan->ramfc + 0x00, args->v0.offset);
153 nv_wo32(priv->ramfc, chan->ramfc + 0x04, args->v0.offset);
154 nv_wo32(priv->ramfc, chan->ramfc + 0x08, chan->base.pushgpu->addr >> 4);
155 nv_wo32(priv->ramfc, chan->ramfc + 0x10,
156 NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES |
157 NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES |
159 NV_PFIFO_CACHE1_BIG_ENDIAN |
161 NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8);
166 nv04_fifo_chan_dtor(struct nouveau_object *object)
168 struct nv04_fifo_priv *priv = (void *)object->engine;
169 struct nv04_fifo_chan *chan = (void *)object;
170 struct ramfc_desc *c = priv->ramfc_desc;
173 nv_wo32(priv->ramfc, chan->ramfc + c->ctxp, 0x00000000);
174 } while ((++c)->bits);
176 nouveau_fifo_channel_destroy(&chan->base);
180 nv04_fifo_chan_init(struct nouveau_object *object)
182 struct nv04_fifo_priv *priv = (void *)object->engine;
183 struct nv04_fifo_chan *chan = (void *)object;
184 u32 mask = 1 << chan->base.chid;
188 ret = nouveau_fifo_channel_init(&chan->base);
192 spin_lock_irqsave(&priv->base.lock, flags);
193 nv_mask(priv, NV04_PFIFO_MODE, mask, mask);
194 spin_unlock_irqrestore(&priv->base.lock, flags);
199 nv04_fifo_chan_fini(struct nouveau_object *object, bool suspend)
201 struct nv04_fifo_priv *priv = (void *)object->engine;
202 struct nv04_fifo_chan *chan = (void *)object;
203 struct nouveau_gpuobj *fctx = priv->ramfc;
204 struct ramfc_desc *c;
206 u32 data = chan->ramfc;
209 /* prevent fifo context switches */
210 spin_lock_irqsave(&priv->base.lock, flags);
211 nv_wr32(priv, NV03_PFIFO_CACHES, 0);
213 /* if this channel is active, replace it with a null context */
214 chid = nv_rd32(priv, NV03_PFIFO_CACHE1_PUSH1) & priv->base.max;
215 if (chid == chan->base.chid) {
216 nv_mask(priv, NV04_PFIFO_CACHE1_DMA_PUSH, 0x00000001, 0);
217 nv_wr32(priv, NV03_PFIFO_CACHE1_PUSH0, 0);
218 nv_mask(priv, NV04_PFIFO_CACHE1_PULL0, 0x00000001, 0);
220 c = priv->ramfc_desc;
222 u32 rm = ((1ULL << c->bits) - 1) << c->regs;
223 u32 cm = ((1ULL << c->bits) - 1) << c->ctxs;
224 u32 rv = (nv_rd32(priv, c->regp) & rm) >> c->regs;
225 u32 cv = (nv_ro32(fctx, c->ctxp + data) & ~cm);
226 nv_wo32(fctx, c->ctxp + data, cv | (rv << c->ctxs));
227 } while ((++c)->bits);
229 c = priv->ramfc_desc;
231 nv_wr32(priv, c->regp, 0x00000000);
232 } while ((++c)->bits);
234 nv_wr32(priv, NV03_PFIFO_CACHE1_GET, 0);
235 nv_wr32(priv, NV03_PFIFO_CACHE1_PUT, 0);
236 nv_wr32(priv, NV03_PFIFO_CACHE1_PUSH1, priv->base.max);
237 nv_wr32(priv, NV03_PFIFO_CACHE1_PUSH0, 1);
238 nv_wr32(priv, NV04_PFIFO_CACHE1_PULL0, 1);
241 /* restore normal operation, after disabling dma mode */
242 nv_mask(priv, NV04_PFIFO_MODE, 1 << chan->base.chid, 0);
243 nv_wr32(priv, NV03_PFIFO_CACHES, 1);
244 spin_unlock_irqrestore(&priv->base.lock, flags);
246 return nouveau_fifo_channel_fini(&chan->base, suspend);
249 static struct nouveau_ofuncs
251 .ctor = nv04_fifo_chan_ctor,
252 .dtor = nv04_fifo_chan_dtor,
253 .init = nv04_fifo_chan_init,
254 .fini = nv04_fifo_chan_fini,
255 .map = _nouveau_fifo_channel_map,
256 .rd32 = _nouveau_fifo_channel_rd32,
257 .wr32 = _nouveau_fifo_channel_wr32,
258 .ntfy = _nouveau_fifo_channel_ntfy
261 static struct nouveau_oclass
262 nv04_fifo_sclass[] = {
263 { NV03_CHANNEL_DMA, &nv04_fifo_ofuncs },
267 /*******************************************************************************
268 * FIFO context - basically just the instmem reserved for the channel
269 ******************************************************************************/
272 nv04_fifo_context_ctor(struct nouveau_object *parent,
273 struct nouveau_object *engine,
274 struct nouveau_oclass *oclass, void *data, u32 size,
275 struct nouveau_object **pobject)
277 struct nv04_fifo_base *base;
280 ret = nouveau_fifo_context_create(parent, engine, oclass, NULL, 0x1000,
281 0x1000, NVOBJ_FLAG_HEAP, &base);
282 *pobject = nv_object(base);
289 static struct nouveau_oclass
291 .handle = NV_ENGCTX(FIFO, 0x04),
292 .ofuncs = &(struct nouveau_ofuncs) {
293 .ctor = nv04_fifo_context_ctor,
294 .dtor = _nouveau_fifo_context_dtor,
295 .init = _nouveau_fifo_context_init,
296 .fini = _nouveau_fifo_context_fini,
297 .rd32 = _nouveau_fifo_context_rd32,
298 .wr32 = _nouveau_fifo_context_wr32,
302 /*******************************************************************************
304 ******************************************************************************/
307 nv04_fifo_pause(struct nouveau_fifo *pfifo, unsigned long *pflags)
308 __acquires(priv->base.lock)
310 struct nv04_fifo_priv *priv = (void *)pfifo;
313 spin_lock_irqsave(&priv->base.lock, flags);
316 nv_wr32(priv, NV03_PFIFO_CACHES, 0x00000000);
317 nv_mask(priv, NV04_PFIFO_CACHE1_PULL0, 0x00000001, 0x00000000);
319 /* in some cases the puller may be left in an inconsistent state
320 * if you try to stop it while it's busy translating handles.
321 * sometimes you get a CACHE_ERROR, sometimes it just fails
322 * silently; sending incorrect instance offsets to PGRAPH after
323 * it's started up again.
325 * to avoid this, we invalidate the most recently calculated
328 if (!nv_wait(priv, NV04_PFIFO_CACHE1_PULL0,
329 NV04_PFIFO_CACHE1_PULL0_HASH_BUSY, 0x00000000))
330 nv_warn(priv, "timeout idling puller\n");
332 if (nv_rd32(priv, NV04_PFIFO_CACHE1_PULL0) &
333 NV04_PFIFO_CACHE1_PULL0_HASH_FAILED)
334 nv_wr32(priv, NV03_PFIFO_INTR_0, NV_PFIFO_INTR_CACHE_ERROR);
336 nv_wr32(priv, NV04_PFIFO_CACHE1_HASH, 0x00000000);
340 nv04_fifo_start(struct nouveau_fifo *pfifo, unsigned long *pflags)
341 __releases(priv->base.lock)
343 struct nv04_fifo_priv *priv = (void *)pfifo;
344 unsigned long flags = *pflags;
346 nv_mask(priv, NV04_PFIFO_CACHE1_PULL0, 0x00000001, 0x00000001);
347 nv_wr32(priv, NV03_PFIFO_CACHES, 0x00000001);
349 spin_unlock_irqrestore(&priv->base.lock, flags);
353 nv_dma_state_err(u32 state)
355 static const char * const desc[] = {
356 "NONE", "CALL_SUBR_ACTIVE", "INVALID_MTHD", "RET_SUBR_INACTIVE",
357 "INVALID_CMD", "IB_EMPTY"/* NV50+ */, "MEM_FAULT", "UNK"
359 return desc[(state >> 29) & 0x7];
363 nv04_fifo_swmthd(struct nv04_fifo_priv *priv, u32 chid, u32 addr, u32 data)
365 struct nv04_fifo_chan *chan = NULL;
366 struct nouveau_handle *bind;
367 const int subc = (addr >> 13) & 0x7;
368 const int mthd = addr & 0x1ffc;
369 bool handled = false;
373 spin_lock_irqsave(&priv->base.lock, flags);
374 if (likely(chid >= priv->base.min && chid <= priv->base.max))
375 chan = (void *)priv->base.channel[chid];
381 bind = nouveau_namedb_get(nv_namedb(chan), data);
385 if (nv_engidx(bind->object->engine) == NVDEV_ENGINE_SW) {
386 engine = 0x0000000f << (subc * 4);
387 chan->subc[subc] = data;
390 nv_mask(priv, NV04_PFIFO_CACHE1_ENGINE, engine, 0);
393 nouveau_namedb_put(bind);
396 engine = nv_rd32(priv, NV04_PFIFO_CACHE1_ENGINE);
397 if (unlikely(((engine >> (subc * 4)) & 0xf) != 0))
400 bind = nouveau_namedb_get(nv_namedb(chan), chan->subc[subc]);
402 if (!nv_call(bind->object, mthd, data))
404 nouveau_namedb_put(bind);
410 spin_unlock_irqrestore(&priv->base.lock, flags);
415 nv04_fifo_cache_error(struct nouveau_device *device,
416 struct nv04_fifo_priv *priv, u32 chid, u32 get)
421 /* NV_PFIFO_CACHE1_GET actually goes to 0xffc before wrapping on my
422 * G80 chips, but CACHE1 isn't big enough for this much data.. Tests
423 * show that it wraps around to the start at GET=0x800.. No clue as to
426 ptr = (get & 0x7ff) >> 2;
428 if (device->card_type < NV_40) {
429 mthd = nv_rd32(priv, NV04_PFIFO_CACHE1_METHOD(ptr));
430 data = nv_rd32(priv, NV04_PFIFO_CACHE1_DATA(ptr));
432 mthd = nv_rd32(priv, NV40_PFIFO_CACHE1_METHOD(ptr));
433 data = nv_rd32(priv, NV40_PFIFO_CACHE1_DATA(ptr));
436 if (!nv04_fifo_swmthd(priv, chid, mthd, data)) {
437 const char *client_name =
438 nouveau_client_name_for_fifo_chid(&priv->base, chid);
440 "CACHE_ERROR - ch %d [%s] subc %d mthd 0x%04x data 0x%08x\n",
441 chid, client_name, (mthd >> 13) & 7, mthd & 0x1ffc,
445 nv_wr32(priv, NV04_PFIFO_CACHE1_DMA_PUSH, 0);
446 nv_wr32(priv, NV03_PFIFO_INTR_0, NV_PFIFO_INTR_CACHE_ERROR);
448 nv_wr32(priv, NV03_PFIFO_CACHE1_PUSH0,
449 nv_rd32(priv, NV03_PFIFO_CACHE1_PUSH0) & ~1);
450 nv_wr32(priv, NV03_PFIFO_CACHE1_GET, get + 4);
451 nv_wr32(priv, NV03_PFIFO_CACHE1_PUSH0,
452 nv_rd32(priv, NV03_PFIFO_CACHE1_PUSH0) | 1);
453 nv_wr32(priv, NV04_PFIFO_CACHE1_HASH, 0);
455 nv_wr32(priv, NV04_PFIFO_CACHE1_DMA_PUSH,
456 nv_rd32(priv, NV04_PFIFO_CACHE1_DMA_PUSH) | 1);
457 nv_wr32(priv, NV04_PFIFO_CACHE1_PULL0, 1);
461 nv04_fifo_dma_pusher(struct nouveau_device *device, struct nv04_fifo_priv *priv,
464 const char *client_name;
465 u32 dma_get = nv_rd32(priv, 0x003244);
466 u32 dma_put = nv_rd32(priv, 0x003240);
467 u32 push = nv_rd32(priv, 0x003220);
468 u32 state = nv_rd32(priv, 0x003228);
470 client_name = nouveau_client_name_for_fifo_chid(&priv->base, chid);
472 if (device->card_type == NV_50) {
473 u32 ho_get = nv_rd32(priv, 0x003328);
474 u32 ho_put = nv_rd32(priv, 0x003320);
475 u32 ib_get = nv_rd32(priv, 0x003334);
476 u32 ib_put = nv_rd32(priv, 0x003330);
479 "DMA_PUSHER - ch %d [%s] get 0x%02x%08x put 0x%02x%08x ib_get 0x%08x ib_put 0x%08x state 0x%08x (err: %s) push 0x%08x\n",
480 chid, client_name, ho_get, dma_get, ho_put, dma_put,
481 ib_get, ib_put, state, nv_dma_state_err(state), push);
483 /* METHOD_COUNT, in DMA_STATE on earlier chipsets */
484 nv_wr32(priv, 0x003364, 0x00000000);
485 if (dma_get != dma_put || ho_get != ho_put) {
486 nv_wr32(priv, 0x003244, dma_put);
487 nv_wr32(priv, 0x003328, ho_put);
489 if (ib_get != ib_put)
490 nv_wr32(priv, 0x003334, ib_put);
493 "DMA_PUSHER - ch %d [%s] get 0x%08x put 0x%08x state 0x%08x (err: %s) push 0x%08x\n",
494 chid, client_name, dma_get, dma_put, state,
495 nv_dma_state_err(state), push);
497 if (dma_get != dma_put)
498 nv_wr32(priv, 0x003244, dma_put);
501 nv_wr32(priv, 0x003228, 0x00000000);
502 nv_wr32(priv, 0x003220, 0x00000001);
503 nv_wr32(priv, 0x002100, NV_PFIFO_INTR_DMA_PUSHER);
507 nv04_fifo_intr(struct nouveau_subdev *subdev)
509 struct nouveau_device *device = nv_device(subdev);
510 struct nv04_fifo_priv *priv = (void *)subdev;
511 uint32_t status, reassign;
514 reassign = nv_rd32(priv, NV03_PFIFO_CACHES) & 1;
515 while ((status = nv_rd32(priv, NV03_PFIFO_INTR_0)) && (cnt++ < 100)) {
518 nv_wr32(priv, NV03_PFIFO_CACHES, 0);
520 chid = nv_rd32(priv, NV03_PFIFO_CACHE1_PUSH1) & priv->base.max;
521 get = nv_rd32(priv, NV03_PFIFO_CACHE1_GET);
523 if (status & NV_PFIFO_INTR_CACHE_ERROR) {
524 nv04_fifo_cache_error(device, priv, chid, get);
525 status &= ~NV_PFIFO_INTR_CACHE_ERROR;
528 if (status & NV_PFIFO_INTR_DMA_PUSHER) {
529 nv04_fifo_dma_pusher(device, priv, chid);
530 status &= ~NV_PFIFO_INTR_DMA_PUSHER;
533 if (status & NV_PFIFO_INTR_SEMAPHORE) {
536 status &= ~NV_PFIFO_INTR_SEMAPHORE;
537 nv_wr32(priv, NV03_PFIFO_INTR_0,
538 NV_PFIFO_INTR_SEMAPHORE);
540 sem = nv_rd32(priv, NV10_PFIFO_CACHE1_SEMAPHORE);
541 nv_wr32(priv, NV10_PFIFO_CACHE1_SEMAPHORE, sem | 0x1);
543 nv_wr32(priv, NV03_PFIFO_CACHE1_GET, get + 4);
544 nv_wr32(priv, NV04_PFIFO_CACHE1_PULL0, 1);
547 if (device->card_type == NV_50) {
548 if (status & 0x00000010) {
549 status &= ~0x00000010;
550 nv_wr32(priv, 0x002100, 0x00000010);
553 if (status & 0x40000000) {
554 nv_wr32(priv, 0x002100, 0x40000000);
555 nouveau_fifo_uevent(&priv->base);
556 status &= ~0x40000000;
561 nv_warn(priv, "unknown intr 0x%08x, ch %d\n",
563 nv_wr32(priv, NV03_PFIFO_INTR_0, status);
567 nv_wr32(priv, NV03_PFIFO_CACHES, reassign);
571 nv_error(priv, "still angry after %d spins, halt\n", cnt);
572 nv_wr32(priv, 0x002140, 0);
573 nv_wr32(priv, 0x000140, 0);
576 nv_wr32(priv, 0x000100, 0x00000100);
580 nv04_fifo_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
581 struct nouveau_oclass *oclass, void *data, u32 size,
582 struct nouveau_object **pobject)
584 struct nv04_instmem_priv *imem = nv04_instmem(parent);
585 struct nv04_fifo_priv *priv;
588 ret = nouveau_fifo_create(parent, engine, oclass, 0, 15, &priv);
589 *pobject = nv_object(priv);
593 nouveau_ramht_ref(imem->ramht, &priv->ramht);
594 nouveau_gpuobj_ref(imem->ramro, &priv->ramro);
595 nouveau_gpuobj_ref(imem->ramfc, &priv->ramfc);
597 nv_subdev(priv)->unit = 0x00000100;
598 nv_subdev(priv)->intr = nv04_fifo_intr;
599 nv_engine(priv)->cclass = &nv04_fifo_cclass;
600 nv_engine(priv)->sclass = nv04_fifo_sclass;
601 priv->base.pause = nv04_fifo_pause;
602 priv->base.start = nv04_fifo_start;
603 priv->ramfc_desc = nv04_ramfc;
608 nv04_fifo_dtor(struct nouveau_object *object)
610 struct nv04_fifo_priv *priv = (void *)object;
611 nouveau_gpuobj_ref(NULL, &priv->ramfc);
612 nouveau_gpuobj_ref(NULL, &priv->ramro);
613 nouveau_ramht_ref(NULL, &priv->ramht);
614 nouveau_fifo_destroy(&priv->base);
618 nv04_fifo_init(struct nouveau_object *object)
620 struct nv04_fifo_priv *priv = (void *)object;
623 ret = nouveau_fifo_init(&priv->base);
627 nv_wr32(priv, NV04_PFIFO_DELAY_0, 0x000000ff);
628 nv_wr32(priv, NV04_PFIFO_DMA_TIMESLICE, 0x0101ffff);
630 nv_wr32(priv, NV03_PFIFO_RAMHT, (0x03 << 24) /* search 128 */ |
631 ((priv->ramht->bits - 9) << 16) |
632 (priv->ramht->base.addr >> 8));
633 nv_wr32(priv, NV03_PFIFO_RAMRO, priv->ramro->addr >> 8);
634 nv_wr32(priv, NV03_PFIFO_RAMFC, priv->ramfc->addr >> 8);
636 nv_wr32(priv, NV03_PFIFO_CACHE1_PUSH1, priv->base.max);
638 nv_wr32(priv, NV03_PFIFO_INTR_0, 0xffffffff);
639 nv_wr32(priv, NV03_PFIFO_INTR_EN_0, 0xffffffff);
641 nv_wr32(priv, NV03_PFIFO_CACHE1_PUSH0, 1);
642 nv_wr32(priv, NV04_PFIFO_CACHE1_PULL0, 1);
643 nv_wr32(priv, NV03_PFIFO_CACHES, 1);
647 struct nouveau_oclass *
648 nv04_fifo_oclass = &(struct nouveau_oclass) {
649 .handle = NV_ENGINE(FIFO, 0x04),
650 .ofuncs = &(struct nouveau_ofuncs) {
651 .ctor = nv04_fifo_ctor,
652 .dtor = nv04_fifo_dtor,
653 .init = nv04_fifo_init,
654 .fini = _nouveau_fifo_fini,