nv04.c 15 KB
Newer Older
1
/*
2
 * Copyright 2012 Red Hat Inc.
3
 *
4 5 6 7 8 9
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
10
 *
11 12
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
13
 *
14 15 16 17 18 19 20
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
21
 *
22
 * Authors: Ben Skeggs
23
 */
24 25
#include "cgrp.h"
#include "chan.h"
26
#include "chid.h"
27
#include "runl.h"
28

29
#include "nv04.h"
30 31
#include "channv04.h"
#include "regsnv04.h"
32

33
#include <core/ramht.h>
34
#include <subdev/instmem.h>
35
#include <subdev/mc.h>
36
#include <subdev/timer.h>
37
#include <engine/sw.h>
38

39 40
#include <nvif/class.h>

41 42
static const struct nv04_fifo_ramfc
nv04_fifo_ramfc[] = {
43 44 45 46 47 48 49 50 51 52 53
	{ 32,  0, 0x00,  0, NV04_PFIFO_CACHE1_DMA_PUT },
	{ 32,  0, 0x04,  0, NV04_PFIFO_CACHE1_DMA_GET },
	{ 16,  0, 0x08,  0, NV04_PFIFO_CACHE1_DMA_INSTANCE },
	{ 16, 16, 0x08,  0, NV04_PFIFO_CACHE1_DMA_DCOUNT },
	{ 32,  0, 0x0c,  0, NV04_PFIFO_CACHE1_DMA_STATE },
	{ 32,  0, 0x10,  0, NV04_PFIFO_CACHE1_DMA_FETCH },
	{ 32,  0, 0x14,  0, NV04_PFIFO_CACHE1_ENGINE },
	{ 32,  0, 0x18,  0, NV04_PFIFO_CACHE1_PULL1 },
	{}
};

54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
void
nv04_fifo_dma_fini(struct nvkm_fifo_chan *base)
{
	struct nv04_fifo_chan *chan = nv04_fifo_chan(base);
	struct nv04_fifo *fifo = chan->fifo;
	struct nvkm_device *device = fifo->base.engine.subdev.device;
	struct nvkm_memory *fctx = device->imem->ramfc;
	const struct nv04_fifo_ramfc *c;
	unsigned long flags;
	u32 data = chan->ramfc;
	u32 chid;

	/* prevent fifo context switches */
	spin_lock_irqsave(&fifo->base.lock, flags);
	nvkm_wr32(device, NV03_PFIFO_CACHES, 0);

	/* if this channel is active, replace it with a null context */
71
	chid = nvkm_rd32(device, NV03_PFIFO_CACHE1_PUSH1) & fifo->base.chid->mask;
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
	if (chid == chan->base.chid) {
		nvkm_mask(device, NV04_PFIFO_CACHE1_DMA_PUSH, 0x00000001, 0);
		nvkm_wr32(device, NV03_PFIFO_CACHE1_PUSH0, 0);
		nvkm_mask(device, NV04_PFIFO_CACHE1_PULL0, 0x00000001, 0);

		c = fifo->ramfc;
		nvkm_kmap(fctx);
		do {
			u32 rm = ((1ULL << c->bits) - 1) << c->regs;
			u32 cm = ((1ULL << c->bits) - 1) << c->ctxs;
			u32 rv = (nvkm_rd32(device, c->regp) &  rm) >> c->regs;
			u32 cv = (nvkm_ro32(fctx, c->ctxp + data) & ~cm);
			nvkm_wo32(fctx, c->ctxp + data, cv | (rv << c->ctxs));
		} while ((++c)->bits);
		nvkm_done(fctx);

		c = fifo->ramfc;
		do {
			nvkm_wr32(device, c->regp, 0x00000000);
		} while ((++c)->bits);

		nvkm_wr32(device, NV03_PFIFO_CACHE1_GET, 0);
		nvkm_wr32(device, NV03_PFIFO_CACHE1_PUT, 0);
95
		nvkm_wr32(device, NV03_PFIFO_CACHE1_PUSH1, fifo->base.chid->mask);
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
		nvkm_wr32(device, NV03_PFIFO_CACHE1_PUSH0, 1);
		nvkm_wr32(device, NV04_PFIFO_CACHE1_PULL0, 1);
	}

	/* restore normal operation, after disabling dma mode */
	nvkm_mask(device, NV04_PFIFO_MODE, 1 << chan->base.chid, 0);
	nvkm_wr32(device, NV03_PFIFO_CACHES, 1);
	spin_unlock_irqrestore(&fifo->base.lock, flags);
}

void
nv04_fifo_dma_init(struct nvkm_fifo_chan *base)
{
	struct nv04_fifo_chan *chan = nv04_fifo_chan(base);
	struct nv04_fifo *fifo = chan->fifo;
	struct nvkm_device *device = fifo->base.engine.subdev.device;
	u32 mask = 1 << chan->base.chid;
	unsigned long flags;
	spin_lock_irqsave(&fifo->base.lock, flags);
	nvkm_mask(device, NV04_PFIFO_MODE, mask, mask);
	spin_unlock_irqrestore(&fifo->base.lock, flags);
}

119 120 121 122 123 124 125 126
static const struct nvkm_chan_func
nv04_chan = {
};

const struct nvkm_cgrp_func
nv04_cgrp = {
};

127 128 129 130
const struct nvkm_engn_func
nv04_engn = {
};

131
void
132
nv04_fifo_pause(struct nvkm_fifo *base, unsigned long *pflags)
133
__acquires(fifo->base.lock)
134
{
135
	struct nv04_fifo *fifo = nv04_fifo(base);
136
	struct nvkm_device *device = fifo->base.engine.subdev.device;
137
	unsigned long flags;
138

139
	spin_lock_irqsave(&fifo->base.lock, flags);
140 141
	*pflags = flags;

142 143
	nvkm_wr32(device, NV03_PFIFO_CACHES, 0x00000000);
	nvkm_mask(device, NV04_PFIFO_CACHE1_PULL0, 0x00000001, 0x00000000);
144 145 146 147 148 149 150 151 152 153

	/* in some cases the puller may be left in an inconsistent state
	 * if you try to stop it while it's busy translating handles.
	 * sometimes you get a CACHE_ERROR, sometimes it just fails
	 * silently; sending incorrect instance offsets to PGRAPH after
	 * it's started up again.
	 *
	 * to avoid this, we invalidate the most recently calculated
	 * instance.
	 */
154 155 156 157 158
	nvkm_msec(device, 2000,
		u32 tmp = nvkm_rd32(device, NV04_PFIFO_CACHE1_PULL0);
		if (!(tmp & NV04_PFIFO_CACHE1_PULL0_HASH_BUSY))
			break;
	);
159

160
	if (nvkm_rd32(device, NV04_PFIFO_CACHE1_PULL0) &
161
			  NV04_PFIFO_CACHE1_PULL0_HASH_FAILED)
162
		nvkm_wr32(device, NV03_PFIFO_INTR_0, NV_PFIFO_INTR_CACHE_ERROR);
163

164
	nvkm_wr32(device, NV04_PFIFO_CACHE1_HASH, 0x00000000);
165
}
166

167
void
168
nv04_fifo_start(struct nvkm_fifo *base, unsigned long *pflags)
169
__releases(fifo->base.lock)
170
{
171
	struct nv04_fifo *fifo = nv04_fifo(base);
172
	struct nvkm_device *device = fifo->base.engine.subdev.device;
173
	unsigned long flags = *pflags;
174

175 176
	nvkm_mask(device, NV04_PFIFO_CACHE1_PULL0, 0x00000001, 0x00000001);
	nvkm_wr32(device, NV03_PFIFO_CACHES, 0x00000001);
177

178
	spin_unlock_irqrestore(&fifo->base.lock, flags);
179 180
}

181 182 183 184
const struct nvkm_runl_func
nv04_runl = {
};

185 186 187 188 189 190 191 192 193 194 195 196 197 198
int
nv04_fifo_engine_id(struct nvkm_fifo *base, struct nvkm_engine *engine)
{
	switch (engine->subdev.type) {
	case NVKM_ENGINE_SW    : return NV04_FIFO_ENGN_SW;
	case NVKM_ENGINE_GR    : return NV04_FIFO_ENGN_GR;
	case NVKM_ENGINE_MPEG  : return NV04_FIFO_ENGN_MPEG;
	case NVKM_ENGINE_DMAOBJ: return NV04_FIFO_ENGN_DMA;
	default:
		WARN_ON(1);
		return 0;
	}
}

199 200
static const char *
nv_dma_state_err(u32 state)
201
{
202 203 204 205 206
	static const char * const desc[] = {
		"NONE", "CALL_SUBR_ACTIVE", "INVALID_MTHD", "RET_SUBR_INACTIVE",
		"INVALID_CMD", "IB_EMPTY"/* NV50+ */, "MEM_FAULT", "UNK"
	};
	return desc[(state >> 29) & 0x7];
207 208 209
}

static bool
210
nv04_fifo_swmthd(struct nvkm_device *device, u32 chid, u32 addr, u32 data)
211
{
212 213 214 215 216
	struct nvkm_sw *sw = device->sw;
	const int subc = (addr & 0x0000e000) >> 13;
	const int mthd = (addr & 0x00001ffc);
	const u32 mask = 0x0000000f << (subc * 4);
	u32 engine = nvkm_rd32(device, 0x003280);
217 218 219
	bool handled = false;

	switch (mthd) {
220 221
	case 0x0000 ... 0x0000: /* subchannel's engine -> software */
		nvkm_wr32(device, 0x003280, (engine &= ~mask));
222
		fallthrough;
223 224
	case 0x0180 ... 0x01fc: /* handle -> instance */
		data = nvkm_rd32(device, 0x003258) & 0x0000ffff;
225
		fallthrough;
226 227 228 229
	case 0x0100 ... 0x017c:
	case 0x0200 ... 0x1ffc: /* pass method down to sw */
		if (!(engine & mask) && sw)
			handled = nvkm_sw_mthd(sw, chid, subc, mthd, data);
230 231 232 233 234 235 236 237
		break;
	default:
		break;
	}

	return handled;
}

238
static void
239
nv04_fifo_intr_cache_error(struct nvkm_fifo *fifo, u32 chid, u32 get)
240
{
241
	struct nvkm_subdev *subdev = &fifo->engine.subdev;
242
	struct nvkm_device *device = subdev->device;
243
	struct nvkm_chan *chan;
244
	unsigned long flags;
245
	u32 pull0 = nvkm_rd32(device, 0x003250);
246 247 248 249 250 251 252 253 254 255 256
	u32 mthd, data;
	int ptr;

	/* NV_PFIFO_CACHE1_GET actually goes to 0xffc before wrapping on my
	 * G80 chips, but CACHE1 isn't big enough for this much data.. Tests
	 * show that it wraps around to the start at GET=0x800.. No clue as to
	 * why..
	 */
	ptr = (get & 0x7ff) >> 2;

	if (device->card_type < NV_40) {
257 258
		mthd = nvkm_rd32(device, NV04_PFIFO_CACHE1_METHOD(ptr));
		data = nvkm_rd32(device, NV04_PFIFO_CACHE1_DATA(ptr));
259
	} else {
260 261
		mthd = nvkm_rd32(device, NV40_PFIFO_CACHE1_METHOD(ptr));
		data = nvkm_rd32(device, NV40_PFIFO_CACHE1_DATA(ptr));
262 263
	}

264 265
	if (!(pull0 & 0x00000100) ||
	    !nv04_fifo_swmthd(device, chid, mthd, data)) {
266
		chan = nvkm_chan_get_chid(&fifo->engine, chid, &flags);
267 268
		nvkm_error(subdev, "CACHE_ERROR - "
			   "ch %d [%s] subc %d mthd %04x data %08x\n",
269
			   chid, chan ? chan->name : "unknown",
270
			   (mthd >> 13) & 7, mthd & 0x1ffc, data);
271
		nvkm_chan_put(&chan, flags);
272 273
	}

274 275
	nvkm_wr32(device, NV04_PFIFO_CACHE1_DMA_PUSH, 0);
	nvkm_wr32(device, NV03_PFIFO_INTR_0, NV_PFIFO_INTR_CACHE_ERROR);
276

277 278 279 280 281 282
	nvkm_wr32(device, NV03_PFIFO_CACHE1_PUSH0,
		nvkm_rd32(device, NV03_PFIFO_CACHE1_PUSH0) & ~1);
	nvkm_wr32(device, NV03_PFIFO_CACHE1_GET, get + 4);
	nvkm_wr32(device, NV03_PFIFO_CACHE1_PUSH0,
		nvkm_rd32(device, NV03_PFIFO_CACHE1_PUSH0) | 1);
	nvkm_wr32(device, NV04_PFIFO_CACHE1_HASH, 0);
283

284 285 286
	nvkm_wr32(device, NV04_PFIFO_CACHE1_DMA_PUSH,
		nvkm_rd32(device, NV04_PFIFO_CACHE1_DMA_PUSH) | 1);
	nvkm_wr32(device, NV04_PFIFO_CACHE1_PULL0, 1);
287 288 289
}

static void
290
nv04_fifo_intr_dma_pusher(struct nvkm_fifo *fifo, u32 chid)
291
{
292
	struct nvkm_subdev *subdev = &fifo->engine.subdev;
293
	struct nvkm_device *device = subdev->device;
294 295 296 297
	u32 dma_get = nvkm_rd32(device, 0x003244);
	u32 dma_put = nvkm_rd32(device, 0x003240);
	u32 push = nvkm_rd32(device, 0x003220);
	u32 state = nvkm_rd32(device, 0x003228);
298
	struct nvkm_chan *chan;
299 300
	unsigned long flags;
	const char *name;
301

302 303
	chan = nvkm_chan_get_chid(&fifo->engine, chid, &flags);
	name = chan ? chan->name : "unknown";
304
	if (device->card_type == NV_50) {
305 306 307 308
		u32 ho_get = nvkm_rd32(device, 0x003328);
		u32 ho_put = nvkm_rd32(device, 0x003320);
		u32 ib_get = nvkm_rd32(device, 0x003334);
		u32 ib_put = nvkm_rd32(device, 0x003330);
309

310 311 312
		nvkm_error(subdev, "DMA_PUSHER - "
			   "ch %d [%s] get %02x%08x put %02x%08x ib_get %08x "
			   "ib_put %08x state %08x (err: %s) push %08x\n",
313
			   chid, name, ho_get, dma_get, ho_put, dma_put,
314 315
			   ib_get, ib_put, state, nv_dma_state_err(state),
			   push);
316 317

		/* METHOD_COUNT, in DMA_STATE on earlier chipsets */
318
		nvkm_wr32(device, 0x003364, 0x00000000);
319
		if (dma_get != dma_put || ho_get != ho_put) {
320 321
			nvkm_wr32(device, 0x003244, dma_put);
			nvkm_wr32(device, 0x003328, ho_put);
322 323
		} else
		if (ib_get != ib_put)
324
			nvkm_wr32(device, 0x003334, ib_put);
325
	} else {
326 327
		nvkm_error(subdev, "DMA_PUSHER - ch %d [%s] get %08x put %08x "
				   "state %08x (err: %s) push %08x\n",
328
			   chid, name, dma_get, dma_put, state,
329
			   nv_dma_state_err(state), push);
330 331

		if (dma_get != dma_put)
332
			nvkm_wr32(device, 0x003244, dma_put);
333
	}
334
	nvkm_chan_put(&chan, flags);
335

336 337 338
	nvkm_wr32(device, 0x003228, 0x00000000);
	nvkm_wr32(device, 0x003220, 0x00000001);
	nvkm_wr32(device, 0x002100, NV_PFIFO_INTR_DMA_PUSHER);
339 340
}

341 342
irqreturn_t
nv04_fifo_intr(struct nvkm_inth *inth)
343
{
344 345
	struct nvkm_fifo *fifo = container_of(inth, typeof(*fifo), engine.subdev.inth);
	struct nvkm_subdev *subdev = &fifo->engine.subdev;
346
	struct nvkm_device *device = subdev->device;
347 348
	u32 mask = nvkm_rd32(device, NV03_PFIFO_INTR_EN_0);
	u32 stat = nvkm_rd32(device, NV03_PFIFO_INTR_0) & mask;
349
	u32 reassign, chid, get, sem;
350

351 352
	reassign = nvkm_rd32(device, NV03_PFIFO_CACHES) & 1;
	nvkm_wr32(device, NV03_PFIFO_CACHES, 0);
353

354
	chid = nvkm_rd32(device, NV03_PFIFO_CACHE1_PUSH1) & fifo->chid->mask;
355
	get  = nvkm_rd32(device, NV03_PFIFO_CACHE1_GET);
356

357
	if (stat & NV_PFIFO_INTR_CACHE_ERROR) {
358
		nv04_fifo_intr_cache_error(fifo, chid, get);
359 360
		stat &= ~NV_PFIFO_INTR_CACHE_ERROR;
	}
361

362
	if (stat & NV_PFIFO_INTR_DMA_PUSHER) {
363
		nv04_fifo_intr_dma_pusher(fifo, chid);
364 365
		stat &= ~NV_PFIFO_INTR_DMA_PUSHER;
	}
366

367 368
	if (stat & NV_PFIFO_INTR_SEMAPHORE) {
		stat &= ~NV_PFIFO_INTR_SEMAPHORE;
369
		nvkm_wr32(device, NV03_PFIFO_INTR_0, NV_PFIFO_INTR_SEMAPHORE);
370

371 372
		sem = nvkm_rd32(device, NV10_PFIFO_CACHE1_SEMAPHORE);
		nvkm_wr32(device, NV10_PFIFO_CACHE1_SEMAPHORE, sem | 0x1);
373

374 375
		nvkm_wr32(device, NV03_PFIFO_CACHE1_GET, get + 4);
		nvkm_wr32(device, NV04_PFIFO_CACHE1_PULL0, 1);
376
	}
377

378 379 380
	if (device->card_type == NV_50) {
		if (stat & 0x00000010) {
			stat &= ~0x00000010;
381
			nvkm_wr32(device, 0x002100, 0x00000010);
382 383
		}

384
		if (stat & 0x40000000) {
385
			nvkm_wr32(device, 0x002100, 0x40000000);
386
			nvkm_event_ntfy(&fifo->nonstall.event, 0, NVKM_FIFO_NONSTALL_EVENT);
387
			stat &= ~0x40000000;
388 389 390
		}
	}

391
	if (stat) {
392
		nvkm_warn(subdev, "intr %08x\n", stat);
393 394
		nvkm_mask(device, NV03_PFIFO_INTR_EN_0, stat, 0x00000000);
		nvkm_wr32(device, NV03_PFIFO_INTR_0, stat);
395 396
	}

397
	nvkm_wr32(device, NV03_PFIFO_CACHES, reassign);
398
	return IRQ_HANDLED;
399
}
400

401
void
402
nv04_fifo_init(struct nvkm_fifo *fifo)
403
{
404
	struct nvkm_device *device = fifo->engine.subdev.device;
405 406 407 408
	struct nvkm_instmem *imem = device->imem;
	struct nvkm_ramht *ramht = imem->ramht;
	struct nvkm_memory *ramro = imem->ramro;
	struct nvkm_memory *ramfc = imem->ramfc;
409

410 411
	nvkm_wr32(device, NV04_PFIFO_DELAY_0, 0x000000ff);
	nvkm_wr32(device, NV04_PFIFO_DMA_TIMESLICE, 0x0101ffff);
412

413
	nvkm_wr32(device, NV03_PFIFO_RAMHT, (0x03 << 24) /* search 128 */ |
414
					    ((ramht->bits - 9) << 16) |
415
					    (ramht->gpuobj->addr >> 8));
416 417
	nvkm_wr32(device, NV03_PFIFO_RAMRO, nvkm_memory_addr(ramro) >> 8);
	nvkm_wr32(device, NV03_PFIFO_RAMFC, nvkm_memory_addr(ramfc) >> 8);
418

419
	nvkm_wr32(device, NV03_PFIFO_CACHE1_PUSH1, fifo->chid->mask);
420

421 422
	nvkm_wr32(device, NV03_PFIFO_INTR_0, 0xffffffff);
	nvkm_wr32(device, NV03_PFIFO_INTR_EN_0, 0xffffffff);
423

424 425 426
	nvkm_wr32(device, NV03_PFIFO_CACHE1_PUSH0, 1);
	nvkm_wr32(device, NV04_PFIFO_CACHE1_PULL0, 1);
	nvkm_wr32(device, NV03_PFIFO_CACHES, 1);
427
}
428

429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444
int
nv04_fifo_runl_ctor(struct nvkm_fifo *fifo)
{
	struct nvkm_runl *runl;

	runl = nvkm_runl_new(fifo, 0, 0, 0);
	if (IS_ERR(runl))
		return PTR_ERR(runl);

	nvkm_runl_add(runl, 0, fifo->func->engn_sw, NVKM_ENGINE_SW, 0);
	nvkm_runl_add(runl, 0, fifo->func->engn_sw, NVKM_ENGINE_DMAOBJ, 0);
	nvkm_runl_add(runl, 1, fifo->func->engn   , NVKM_ENGINE_GR, 0);
	nvkm_runl_add(runl, 2, fifo->func->engn   , NVKM_ENGINE_MPEG, 0); /* NV31- */
	return 0;
}

445 446 447 448 449 450 451
int
nv04_fifo_chid_ctor(struct nvkm_fifo *fifo, int nr)
{
	/* The last CHID is reserved by HW as a "channel invalid" marker. */
	return nvkm_chid_new(&nvkm_chan_event, &fifo->engine.subdev, nr, 0, nr - 1, &fifo->chid);
}

452 453 454 455 456 457
static int
nv04_fifo_chid_nr(struct nvkm_fifo *fifo)
{
	return 16;
}

458 459
int
nv04_fifo_new_(const struct nvkm_fifo_func *func, struct nvkm_device *device,
460
	       enum nvkm_subdev_type type, int inst, int nr, const struct nv04_fifo_ramfc *ramfc,
461
	       struct nvkm_fifo **pfifo)
462 463 464 465
{
	struct nv04_fifo *fifo;
	int ret;

466 467 468 469 470
	if (!(fifo = kzalloc(sizeof(*fifo), GFP_KERNEL)))
		return -ENOMEM;
	fifo->ramfc = ramfc;
	*pfifo = &fifo->base;

471
	ret = nvkm_fifo_ctor(func, device, type, inst, &fifo->base);
472 473 474 475 476 477
	if (ret)
		return ret;

	return 0;
}

478 479
static const struct nvkm_fifo_func
nv04_fifo = {
480
	.chid_nr = nv04_fifo_chid_nr,
481
	.chid_ctor = nv04_fifo_chid_ctor,
482
	.runl_ctor = nv04_fifo_runl_ctor,
483 484
	.init = nv04_fifo_init,
	.intr = nv04_fifo_intr,
485
	.engine_id = nv04_fifo_engine_id,
486 487
	.pause = nv04_fifo_pause,
	.start = nv04_fifo_start,
488 489 490
	.runl = &nv04_runl,
	.engn = &nv04_engn,
	.engn_sw = &nv04_engn,
491 492
	.cgrp = {{                        }, &nv04_cgrp },
	.chan = {{ 0, 0, NV03_CHANNEL_DMA }, &nv04_chan, .oclass = &nv04_fifo_dma_oclass },
493
};
494 495

int
496 497
nv04_fifo_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
	      struct nvkm_fifo **pfifo)
498
{
499
	return nv04_fifo_new_(&nv04_fifo, device, type, inst, 16, nv04_fifo_ramfc, pfifo);
500
}