Lines Matching refs:chan
45 u32 chan; member
72 struct ga102_chan *chan = ga102_chan(object); in ga102_chan_map() local
73 struct nvkm_device *device = chan->object.engine->subdev.device; in ga102_chan_map()
74 u64 bar2 = nvkm_memory_bar2(chan->user); in ga102_chan_map()
88 struct ga102_chan *chan = ga102_chan(object); in ga102_chan_fini() local
89 struct nvkm_device *device = chan->object.engine->subdev.device; in ga102_chan_fini()
91 nvkm_wr32(device, chan->ctrl.chan, 0x00000003); in ga102_chan_fini()
93 nvkm_wr32(device, chan->ctrl.runl + 0x098, 0x01000000); in ga102_chan_fini()
95 if (!(nvkm_rd32(device, chan->ctrl.runl + 0x098) & 0x00100000)) in ga102_chan_fini()
99 nvkm_wr32(device, chan->ctrl.runl + 0x088, 0); in ga102_chan_fini()
101 nvkm_wr32(device, chan->ctrl.chan, 0xffffffff); in ga102_chan_fini()
108 struct ga102_chan *chan = ga102_chan(object); in ga102_chan_init() local
109 struct nvkm_device *device = chan->object.engine->subdev.device; in ga102_chan_init()
111 nvkm_mask(device, chan->ctrl.runl + 0x300, 0x80000000, 0x80000000); in ga102_chan_init()
113 nvkm_wr32(device, chan->ctrl.runl + 0x080, lower_32_bits(nvkm_memory_addr(chan->runl))); in ga102_chan_init()
114 nvkm_wr32(device, chan->ctrl.runl + 0x084, upper_32_bits(nvkm_memory_addr(chan->runl))); in ga102_chan_init()
115 nvkm_wr32(device, chan->ctrl.runl + 0x088, 2); in ga102_chan_init()
117 nvkm_wr32(device, chan->ctrl.chan, 0x00000002); in ga102_chan_init()
118 nvkm_wr32(device, chan->ctrl.runl + 0x0090, 0); in ga102_chan_init()
125 struct ga102_chan *chan = ga102_chan(object); in ga102_chan_dtor() local
127 if (chan->vmm) { in ga102_chan_dtor()
128 nvkm_vmm_part(chan->vmm, chan->inst); in ga102_chan_dtor()
129 nvkm_vmm_unref(&chan->vmm); in ga102_chan_dtor()
132 nvkm_memory_unref(&chan->runl); in ga102_chan_dtor()
133 nvkm_memory_unref(&chan->user); in ga102_chan_dtor()
134 nvkm_memory_unref(&chan->inst); in ga102_chan_dtor()
135 nvkm_memory_unref(&chan->mthd); in ga102_chan_dtor()
136 return chan; in ga102_chan_dtor()
155 struct ga102_chan *chan; in ga102_chan_new() local
165 if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL))) in ga102_chan_new()
168 nvkm_object_ctor(&ga102_chan, oclass, &chan->object); in ga102_chan_new()
169 *pobject = &chan->object; in ga102_chan_new()
173 chan->ctrl.runl = tdev->runlist; in ga102_chan_new()
178 if (!chan->ctrl.runl) in ga102_chan_new()
181 chan->ctrl.chan = nvkm_rd32(device, chan->ctrl.runl + 0x004) & 0xfffffff0; in ga102_chan_new()
185 args->token = nvkm_rd32(device, chan->ctrl.runl + 0x008) & 0xffff0000; in ga102_chan_new()
187 ret = nvkm_memory_new(device, NVKM_MEM_TARGET_INST, 0x1000, 0x1000, true, &chan->mthd); in ga102_chan_new()
191 ret = nvkm_memory_new(device, NVKM_MEM_TARGET_INST, 0x1000, 0x1000, true, &chan->inst); in ga102_chan_new()
195 nvkm_kmap(chan->inst); in ga102_chan_new()
196 nvkm_wo32(chan->inst, 0x010, 0x0000face); in ga102_chan_new()
197 nvkm_wo32(chan->inst, 0x030, 0x7ffff902); in ga102_chan_new()
198 nvkm_wo32(chan->inst, 0x048, lower_32_bits(args->ioffset)); in ga102_chan_new()
199 nvkm_wo32(chan->inst, 0x04c, upper_32_bits(args->ioffset) | in ga102_chan_new()
201 nvkm_wo32(chan->inst, 0x084, 0x20400000); in ga102_chan_new()
202 nvkm_wo32(chan->inst, 0x094, 0x30000001); in ga102_chan_new()
203 nvkm_wo32(chan->inst, 0x0ac, 0x00020000); in ga102_chan_new()
204 nvkm_wo32(chan->inst, 0x0e4, 0x00000000); in ga102_chan_new()
205 nvkm_wo32(chan->inst, 0x0e8, 0); in ga102_chan_new()
206 nvkm_wo32(chan->inst, 0x0f4, 0x00001000); in ga102_chan_new()
207 nvkm_wo32(chan->inst, 0x0f8, 0x10003080); in ga102_chan_new()
208 nvkm_mo32(chan->inst, 0x218, 0x00000000, 0x00000000); in ga102_chan_new()
209 nvkm_wo32(chan->inst, 0x220, lower_32_bits(nvkm_memory_bar2(chan->mthd))); in ga102_chan_new()
210 nvkm_wo32(chan->inst, 0x224, upper_32_bits(nvkm_memory_bar2(chan->mthd))); in ga102_chan_new()
211 nvkm_done(chan->inst); in ga102_chan_new()
213 ret = nvkm_memory_new(device, NVKM_MEM_TARGET_INST, 0x1000, 0x1000, true, &chan->user); in ga102_chan_new()
217 ret = nvkm_memory_new(device, NVKM_MEM_TARGET_INST, 0x1000, 0x1000, true, &chan->runl); in ga102_chan_new()
221 nvkm_kmap(chan->runl); in ga102_chan_new()
222 nvkm_wo32(chan->runl, 0x00, 0x80030001); in ga102_chan_new()
223 nvkm_wo32(chan->runl, 0x04, 1); in ga102_chan_new()
224 nvkm_wo32(chan->runl, 0x08, 0); in ga102_chan_new()
225 nvkm_wo32(chan->runl, 0x0c, 0x00000000); in ga102_chan_new()
226 nvkm_wo32(chan->runl, 0x10, lower_32_bits(nvkm_memory_addr(chan->user))); in ga102_chan_new()
227 nvkm_wo32(chan->runl, 0x14, upper_32_bits(nvkm_memory_addr(chan->user))); in ga102_chan_new()
228 nvkm_wo32(chan->runl, 0x18, lower_32_bits(nvkm_memory_addr(chan->inst))); in ga102_chan_new()
229 nvkm_wo32(chan->runl, 0x1c, upper_32_bits(nvkm_memory_addr(chan->inst))); in ga102_chan_new()
230 nvkm_done(chan->runl); in ga102_chan_new()
232 ret = nvkm_vmm_join(vmm, chan->inst); in ga102_chan_new()
236 chan->vmm = nvkm_vmm_ref(vmm); in ga102_chan_new()