Lines Matching refs:device

38 	struct nvkm_device *device = fifo->engine.subdev.device;  in gk104_fifo_uevent_fini()  local
39 nvkm_mask(device, 0x002140, 0x80000000, 0x00000000); in gk104_fifo_uevent_fini()
45 struct nvkm_device *device = fifo->engine.subdev.device; in gk104_fifo_uevent_init() local
46 nvkm_mask(device, 0x002140, 0x80000000, 0x80000000); in gk104_fifo_uevent_init()
55 struct nvkm_device *device = subdev->device; in gk104_fifo_runlist_update() local
71 nvkm_wr32(device, 0x002270, nvkm_memory_addr(cur) >> 12); in gk104_fifo_runlist_update()
72 nvkm_wr32(device, 0x002274, (engine << 20) | nr); in gk104_fifo_runlist_update()
74 if (wait_event_timeout(engn->wait, !(nvkm_rd32(device, 0x002284 + in gk104_fifo_runlist_update()
84 struct nvkm_device *device = fifo->base.engine.subdev.device; in gk104_fifo_engine() local
87 return nvkm_device_engine(device, __ffs(subdevs)); in gk104_fifo_engine()
95 struct nvkm_device *device = fifo->base.engine.subdev.device; in gk104_fifo_recover_work() local
108 nvkm_mask(device, 0x002630, engm, engm); in gk104_fifo_recover_work()
111 if ((engine = nvkm_device_engine(device, engn))) { in gk104_fifo_recover_work()
118 nvkm_wr32(device, 0x00262c, engm); in gk104_fifo_recover_work()
119 nvkm_mask(device, 0x002630, engm, 0x00000000); in gk104_fifo_recover_work()
127 struct nvkm_device *device = subdev->device; in gk104_fifo_recover() local
134 nvkm_mask(device, 0x800004 + (chid * 0x08), 0x00000800, 0x00000800); in gk104_fifo_recover()
157 struct nvkm_device *device = subdev->device; in gk104_fifo_intr_bind() local
158 u32 intr = nvkm_rd32(device, 0x00252c); in gk104_fifo_intr_bind()
175 struct nvkm_device *device = fifo->base.engine.subdev.device; in gk104_fifo_intr_sched_ctxsw() local
183 u32 stat = nvkm_rd32(device, 0x002640 + (engn * 0x04)); in gk104_fifo_intr_sched_ctxsw()
212 struct nvkm_device *device = subdev->device; in gk104_fifo_intr_sched() local
213 u32 intr = nvkm_rd32(device, 0x00254c); in gk104_fifo_intr_sched()
233 struct nvkm_device *device = subdev->device; in gk104_fifo_intr_chsw() local
234 u32 stat = nvkm_rd32(device, 0x00256c); in gk104_fifo_intr_chsw()
236 nvkm_wr32(device, 0x00256c, stat); in gk104_fifo_intr_chsw()
243 struct nvkm_device *device = subdev->device; in gk104_fifo_intr_dropped_fault() local
244 u32 stat = nvkm_rd32(device, 0x00259c); in gk104_fifo_intr_dropped_fault()
357 struct nvkm_device *device = subdev->device; in gk104_fifo_intr_fault() local
358 u32 inst = nvkm_rd32(device, 0x002800 + (unit * 0x10)); in gk104_fifo_intr_fault()
359 u32 valo = nvkm_rd32(device, 0x002804 + (unit * 0x10)); in gk104_fifo_intr_fault()
360 u32 vahi = nvkm_rd32(device, 0x002808 + (unit * 0x10)); in gk104_fifo_intr_fault()
361 u32 stat = nvkm_rd32(device, 0x00280c + (unit * 0x10)); in gk104_fifo_intr_fault()
385 nvkm_mask(device, 0x001704, 0x00000000, 0x00000000); in gk104_fifo_intr_fault()
388 nvkm_mask(device, 0x001714, 0x00000000, 0x00000000); in gk104_fifo_intr_fault()
391 nvkm_mask(device, 0x001718, 0x00000000, 0x00000000); in gk104_fifo_intr_fault()
394 engine = nvkm_device_engine(device, eu->data2); in gk104_fifo_intr_fault()
453 struct nvkm_device *device = subdev->device; in gk104_fifo_intr_pbdma_0() local
454 u32 mask = nvkm_rd32(device, 0x04010c + (unit * 0x2000)); in gk104_fifo_intr_pbdma_0()
455 u32 stat = nvkm_rd32(device, 0x040108 + (unit * 0x2000)) & mask; in gk104_fifo_intr_pbdma_0()
456 u32 addr = nvkm_rd32(device, 0x0400c0 + (unit * 0x2000)); in gk104_fifo_intr_pbdma_0()
457 u32 data = nvkm_rd32(device, 0x0400c4 + (unit * 0x2000)); in gk104_fifo_intr_pbdma_0()
458 u32 chid = nvkm_rd32(device, 0x040120 + (unit * 0x2000)) & 0xfff; in gk104_fifo_intr_pbdma_0()
467 if (device->sw) { in gk104_fifo_intr_pbdma_0()
468 if (nvkm_sw_mthd(device->sw, chid, subc, mthd, data)) in gk104_fifo_intr_pbdma_0()
471 nvkm_wr32(device, 0x0400c0 + (unit * 0x2000), 0x80600008); in gk104_fifo_intr_pbdma_0()
485 nvkm_wr32(device, 0x040108 + (unit * 0x2000), stat); in gk104_fifo_intr_pbdma_0()
501 struct nvkm_device *device = subdev->device; in gk104_fifo_intr_pbdma_1() local
502 u32 mask = nvkm_rd32(device, 0x04014c + (unit * 0x2000)); in gk104_fifo_intr_pbdma_1()
503 u32 stat = nvkm_rd32(device, 0x040148 + (unit * 0x2000)) & mask; in gk104_fifo_intr_pbdma_1()
504 u32 chid = nvkm_rd32(device, 0x040120 + (unit * 0x2000)) & 0xfff; in gk104_fifo_intr_pbdma_1()
511 nvkm_rd32(device, 0x040150 + (unit * 0x2000)), in gk104_fifo_intr_pbdma_1()
512 nvkm_rd32(device, 0x040154 + (unit * 0x2000))); in gk104_fifo_intr_pbdma_1()
515 nvkm_wr32(device, 0x040148 + (unit * 0x2000), stat); in gk104_fifo_intr_pbdma_1()
521 struct nvkm_device *device = fifo->base.engine.subdev.device; in gk104_fifo_intr_runlist() local
522 u32 mask = nvkm_rd32(device, 0x002a00); in gk104_fifo_intr_runlist()
526 nvkm_wr32(device, 0x002a00, 1 << engn); in gk104_fifo_intr_runlist()
542 struct nvkm_device *device = subdev->device; in gk104_fifo_intr() local
543 u32 mask = nvkm_rd32(device, 0x002140); in gk104_fifo_intr()
544 u32 stat = nvkm_rd32(device, 0x002100) & mask; in gk104_fifo_intr()
548 nvkm_wr32(device, 0x002100, 0x00000001); in gk104_fifo_intr()
554 nvkm_wr32(device, 0x002100, 0x00000010); in gk104_fifo_intr()
560 nvkm_wr32(device, 0x002100, 0x00000100); in gk104_fifo_intr()
566 nvkm_wr32(device, 0x002100, 0x00010000); in gk104_fifo_intr()
572 nvkm_wr32(device, 0x002100, 0x00800000); in gk104_fifo_intr()
578 nvkm_wr32(device, 0x002100, 0x01000000); in gk104_fifo_intr()
584 nvkm_wr32(device, 0x002100, 0x08000000); in gk104_fifo_intr()
589 u32 mask = nvkm_rd32(device, 0x00259c); in gk104_fifo_intr()
593 nvkm_wr32(device, 0x00259c, (1 << unit)); in gk104_fifo_intr()
600 u32 mask = nvkm_rd32(device, 0x0025a0); in gk104_fifo_intr()
605 nvkm_wr32(device, 0x0025a0, (1 << unit)); in gk104_fifo_intr()
617 nvkm_wr32(device, 0x002100, 0x80000000); in gk104_fifo_intr()
624 nvkm_mask(device, 0x002140, stat, 0x00000000); in gk104_fifo_intr()
625 nvkm_wr32(device, 0x002100, stat); in gk104_fifo_intr()
633 struct nvkm_device *device = fifo->base.engine.subdev.device; in gk104_fifo_fini() local
636 nvkm_mask(device, 0x002140, 0x10000000, 0x10000000); in gk104_fifo_fini()
643 struct nvkm_device *device = fifo->base.engine.subdev.device; in gk104_fifo_oneinit() local
647 ret = nvkm_memory_new(device, NVKM_MEM_TARGET_INST, in gk104_fifo_oneinit()
653 ret = nvkm_memory_new(device, NVKM_MEM_TARGET_INST, in gk104_fifo_oneinit()
663 ret = nvkm_memory_new(device, NVKM_MEM_TARGET_INST, in gk104_fifo_oneinit()
669 ret = nvkm_bar_umap(device->bar, fifo->base.nr * 0x200, 12, in gk104_fifo_oneinit()
683 struct nvkm_device *device = subdev->device; in gk104_fifo_init() local
687 nvkm_wr32(device, 0x000204, 0xffffffff); in gk104_fifo_init()
688 fifo->spoon_nr = hweight32(nvkm_rd32(device, 0x000204)); in gk104_fifo_init()
693 nvkm_mask(device, 0x04013c + (i * 0x2000), 0x10000100, 0x00000000); in gk104_fifo_init()
694 nvkm_wr32(device, 0x040108 + (i * 0x2000), 0xffffffff); /* INTR */ in gk104_fifo_init()
695 nvkm_wr32(device, 0x04010c + (i * 0x2000), 0xfffffeff); /* INTREN */ in gk104_fifo_init()
700 nvkm_wr32(device, 0x040148 + (i * 0x2000), 0xffffffff); /* INTR */ in gk104_fifo_init()
701 nvkm_wr32(device, 0x04014c + (i * 0x2000), 0xffffffff); /* INTREN */ in gk104_fifo_init()
704 nvkm_wr32(device, 0x002254, 0x10000000 | fifo->user.bar.offset >> 12); in gk104_fifo_init()
706 nvkm_wr32(device, 0x002100, 0xffffffff); in gk104_fifo_init()
707 nvkm_wr32(device, 0x002140, 0x7fffffff); in gk104_fifo_init()
728 gk104_fifo_new_(const struct nvkm_fifo_func *func, struct nvkm_device *device, in gk104_fifo_new_() argument
738 return nvkm_fifo_ctor(func, device, index, nr, &fifo->base); in gk104_fifo_new_()
757 gk104_fifo_new(struct nvkm_device *device, int index, struct nvkm_fifo **pfifo) in gk104_fifo_new() argument
759 return gk104_fifo_new_(&gk104_fifo, device, index, 4096, pfifo); in gk104_fifo_new()